From 31b8772d82f76d4f61ca2ad4d8c43e6047f1c084 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 24 Jul 2026 21:02:10 +0000 Subject: [PATCH 1/4] fix: align HTTP paths with enforced matching feat: A new method `ExpungeSupportEventSubscription` is added to service `SupportEventSubscriptionService` feat: A new message `ExpungeSupportEventSubscriptionRequest` is added docs: A comment for method `ListSupportEventSubscriptions` in service `SupportEventSubscriptionService` is changed PiperOrigin-RevId: 953475671 Source-Link: https://github.com/googleapis/googleapis/commit/af9ff0ffac68993cb5522fdb7f908e766ed7515a Source-Link: https://github.com/googleapis/googleapis-gen/commit/84f31f70626b25ce2f088c5a66d5d33725467294 Copy-Tag: eyJwIjoiU3VwcG9ydC8uT3dsQm90LnlhbWwiLCJoIjoiODRmMzFmNzA2MjZiMjVjZTJmMDg4YzVhNjZkNWQzMzcyNTQ2NzI5NCJ9 --- .../Google/Cloud/Support/V2/Actor.php | 25 + .../Google/Cloud/Support/V2/Attachment.php | 28 + .../Cloud/Support/V2/AttachmentService.php | 29 + .../Google/Cloud/Support/V2/CaseService.php | 31 + .../Google/Cloud/Support/V2/Comment.php | 28 + .../Cloud/Support/V2/CommentService.php | 29 + .../Google/Cloud/Support/V2/Escalation.php | 25 + .../Google/Cloud/Support/V2/PBCase.php | 28 + .../Support/V2/SupportEventSubscription.php | 27 + .../V2/SupportEventSubscriptionService.php | 31 + .../src/Google/Cloud/Support/V2/Actor.php | 222 ++++++ .../Google/Cloud/Support/V2/Attachment.php | 267 +++++++ .../Cloud/Support/V2/CaseClassification.php | 137 ++++ .../Cloud/Support/V2/CloseCaseRequest.php | 67 ++ .../src/Google/Cloud/Support/V2/Comment.php | 245 ++++++ .../Cloud/Support/V2/CreateCaseRequest.php | 127 ++++ .../Cloud/Support/V2/CreateCommentRequest.php | 127 ++++ .../CreateSupportEventSubscriptionRequest.php | 132 ++++ .../DeleteSupportEventSubscriptionRequest.php | 91 +++ .../Cloud/Support/V2/EscalateCaseRequest.php | 111 +++ .../Google/Cloud/Support/V2/Escalation.php | 105 +++ .../Cloud/Support/V2/Escalation/Reason.php | 69 ++ ...ExpungeSupportEventSubscriptionRequest.php | 91 +++ .../Cloud/Support/V2/GetAttachmentRequest.php | 81 ++ .../Cloud/Support/V2/GetCaseRequest.php | 81 ++ .../Cloud/Support/V2/GetCommentRequest.php | 81 ++ .../V2/GetSupportEventSubscriptionRequest.php | 91 +++ .../Support/V2/ListAttachmentsRequest.php | 173 +++++ .../Support/V2/ListAttachmentsResponse.php | 109 +++ .../Cloud/Support/V2/ListCasesRequest.php | 239 ++++++ .../Cloud/Support/V2/ListCasesResponse.php | 113 +++ .../Cloud/Support/V2/ListCommentsRequest.php | 153 ++++ .../Cloud/Support/V2/ListCommentsResponse.php | 109 +++ .../ListSupportEventSubscriptionsRequest.php | 274 +++++++ .../ListSupportEventSubscriptionsResponse.php | 105 +++ .../src/Google/Cloud/Support/V2/PBCase.php | 654 ++++++++++++++++ .../Cloud/Support/V2/PBCase/Priority.php | 85 +++ .../Google/Cloud/Support/V2/PBCase/State.php | 86 +++ .../V2/SearchCaseClassificationsRequest.php | 147 ++++ .../V2/SearchCaseClassificationsResponse.php | 109 +++ .../Cloud/Support/V2/SearchCasesRequest.php | 317 ++++++++ .../Cloud/Support/V2/SearchCasesResponse.php | 113 +++ .../Support/V2/SupportEventSubscription.php | 353 +++++++++ .../FailureReason.php | 70 ++ .../V2/SupportEventSubscription/State.php | 71 ++ ...ndeleteSupportEventSubscriptionRequest.php | 75 ++ .../Cloud/Support/V2/UpdateCaseRequest.php | 167 ++++ .../UpdateSupportEventSubscriptionRequest.php | 146 ++++ .../get_attachment.php | 105 +++ .../list_attachments.php | 76 ++ .../V2/CaseServiceClient/close_case.php | 71 ++ .../V2/CaseServiceClient/create_case.php | 77 ++ .../V2/CaseServiceClient/escalate_case.php | 77 ++ .../samples/V2/CaseServiceClient/get_case.php | 71 ++ .../V2/CaseServiceClient/list_cases.php | 80 ++ .../search_case_classifications.php | 71 ++ .../V2/CaseServiceClient/search_cases.php | 62 ++ .../V2/CaseServiceClient/update_case.php | 59 ++ .../CommentServiceClient/create_comment.php | 75 ++ .../V2/CommentServiceClient/get_comment.php | 100 +++ .../V2/CommentServiceClient/list_comments.php | 76 ++ .../create_support_event_subscription.php | 80 ++ .../delete_support_event_subscription.php | 76 ++ .../expunge_support_event_subscription.php | 104 +++ .../get_support_event_subscription.php | 76 ++ .../list_support_event_subscriptions.php | 77 ++ .../undelete_support_event_subscription.php | 76 ++ .../update_support_event_subscription.php | 74 ++ .../V2/Client/CaseAttachmentServiceClient.php | 409 ++++++++++ .../v2/src/V2/Client/CaseServiceClient.php | 542 +++++++++++++ .../v2/src/V2/Client/CommentServiceClient.php | 437 +++++++++++ .../SupportEventSubscriptionServiceClient.php | 480 ++++++++++++ .../Support/v2/src/V2/gapic_metadata.json | 145 ++++ ...case_attachment_service_client_config.json | 44 ++ ...e_attachment_service_descriptor_config.php | 68 ++ ..._attachment_service_rest_client_config.php | 57 ++ .../resources/case_service_client_config.json | 84 +++ .../case_service_descriptor_config.php | 148 ++++ .../case_service_rest_client_config.php | 161 ++++ .../comment_service_client_config.json | 59 ++ .../comment_service_descriptor_config.php | 80 ++ .../comment_service_rest_client_config.php | 76 ++ ...nt_subscription_service_client_config.json | 57 ++ ...subscription_service_descriptor_config.php | 125 +++ ...ubscription_service_rest_client_config.php | 111 +++ .../CaseAttachmentServiceClientTest.php | 241 ++++++ .../Unit/V2/Client/CaseServiceClientTest.php | 712 ++++++++++++++++++ .../V2/Client/CommentServiceClientTest.php | 316 ++++++++ ...portEventSubscriptionServiceClientTest.php | 584 ++++++++++++++ .../Google/Cloud/Support/V2Beta/Actor.php | 25 + .../Cloud/Support/V2Beta/Attachment.php | 28 + .../Support/V2Beta/AttachmentService.php | 29 + .../Cloud/Support/V2Beta/CaseService.php | 31 + .../Google/Cloud/Support/V2Beta/Comment.php | 28 + .../Cloud/Support/V2Beta/CommentService.php | 29 + .../Google/Cloud/Support/V2Beta/Content.php | 24 + .../Cloud/Support/V2Beta/EmailMessage.php | 29 + .../Cloud/Support/V2Beta/Escalation.php | 25 + .../Google/Cloud/Support/V2Beta/FeedItem.php | 29 + .../Cloud/Support/V2Beta/FeedService.php | 29 + .../Google/Cloud/Support/V2Beta/PBCase.php | 28 + .../V2Beta/SupportEventSubscription.php | 27 + .../SupportEventSubscriptionService.php | 30 + .../src/Google/Cloud/Support/V2beta/Actor.php | 222 ++++++ .../Cloud/Support/V2beta/Attachment.php | 267 +++++++ .../Support/V2beta/CaseClassification.php | 181 +++++ .../Cloud/Support/V2beta/CloseCaseRequest.php | 67 ++ .../Google/Cloud/Support/V2beta/Comment.php | 245 ++++++ .../Support/V2beta/CreateCaseRequest.php | 127 ++++ .../Support/V2beta/CreateCommentRequest.php | 127 ++++ .../CreateSupportEventSubscriptionRequest.php | 132 ++++ .../DeleteSupportEventSubscriptionRequest.php | 91 +++ .../Cloud/Support/V2beta/EmailMessage.php | 309 ++++++++ .../Support/V2beta/EscalateCaseRequest.php | 111 +++ .../Cloud/Support/V2beta/Escalation.php | 105 +++ .../Support/V2beta/Escalation/Reason.php | 69 ++ .../Google/Cloud/Support/V2beta/FeedItem.php | 221 ++++++ .../Support/V2beta/GetAttachmentRequest.php | 81 ++ .../Cloud/Support/V2beta/GetCaseRequest.php | 81 ++ .../Support/V2beta/GetCommentRequest.php | 81 ++ .../GetSupportEventSubscriptionRequest.php | 91 +++ .../Support/V2beta/ListAttachmentsRequest.php | 173 +++++ .../V2beta/ListAttachmentsResponse.php | 109 +++ .../Cloud/Support/V2beta/ListCasesRequest.php | 287 +++++++ .../Support/V2beta/ListCasesResponse.php | 113 +++ .../Support/V2beta/ListCommentsRequest.php | 153 ++++ .../Support/V2beta/ListCommentsResponse.php | 109 +++ .../ListSupportEventSubscriptionsRequest.php | 274 +++++++ .../ListSupportEventSubscriptionsResponse.php | 105 +++ .../Google/Cloud/Support/V2beta/PBCase.php | 654 ++++++++++++++++ .../Cloud/Support/V2beta/PBCase/Priority.php | 85 +++ .../Cloud/Support/V2beta/PBCase/State.php | 86 +++ .../Google/Cloud/Support/V2beta/Product.php | 67 ++ .../Cloud/Support/V2beta/ProductLine.php | 61 ++ .../SearchCaseClassificationsRequest.php | 191 +++++ .../SearchCaseClassificationsResponse.php | 109 +++ .../Support/V2beta/SearchCasesRequest.php | 317 ++++++++ .../Support/V2beta/SearchCasesResponse.php | 113 +++ .../Cloud/Support/V2beta/ShowFeedRequest.php | 208 +++++ .../Cloud/Support/V2beta/ShowFeedResponse.php | 109 +++ .../V2beta/SupportEventSubscription.php | 353 +++++++++ .../FailureReason.php | 70 ++ .../V2beta/SupportEventSubscription/State.php | 71 ++ .../Cloud/Support/V2beta/TextContent.php | 67 ++ ...ndeleteSupportEventSubscriptionRequest.php | 75 ++ .../Support/V2beta/UpdateCaseRequest.php | 167 ++++ .../UpdateSupportEventSubscriptionRequest.php | 146 ++++ .../get_attachment.php | 75 ++ .../list_attachments.php | 76 ++ .../V2beta/CaseServiceClient/close_case.php | 71 ++ .../V2beta/CaseServiceClient/create_case.php | 77 ++ .../CaseServiceClient/escalate_case.php | 77 ++ .../V2beta/CaseServiceClient/get_case.php | 71 ++ .../V2beta/CaseServiceClient/list_cases.php | 80 ++ .../search_case_classifications.php | 71 ++ .../V2beta/CaseServiceClient/search_cases.php | 62 ++ .../V2beta/CaseServiceClient/update_case.php | 59 ++ .../CommentServiceClient/create_comment.php | 75 ++ .../CommentServiceClient/get_comment.php | 71 ++ .../CommentServiceClient/list_comments.php | 76 ++ .../V2beta/FeedServiceClient/show_feed.php | 78 ++ .../create_support_event_subscription.php | 80 ++ .../delete_support_event_subscription.php | 76 ++ .../get_support_event_subscription.php | 76 ++ .../list_support_event_subscriptions.php | 77 ++ .../undelete_support_event_subscription.php | 76 ++ .../update_support_event_subscription.php | 74 ++ .../Client/CaseAttachmentServiceClient.php | 403 ++++++++++ .../src/V2beta/Client/CaseServiceClient.php | 576 ++++++++++++++ .../V2beta/Client/CommentServiceClient.php | 434 +++++++++++ .../src/V2beta/Client/FeedServiceClient.php | 306 ++++++++ .../SupportEventSubscriptionServiceClient.php | 446 +++++++++++ .../v2beta/src/V2beta/gapic_metadata.json | 154 ++++ ...case_attachment_service_client_config.json | 44 ++ ...e_attachment_service_descriptor_config.php | 68 ++ ..._attachment_service_rest_client_config.php | 57 ++ .../resources/case_service_client_config.json | 84 +++ .../case_service_descriptor_config.php | 148 ++++ .../case_service_rest_client_config.php | 161 ++++ .../comment_service_client_config.json | 59 ++ .../comment_service_descriptor_config.php | 80 ++ .../comment_service_rest_client_config.php | 76 ++ .../resources/feed_service_client_config.json | 39 + .../feed_service_descriptor_config.php | 53 ++ .../feed_service_rest_client_config.php | 46 ++ ...nt_subscription_service_client_config.json | 52 ++ ...subscription_service_descriptor_config.php | 113 +++ ...ubscription_service_rest_client_config.php | 99 +++ .../CaseAttachmentServiceClientTest.php | 241 ++++++ .../V2beta/Client/CaseServiceClientTest.php | 712 ++++++++++++++++++ .../Client/CommentServiceClientTest.php | 316 ++++++++ .../V2beta/Client/FeedServiceClientTest.php | 172 +++++ ...portEventSubscriptionServiceClientTest.php | 521 +++++++++++++ 193 files changed, 26782 insertions(+) create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CommentService.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php create mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php create mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php create mode 100644 owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php create mode 100644 owl-bot-staging/Support/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CommentService.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscriptionService.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Actor.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php new file mode 100644 index 000000000000..6a81217bb838 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xE2\x02\x0A#google/cloud/support/v2/actor.proto\x12\x17google.cloud.support.v2\"d\x0A\x05Actor\x12\x14\x0A\x0Cdisplay_name\x18\x01 \x01(\x09\x12\x11\x0A\x05email\x18\x02 \x01(\x09B\x02\x18\x01\x12\x1B\x0A\x0Egoogle_support\x18\x04 \x01(\x08B\x03\xE0A\x03\x12\x15\x0A\x08username\x18\x05 \x01(\x09B\x03\xE0A\x03B\xB3\x01\x0A\x1Bcom.google.cloud.support.v2B\x0AActorProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php new file mode 100644 index 000000000000..5c8e5e22e383 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xEE\x05\x0A(google/cloud/support/v2/attachment.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A#google/cloud/support/v2/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x84\x03\x0A\x0AAttachment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x07creator\x18\x03 \x01(\x0B2\x1E.google.cloud.support.v2.ActorB\x03\xE0A\x03\x12\x10\x0A\x08filename\x18\x04 \x01(\x09\x12\x16\x0A\x09mime_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Asize_bytes\x18\x06 \x01(\x03B\x03\xE0A\x03:\xB0\x01\xEAA\xAC\x01\x0A&cloudsupport.googleapis.com/Attachment\x12Eorganizations/{organization}/cases/{case}/attachments/{attachment_id}\x12;projects/{project}/cases/{case}/attachments/{attachment_id}B\xB8\x01\x0A\x1Bcom.google.cloud.support.v2B\x0FAttachmentProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php new file mode 100644 index 000000000000..1516fd0052ef --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xC2\x09\x0A0google/cloud/support/v2/attachment_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A(google/cloud/support/v2/attachment.proto\"y\x0A\x16ListAttachmentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"T\x0A\x14GetAttachmentRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&cloudsupport.googleapis.com/Attachment\"l\x0A\x17ListAttachmentsResponse\x128\x0A\x0Battachments\x18\x01 \x03(\x0B2#.google.cloud.support.v2.Attachment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xEC\x03\x0A\x15CaseAttachmentService\x12\xE6\x01\x0A\x0FListAttachments\x12/.google.cloud.support.v2.ListAttachmentsRequest\x1A0.google.cloud.support.v2.ListAttachmentsResponse\"p\xDAA\x06parent\x82\xD3\xE4\x93\x02a\x12+/v2/{parent=projects/*/cases/*}/attachmentsZ2\x120/v2/{parent=organizations/*/cases/*}/attachments\x12\x98\x01\x0A\x0DGetAttachment\x12-.google.cloud.support.v2.GetAttachmentRequest\x1A#.google.cloud.support.v2.Attachment\"3\xDAA\x04name\x82\xD3\xE4\x93\x02&\x12\$/v2/{name=*/*/cases/*/attachments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xBF\x01\x0A\x1Bcom.google.cloud.support.v2B\x16AttachmentServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php new file mode 100644 index 000000000000..5a6996bec887 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\xB8\x19\x0A*google/cloud/support/v2/case_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\"google/cloud/support/v2/case.proto\x1A(google/cloud/support/v2/escalation.proto\x1A google/protobuf/field_mask.proto\"H\x0A\x0EGetCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"\x7F\x0A\x11CreateCaseRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x120\x0A\x04case\x18\x02 \x01(\x0B2\x1D.google.cloud.support.v2.CaseB\x03\xE0A\x02\"\x83\x01\x0A\x10ListCasesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\"Z\x0A\x11ListCasesResponse\x12,\x0A\x05cases\x18\x01 \x03(\x0B2\x1D.google.cloud.support.v2.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"Z\x0A\x12SearchCasesRequest\x12\x0E\x0A\x06parent\x18\x04 \x01(\x09\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\\\x0A\x13SearchCasesResponse\x12,\x0A\x05cases\x18\x01 \x03(\x0B2\x1D.google.cloud.support.v2.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x86\x01\x0A\x13EscalateCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x127\x0A\x0Aescalation\x18\x02 \x01(\x0B2#.google.cloud.support.v2.Escalation\"v\x0A\x11UpdateCaseRequest\x120\x0A\x04case\x18\x01 \x01(\x0B2\x1D.google.cloud.support.v2.CaseB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"J\x0A\x10CloseCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"X\x0A SearchCaseClassificationsRequest\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x87\x01\x0A!SearchCaseClassificationsResponse\x12I\x0A\x14case_classifications\x18\x01 \x03(\x0B2+.google.cloud.support.v2.CaseClassification\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xCF\x0C\x0A\x0BCaseService\x12\xA5\x01\x0A\x07GetCase\x12'.google.cloud.support.v2.GetCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"R\xDAA\x04name\x82\xD3\xE4\x93\x02E\x12\x1D/v2/{name=projects/*/cases/*}Z\$\x12\"/v2/{name=organizations/*/cases/*}\x12\xB8\x01\x0A\x09ListCases\x12).google.cloud.support.v2.ListCasesRequest\x1A*.google.cloud.support.v2.ListCasesResponse\"T\xDAA\x06parent\x82\xD3\xE4\x93\x02E\x12\x1D/v2/{parent=projects/*}/casesZ\$\x12\"/v2/{parent=organizations/*}/cases\x12\xC3\x01\x0A\x0BSearchCases\x12+.google.cloud.support.v2.SearchCasesRequest\x1A,.google.cloud.support.v2.SearchCasesResponse\"Y\x82\xD3\xE4\x93\x02S\x12\$/v2/{parent=projects/*}/cases:searchZ+\x12)/v2/{parent=organizations/*}/cases:search\x12\xBE\x01\x0A\x0ACreateCase\x12*.google.cloud.support.v2.CreateCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"e\xDAA\x0Bparent,case\x82\xD3\xE4\x93\x02Q\"\x1D/v2/{parent=projects/*}/cases:\x04caseZ*\"\"/v2/{parent=organizations/*}/cases:\x04case\x12\xCD\x01\x0A\x0AUpdateCase\x12*.google.cloud.support.v2.UpdateCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"t\xDAA\x10case,update_mask\x82\xD3\xE4\x93\x02[2\"/v2/{case.name=projects/*/cases/*}:\x04caseZ/2'/v2/{case.name=organizations/*/cases/*}:\x04case\x12\xC0\x01\x0A\x0CEscalateCase\x12,.google.cloud.support.v2.EscalateCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"c\x82\xD3\xE4\x93\x02]\"&/v2/{name=projects/*/cases/*}:escalate:\x01*Z0\"+/v2/{name=organizations/*/cases/*}:escalate:\x01*\x12\xB4\x01\x0A\x09CloseCase\x12).google.cloud.support.v2.CloseCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"]\x82\xD3\xE4\x93\x02W\"#/v2/{name=projects/*/cases/*}:close:\x01*Z-\"(/v2/{name=organizations/*/cases/*}:close:\x01*\x12\xBA\x01\x0A\x19SearchCaseClassifications\x129.google.cloud.support.v2.SearchCaseClassificationsRequest\x1A:.google.cloud.support.v2.SearchCaseClassificationsResponse\"&\x82\xD3\xE4\x93\x02 \x12\x1E/v2/caseClassifications:search\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xB9\x01\x0A\x1Bcom.google.cloud.support.v2B\x10CaseServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php new file mode 100644 index 000000000000..18113ad5b3a7 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xBB\x05\x0A%google/cloud/support/v2/comment.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A#google/cloud/support/v2/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xD7\x02\x0A\x07Comment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x07creator\x18\x03 \x01(\x0B2\x1E.google.cloud.support.v2.ActorB\x03\xE0A\x03\x12\x0C\x0A\x04body\x18\x04 \x01(\x09\x12\x1E\x0A\x0Fplain_text_body\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03:\x9B\x01\xEAA\x97\x01\x0A#cloudsupport.googleapis.com/Comment\x12internalAddGeneratedFile( + "\x0A\xFA\x0B\x0A-google/cloud/support/v2/comment_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A%google/cloud/support/v2/comment.proto\"v\x0A\x13ListCommentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\"c\x0A\x14ListCommentsResponse\x122\x0A\x08comments\x18\x01 \x03(\x0B2 .google.cloud.support.v2.Comment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x88\x01\x0A\x14CreateCommentRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x126\x0A\x07comment\x18\x02 \x01(\x0B2 .google.cloud.support.v2.CommentB\x03\xE0A\x02\"N\x0A\x11GetCommentRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#cloudsupport.googleapis.com/Comment2\xB4\x05\x0A\x0ECommentService\x12\xD7\x01\x0A\x0CListComments\x12,.google.cloud.support.v2.ListCommentsRequest\x1A-.google.cloud.support.v2.ListCommentsResponse\"j\xDAA\x06parent\x82\xD3\xE4\x93\x02[\x12(/v2/{parent=projects/*/cases/*}/commentsZ/\x12-/v2/{parent=organizations/*/cases/*}/comments\x12\xE7\x01\x0A\x0DCreateComment\x12-.google.cloud.support.v2.CreateCommentRequest\x1A .google.cloud.support.v2.Comment\"\x84\x01\xDAA\x0Eparent,comment\x82\xD3\xE4\x93\x02m\"(/v2/{parent=projects/*/cases/*}/comments:\x07commentZ8\"-/v2/{parent=organizations/*/cases/*}/comments:\x07comment\x12\x8C\x01\x0A\x0AGetComment\x12*.google.cloud.support.v2.GetCommentRequest\x1A .google.cloud.support.v2.Comment\"0\xDAA\x04name\x82\xD3\xE4\x93\x02#\x12!/v2/{name=*/*/cases/*/comments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xBC\x01\x0A\x1Bcom.google.cloud.support.v2B\x13CommentServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php new file mode 100644 index 000000000000..3fe62b602963 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xD7\x03\x0A(google/cloud/support/v2/escalation.proto\x12\x17google.cloud.support.v2\"\xCE\x01\x0A\x0AEscalation\x12?\x0A\x06reason\x18\x04 \x01(\x0E2*.google.cloud.support.v2.Escalation.ReasonB\x03\xE0A\x02\x12\x1A\x0A\x0Djustification\x18\x05 \x01(\x09B\x03\xE0A\x02\"c\x0A\x06Reason\x12\x16\x0A\x12REASON_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FRESOLUTION_TIME\x10\x01\x12\x17\x0A\x13TECHNICAL_EXPERTISE\x10\x02\x12\x13\x0A\x0FBUSINESS_IMPACT\x10\x03B\xB8\x01\x0A\x1Bcom.google.cloud.support.v2B\x0FEscalationProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php new file mode 100644 index 000000000000..a841b40ecb03 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xFC\x09\x0A\"google/cloud/support/v2/case.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A#google/cloud/support/v2/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE6\x06\x0A\x04Case\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x12C\x0A\x0Eclassification\x18\x04 \x01(\x0B2+.google.cloud.support.v2.CaseClassification\x12\x11\x0A\x09time_zone\x18\x08 \x01(\x09\x12\"\x0A\x1Asubscriber_email_addresses\x18\x09 \x03(\x09\x127\x0A\x05state\x18\x0C \x01(\x0E2#.google.cloud.support.v2.Case.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x0D \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0E \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12/\x0A\x07creator\x18\x0F \x01(\x0B2\x1E.google.cloud.support.v2.Actor\x12\x15\x0A\x0Dcontact_email\x18# \x01(\x09\x12\x11\x0A\x09escalated\x18\x11 \x01(\x08\x12\x11\x0A\x09test_case\x18\x13 \x01(\x08\x12\x15\x0A\x0Dlanguage_code\x18\x17 \x01(\x09\x128\x0A\x08priority\x18 \x01(\x0E2&.google.cloud.support.v2.Case.Priority\"\x7F\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03NEW\x10\x01\x12\x1E\x0A\x1AIN_PROGRESS_GOOGLE_SUPPORT\x10\x02\x12\x13\x0A\x0FACTION_REQUIRED\x10\x03\x12\x15\x0A\x11SOLUTION_PROVIDED\x10\x04\x12\x0A\x0A\x06CLOSED\x10\x05\"L\x0A\x08Priority\x12\x18\x0A\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02P0\x10\x01\x12\x06\x0A\x02P1\x10\x02\x12\x06\x0A\x02P2\x10\x03\x12\x06\x0A\x02P3\x10\x04\x12\x06\x0A\x02P4\x10\x05:q\xEAAn\x0A cloudsupport.googleapis.com/Case\x12)organizations/{organization}/cases/{case}\x12\x1Fprojects/{project}/cases/{case}\"6\x0A\x12CaseClassification\x12\x0A\x0A\x02id\x18\x03 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\xB2\x01\x0A\x1Bcom.google.cloud.support.v2B\x09CaseProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php new file mode 100644 index 000000000000..23e8067b0f15 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xA4\x09\x0A8google/cloud/support/v2/support_event_subscription.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xC1\x06\x0A\x18SupportEventSubscription\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1A\x0A\x0Dpub_sub_topic\x18\x02 \x01(\x09B\x03\xE0A\x02\x12K\x0A\x05state\x18\x03 \x01(\x0E27.google.cloud.support.v2.SupportEventSubscription.StateB\x03\xE0A\x03\x12\\\x0A\x0Efailure_reason\x18\x04 \x01(\x0E2?.google.cloud.support.v2.SupportEventSubscription.FailureReasonB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bdelete_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x123\x0A\x0Apurge_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"E\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07WORKING\x10\x01\x12\x0B\x0A\x07FAILING\x10\x02\x12\x0B\x0A\x07DELETED\x10\x03\"f\x0A\x0DFailureReason\x12\x1E\x0A\x1AFAILURE_REASON_UNSPECIFIED\x10\x00\x12\x15\x0A\x11PERMISSION_DENIED\x10\x01\x12\x13\x0A\x0FTOPIC_NOT_FOUND\x10\x02\x12\x09\x0A\x05OTHER\x10\x03:\xC4\x01\xEAA\xC0\x01\x0A4cloudsupport.googleapis.com/SupportEventSubscription\x12Sorganizations/{organization}/supportEventSubscriptions/{support_event_subscription}*\x19supportEventSubscriptions2\x18supportEventSubscriptionB\xC6\x01\x0A\x1Bcom.google.cloud.support.v2B\x1DSupportEventSubscriptionProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php new file mode 100644 index 000000000000..bf830fd0b677 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\xED\x1B\x0A@google/cloud/support/v2/support_event_subscription_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A8google/cloud/support/v2/support_event_subscription.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\"\xD1\x01\x0A%CreateSupportEventSubscriptionRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124cloudsupport.googleapis.com/SupportEventSubscription\x12Z\x0A\x1Asupport_event_subscription\x18\x02 \x01(\x0B21.google.cloud.support.v2.SupportEventSubscriptionB\x03\xE0A\x02\"p\x0A\"GetSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"\xD5\x01\x0A\$ListSupportEventSubscriptionsRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124cloudsupport.googleapis.com/SupportEventSubscription\x12\x13\x0A\x06filter\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x19\x0A\x0Cshow_deleted\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\"\x98\x01\x0A%ListSupportEventSubscriptionsResponse\x12V\x0A\x1Bsupport_event_subscriptions\x18\x01 \x03(\x0B21.google.cloud.support.v2.SupportEventSubscription\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xB9\x01\x0A%UpdateSupportEventSubscriptionRequest\x12Z\x0A\x1Asupport_event_subscription\x18\x01 \x01(\x0B21.google.cloud.support.v2.SupportEventSubscriptionB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"s\x0A%DeleteSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"u\x0A'UndeleteSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"t\x0A&ExpungeSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription2\x92\x0E\x0A\x1FSupportEventSubscriptionService\x12\x93\x02\x0A\x1ECreateSupportEventSubscription\x12>.google.cloud.support.v2.CreateSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"~\xDAA!parent,support_event_subscription\x82\xD3\xE4\x93\x02T\"6/v2/{parent=organizations/*}/supportEventSubscriptions:\x1Asupport_event_subscription\x12\xD4\x01\x0A\x1BGetSupportEventSubscription\x12;.google.cloud.support.v2.GetSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\x126/v2/{name=organizations/*/supportEventSubscriptions/*}\x12\xE7\x01\x0A\x1DListSupportEventSubscriptions\x12=.google.cloud.support.v2.ListSupportEventSubscriptionsRequest\x1A>.google.cloud.support.v2.ListSupportEventSubscriptionsResponse\"G\xDAA\x06parent\x82\xD3\xE4\x93\x028\x126/v2/{parent=organizations/*}/supportEventSubscriptions\x12\xB4\x02\x0A\x1EUpdateSupportEventSubscription\x12>.google.cloud.support.v2.UpdateSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"\x9E\x01\xDAA&support_event_subscription,update_mask\x82\xD3\xE4\x93\x02o2Q/v2/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}:\x1Asupport_event_subscription\x12\xDA\x01\x0A\x1EDeleteSupportEventSubscription\x12>.google.cloud.support.v2.DeleteSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"E\xDAA\x04name\x82\xD3\xE4\x93\x028*6/v2/{name=organizations/*/supportEventSubscriptions/*}\x12\xE3\x01\x0A UndeleteSupportEventSubscription\x12@.google.cloud.support.v2.UndeleteSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"J\x82\xD3\xE4\x93\x02D\"?/v2/{name=organizations/*/supportEventSubscriptions/*}:undelete:\x01*\x12\xCC\x01\x0A\x1FExpungeSupportEventSubscription\x12?.google.cloud.support.v2.ExpungeSupportEventSubscriptionRequest\x1A\x16.google.protobuf.Empty\"P\xDAA\x04name\x82\xD3\xE4\x93\x02C\">/v2/{name=organizations/*/supportEventSubscriptions/*}:expunge:\x01*\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Bcom.google.cloud.support.v2B\$SupportEventSubscriptionServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php new file mode 100644 index 000000000000..57386d9ba65c --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php @@ -0,0 +1,222 @@ +google.cloud.support.v2.Actor + */ +class Actor extends \Google\Protobuf\Internal\Message +{ + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * + * Generated from protobuf field string email = 2 [deprecated = true]; + * @deprecated + */ + protected $email = ''; + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_support = false; + /** + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * + * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $username = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * @type string $email + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * @type bool $google_support + * Output only. Whether the actor is a Google support actor. + * @type string $username + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\Actor::initOnce(); + parent::__construct($data); + } + + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * + * Generated from protobuf field string email = 2 [deprecated = true]; + * @return string + * @deprecated + */ + public function getEmail() + { + if ($this->email !== '') { + @trigger_error('email is deprecated.', E_USER_DEPRECATED); + } + return $this->email; + } + + /** + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * + * Generated from protobuf field string email = 2 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setEmail($var) + { + @trigger_error('email is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGoogleSupport() + { + return $this->google_support; + } + + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGoogleSupport($var) + { + GPBUtil::checkBool($var); + $this->google_support = $var; + + return $this; + } + + /** + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * + * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * + * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php new file mode 100644 index 000000000000..d6da92e2a525 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php @@ -0,0 +1,267 @@ +google.cloud.support.v2.Attachment + */ +class Attachment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The time at which the attachment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = null; + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + */ + protected $filename = ''; + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $mime_type = ''; + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. The resource name of the attachment. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the attachment was created. + * @type \Google\Cloud\Support\V2\Actor $creator + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * @type string $filename + * The filename of the attachment (e.g. `"graph.jpg"`). + * @type string $mime_type + * Output only. The MIME type of the attachment (e.g. text/plain). + * @type int|string $size_bytes + * Output only. The size of the attachment in bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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. The time at which the attachment was created. + * + * 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. The time at which the attachment was created. + * + * 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. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + * @return string + */ + public function getFilename() + { + return $this->filename; + } + + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + * @param string $var + * @return $this + */ + public function setFilename($var) + { + GPBUtil::checkString($var, True); + $this->filename = $var; + + return $this; + } + + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->size_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php new file mode 100644 index 000000000000..026ffb5c3278 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php @@ -0,0 +1,137 @@ +google.cloud.support.v2.CaseClassification + */ +class CaseClassification extends \Google\Protobuf\Internal\Message +{ + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * + * Generated from protobuf field string id = 3; + */ + protected $id = ''; + /** + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * @type string $display_name + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\PBCase::initOnce(); + parent::__construct($data); + } + + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * + * Generated from protobuf field string id = 3; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * + * Generated from protobuf field string id = 3; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * + * Generated from protobuf field string display_name = 4; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php new file mode 100644 index 000000000000..7a5f629348a4 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php @@ -0,0 +1,67 @@ +google.cloud.support.v2.CloseCaseRequest + */ +class CloseCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case to close. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the case to close. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case to close. + * + * 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 name of the case to close. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php new file mode 100644 index 000000000000..9aeb311e6952 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php @@ -0,0 +1,245 @@ +google.cloud.support.v2.Comment + */ +class Comment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. The resource name of the comment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The time when the comment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The user or Google Support agent who created the comment. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = null; + /** + * The full comment body. + * Maximum of 12800 characters. + * + * Generated from protobuf field string body = 4; + */ + protected $body = ''; + /** + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * + * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $plain_text_body = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. The resource name of the comment. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the comment was created. + * @type \Google\Cloud\Support\V2\Actor $creator + * Output only. The user or Google Support agent who created the comment. + * @type string $body + * The full comment body. + * Maximum of 12800 characters. + * @type string $plain_text_body + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\Comment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. The resource name of the comment. + * + * 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. The resource name of the comment. + * + * 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; + } + + /** + * Output only. The time when the comment was created. + * + * 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. The time when the comment was created. + * + * 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. The user or Google Support agent who created the comment. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * Output only. The user or Google Support agent who created the comment. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * The full comment body. + * Maximum of 12800 characters. + * + * Generated from protobuf field string body = 4; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * The full comment body. + * Maximum of 12800 characters. + * + * Generated from protobuf field string body = 4; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + + /** + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * + * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + * @deprecated + */ + public function getPlainTextBody() + { + if ($this->plain_text_body !== '') { + @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); + } + return $this->plain_text_body; + } + + /** + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * + * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + * @deprecated + */ + public function setPlainTextBody($var) + { + @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->plain_text_body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php new file mode 100644 index 000000000000..2df993059685 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php @@ -0,0 +1,127 @@ +google.cloud.support.v2.CreateCaseRequest + */ +class CreateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent under which the case should be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The case to be created. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $case = null; + + /** + * @param string $parent Required. The name of the parent under which the case should be created. Please see + * {@see CaseServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\Support\V2\PBCase $case Required. The case to be created. + * + * @return \Google\Cloud\Support\V2\CreateCaseRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2\PBCase $case): self + { + return (new self()) + ->setParent($parent) + ->setCase($case); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent under which the case should be created. + * @type \Google\Cloud\Support\V2\PBCase $case + * Required. The case to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent under which the case should be created. + * + * 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 name of the parent under which the case should be created. + * + * 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 case to be created. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\PBCase|null + */ + public function getCase() + { + return $this->case; + } + + public function hasCase() + { + return isset($this->case); + } + + public function clearCase() + { + unset($this->case); + } + + /** + * Required. The case to be created. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\PBCase $var + * @return $this + */ + public function setCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\PBCase::class); + $this->case = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php new file mode 100644 index 000000000000..192221045eb4 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php @@ -0,0 +1,127 @@ +google.cloud.support.v2.CreateCommentRequest + */ +class CreateCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case to which the comment should be added. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The comment to be added. + * + * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $comment = null; + + /** + * @param string $parent Required. The name of the case to which the comment should be added. Please see + * {@see CommentServiceClient::caseName()} for help formatting this field. + * @param \Google\Cloud\Support\V2\Comment $comment Required. The comment to be added. + * + * @return \Google\Cloud\Support\V2\CreateCommentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2\Comment $comment): self + { + return (new self()) + ->setParent($parent) + ->setComment($comment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the case to which the comment should be added. + * @type \Google\Cloud\Support\V2\Comment $comment + * Required. The comment to be added. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case to which the comment should be added. + * + * 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 name of the case to which the comment should be added. + * + * 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 comment to be added. + * + * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\Comment|null + */ + public function getComment() + { + return $this->comment; + } + + public function hasComment() + { + return isset($this->comment); + } + + public function clearComment() + { + unset($this->comment); + } + + /** + * Required. The comment to be added. + * + * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\Comment $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Comment::class); + $this->comment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..0ec88c1c9e3f --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php @@ -0,0 +1,132 @@ +google.cloud.support.v2.CreateSupportEventSubscriptionRequest + */ +class CreateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Pub/Sub configuration to create. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $support_event_subscription = null; + + /** + * @param string $parent Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_id} + * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. + * @param \Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription Required. The Pub/Sub configuration to create. + * + * @return \Google\Cloud\Support\V2\CreateSupportEventSubscriptionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription): self + { + return (new self()) + ->setParent($parent) + ->setSupportEventSubscription($supportEventSubscription); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_id} + * @type \Google\Cloud\Support\V2\SupportEventSubscription $support_event_subscription + * Required. The Pub/Sub configuration to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_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 parent resource name where the support event subscription + * will be created. Format: organizations/{organization_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 Pub/Sub configuration to create. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\SupportEventSubscription|null + */ + public function getSupportEventSubscription() + { + return $this->support_event_subscription; + } + + public function hasSupportEventSubscription() + { + return isset($this->support_event_subscription); + } + + public function clearSupportEventSubscription() + { + unset($this->support_event_subscription); + } + + /** + * Required. The Pub/Sub configuration to create. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\SupportEventSubscription $var + * @return $this + */ + public function setSupportEventSubscription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\SupportEventSubscription::class); + $this->support_event_subscription = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..3ee310ad6372 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php @@ -0,0 +1,91 @@ +google.cloud.support.v2.DeleteSupportEventSubscriptionRequest + */ +class DeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\DeleteSupportEventSubscriptionRequest + * + * @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 name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php new file mode 100644 index 000000000000..bf49626249e1 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php @@ -0,0 +1,111 @@ +google.cloud.support.v2.EscalateCaseRequest + */ +class EscalateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case to be escalated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The escalation information to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; + */ + protected $escalation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the case to be escalated. + * @type \Google\Cloud\Support\V2\Escalation $escalation + * The escalation information to be sent with the escalation request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case to be escalated. + * + * 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 name of the case to be escalated. + * + * 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; + } + + /** + * The escalation information to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; + * @return \Google\Cloud\Support\V2\Escalation|null + */ + public function getEscalation() + { + return $this->escalation; + } + + public function hasEscalation() + { + return isset($this->escalation); + } + + public function clearEscalation() + { + unset($this->escalation); + } + + /** + * The escalation information to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; + * @param \Google\Cloud\Support\V2\Escalation $var + * @return $this + */ + public function setEscalation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Escalation::class); + $this->escalation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php new file mode 100644 index 000000000000..b91391678282 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php @@ -0,0 +1,105 @@ +google.cloud.support.v2.Escalation + */ +class Escalation extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reason = 0; + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $justification = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $reason + * Required. The reason why the Case is being escalated. + * @type string $justification + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\Escalation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReason() + { + return $this->reason; + } + + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\Escalation\Reason::class); + $this->reason = $var; + + return $this; + } + + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getJustification() + { + return $this->justification; + } + + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setJustification($var) + { + GPBUtil::checkString($var, True); + $this->justification = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php new file mode 100644 index 000000000000..eeb6557770a8 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php @@ -0,0 +1,69 @@ +google.cloud.support.v2.Escalation.Reason + */ +class Reason +{ + /** + * The escalation reason is in an unknown state or has not been specified. + * + * Generated from protobuf enum REASON_UNSPECIFIED = 0; + */ + const REASON_UNSPECIFIED = 0; + /** + * The case is taking too long to resolve. + * + * Generated from protobuf enum RESOLUTION_TIME = 1; + */ + const RESOLUTION_TIME = 1; + /** + * The support agent does not have the expertise required to successfully + * resolve the issue. + * + * Generated from protobuf enum TECHNICAL_EXPERTISE = 2; + */ + const TECHNICAL_EXPERTISE = 2; + /** + * The issue is having a significant business impact. + * + * Generated from protobuf enum BUSINESS_IMPACT = 3; + */ + const BUSINESS_IMPACT = 3; + + private static $valueToName = [ + self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', + self::RESOLUTION_TIME => 'RESOLUTION_TIME', + self::TECHNICAL_EXPERTISE => 'TECHNICAL_EXPERTISE', + self::BUSINESS_IMPACT => 'BUSINESS_IMPACT', + ]; + + 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/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..d7899204f5f3 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php @@ -0,0 +1,91 @@ +google.cloud.support.v2.ExpungeSupportEventSubscriptionRequest + */ +class ExpungeSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ExpungeSupportEventSubscriptionRequest + * + * @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 name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php new file mode 100644 index 000000000000..df615006a628 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2.GetAttachmentRequest + */ +class GetAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the attachment to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the attachment to get. Please see + * {@see CaseAttachmentServiceClient::attachmentName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\GetAttachmentRequest + * + * @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 name of the attachment to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the attachment to get. + * + * 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 name of the attachment to get. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php new file mode 100644 index 000000000000..3ea4719976be --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2.GetCaseRequest + */ +class GetCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of a case to be retrieved. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full name of a case to be retrieved. Please see + * {@see CaseServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\GetCaseRequest + * + * @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 full name of a case to be retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of a case to be retrieved. + * + * 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 full name of a case to be retrieved. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php new file mode 100644 index 000000000000..d2544235252a --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2.GetCommentRequest + */ +class GetCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the comment to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the comment to retrieve. Please see + * {@see CommentServiceClient::commentName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\GetCommentRequest + * + * @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 name of the comment to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the comment to retrieve. + * + * 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 name of the comment to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..b11239ed6f1a --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php @@ -0,0 +1,91 @@ +google.cloud.support.v2.GetSupportEventSubscriptionRequest + */ +class GetSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\GetSupportEventSubscriptionRequest + * + * @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 name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php new file mode 100644 index 000000000000..a7c951278243 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php @@ -0,0 +1,173 @@ +google.cloud.support.v2.ListAttachmentsRequest + */ +class ListAttachmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case for which attachments should be listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the case for which attachments should be listed. Please see + * {@see CaseAttachmentServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ListAttachmentsRequest + * + * @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 name of the case for which attachments should be listed. + * @type int $page_size + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case for which attachments should be listed. + * + * 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 name of the case for which attachments should be listed. + * + * 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; + } + + /** + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @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/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php new file mode 100644 index 000000000000..9336b1b9d73d --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2.ListAttachmentsResponse + */ +class ListAttachmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of attachments associated with a case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; + */ + private $attachments; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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\Support\V2\Attachment[] $attachments + * The list of attachments associated with a case. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * The list of attachments associated with a case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; + * @return RepeatedField<\Google\Cloud\Support\V2\Attachment> + */ + public function getAttachments() + { + return $this->attachments; + } + + /** + * The list of attachments associated with a case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; + * @param \Google\Cloud\Support\V2\Attachment[] $var + * @return $this + */ + public function setAttachments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\Attachment::class); + $this->attachments = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php new file mode 100644 index 000000000000..fb33eba6e001 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php @@ -0,0 +1,239 @@ +google.cloud.support.v2.ListCasesRequest + */ +class ListCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of a parent to list cases under. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of a parent to list cases under. Please see + * {@see CaseServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ListCasesRequest + * + * @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 name of a parent to list cases under. + * @type string $filter + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * @type int $page_size + * The maximum number of cases fetched with each request. Defaults to 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of a parent to list cases under. + * + * 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 name of a parent to list cases under. + * + * 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; + } + + /** + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + * @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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php new file mode 100644 index 000000000000..497f1d847c23 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php @@ -0,0 +1,113 @@ +google.cloud.support.v2.ListCasesResponse + */ +class ListCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + */ + private $cases; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * + * 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\Support\V2\PBCase[] $cases + * The list of cases associated with the parent after any + * filters have been applied. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + * @return RepeatedField<\Google\Cloud\Support\V2\PBCase> + */ + public function getCases() + { + return $this->cases; + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + * @param \Google\Cloud\Support\V2\PBCase[] $var + * @return $this + */ + public function setCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\PBCase::class); + $this->cases = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php new file mode 100644 index 000000000000..cdbbfb140003 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php @@ -0,0 +1,153 @@ +google.cloud.support.v2.ListCommentsRequest + */ +class ListCommentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case for which to list comments. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of comments to fetch. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the case for which to list comments. Please see + * {@see CommentServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ListCommentsRequest + * + * @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 name of the case for which to list comments. + * @type int $page_size + * The maximum number of comments to fetch. Defaults to 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case for which to list comments. + * + * 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 name of the case for which to list comments. + * + * 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; + } + + /** + * The maximum number of comments to fetch. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of comments to fetch. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * + * Generated from protobuf field string page_token = 5; + * @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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php new file mode 100644 index 000000000000..a1e1e711abce --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2.ListCommentsResponse + */ +class ListCommentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of the comments associated with the case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; + */ + private $comments; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * + * 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\Support\V2\Comment[] $comments + * List of the comments associated with the case. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * List of the comments associated with the case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; + * @return RepeatedField<\Google\Cloud\Support\V2\Comment> + */ + public function getComments() + { + return $this->comments; + } + + /** + * List of the comments associated with the case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; + * @param \Google\Cloud\Support\V2\Comment[] $var + * @return $this + */ + public function setComments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\Comment::class); + $this->comments = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php new file mode 100644 index 000000000000..f4c0087d1a5a --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php @@ -0,0 +1,274 @@ +google.cloud.support.v2.ListSupportEventSubscriptionsRequest + */ +class ListSupportEventSubscriptionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * + * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_deleted = false; + /** + * Optional. The maximum number of support event subscriptions to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_id} + * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ListSupportEventSubscriptionsRequest + * + * @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 fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_id} + * @type string $filter + * Optional. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * @type bool $show_deleted + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * @type int $page_size + * Optional. The maximum number of support event subscriptions to return. + * @type string $page_token + * Optional. A token identifying the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_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 fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_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. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * + * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * + * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + + /** + * Optional. The maximum number of support event subscriptions to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of support event subscriptions to return. + * + * 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 the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * + * 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 the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php new file mode 100644 index 000000000000..5b05a2a149f1 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.support.v2.ListSupportEventSubscriptionsResponse + */ +class ListSupportEventSubscriptionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The support event subscriptions. + * + * Generated from protobuf field repeated .google.cloud.support.v2.SupportEventSubscription support_event_subscriptions = 1; + */ + private $support_event_subscriptions; + /** + * A token, which can be sent 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\Support\V2\SupportEventSubscription[] $support_event_subscriptions + * The support event subscriptions. + * @type string $next_page_token + * A token, which can be sent 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\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * The support event subscriptions. + * + * Generated from protobuf field repeated .google.cloud.support.v2.SupportEventSubscription support_event_subscriptions = 1; + * @return RepeatedField<\Google\Cloud\Support\V2\SupportEventSubscription> + */ + public function getSupportEventSubscriptions() + { + return $this->support_event_subscriptions; + } + + /** + * The support event subscriptions. + * + * Generated from protobuf field repeated .google.cloud.support.v2.SupportEventSubscription support_event_subscriptions = 1; + * @param \Google\Cloud\Support\V2\SupportEventSubscription[] $var + * @return $this + */ + public function setSupportEventSubscriptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\SupportEventSubscription::class); + $this->support_event_subscriptions = $arr; + + return $this; + } + + /** + * A token, which can be sent 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, which can be sent 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/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php new file mode 100644 index 000000000000..b52e863e405a --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php @@ -0,0 +1,654 @@ +google.cloud.support.v2.Case + */ +class PBCase extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name for the case. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; + */ + protected $classification = null; + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + */ + protected $time_zone = ''; + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + */ + private $subscriber_email_addresses; + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; + */ + protected $creator = null; + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + */ + protected $contact_email = ''; + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + */ + protected $escalated = false; + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + */ + protected $test_case = false; + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + */ + protected $language_code = ''; + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; + */ + protected $priority = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name for the case. + * @type string $display_name + * The short summary of the issue reported in this case. + * @type string $description + * A broad description of the issue. + * @type \Google\Cloud\Support\V2\CaseClassification $classification + * The issue classification applicable to this case. + * @type string $time_zone + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * @type string[] $subscriber_email_addresses + * The email addresses to receive updates on this case. + * @type int $state + * Output only. The current status of the support case. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time this case was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time this case was last updated. + * @type \Google\Cloud\Support\V2\Actor $creator + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * @type string $contact_email + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * @type bool $escalated + * Whether the case is currently escalated. + * @type bool $test_case + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * @type string $language_code + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * @type int $priority + * The priority of this case. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\PBCase::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name for the case. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name for the case. + * + * 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; + } + + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; + * @return \Google\Cloud\Support\V2\CaseClassification|null + */ + public function getClassification() + { + return $this->classification; + } + + public function hasClassification() + { + return isset($this->classification); + } + + public function clearClassification() + { + unset($this->classification); + } + + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; + * @param \Google\Cloud\Support\V2\CaseClassification $var + * @return $this + */ + public function setClassification($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\CaseClassification::class); + $this->classification = $var; + + return $this; + } + + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + * @return RepeatedField + */ + public function getSubscriberEmailAddresses() + { + return $this->subscriber_email_addresses; + } + + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + * @param string[] $var + * @return $this + */ + public function setSubscriberEmailAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->subscriber_email_addresses = $arr; + + return $this; + } + + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\PBCase\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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. The time this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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; + } + + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; + * @return \Google\Cloud\Support\V2\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; + * @param \Google\Cloud\Support\V2\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + * @return string + */ + public function getContactEmail() + { + return $this->contact_email; + } + + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + * @param string $var + * @return $this + */ + public function setContactEmail($var) + { + GPBUtil::checkString($var, True); + $this->contact_email = $var; + + return $this; + } + + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + * @return bool + */ + public function getEscalated() + { + return $this->escalated; + } + + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + * @param bool $var + * @return $this + */ + public function setEscalated($var) + { + GPBUtil::checkBool($var); + $this->escalated = $var; + + return $this; + } + + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + * @return bool + */ + public function getTestCase() + { + return $this->test_case; + } + + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + * @param bool $var + * @return $this + */ + public function setTestCase($var) + { + GPBUtil::checkBool($var); + $this->test_case = $var; + + return $this; + } + + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\PBCase\Priority::class); + $this->priority = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php new file mode 100644 index 000000000000..617441f6d2b3 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php @@ -0,0 +1,85 @@ +google.cloud.support.v2.Case.Priority + */ +class Priority +{ + /** + * Priority is undefined or has not been set yet. + * + * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; + */ + const PRIORITY_UNSPECIFIED = 0; + /** + * Extreme impact on a production service. Service is hard down. + * + * Generated from protobuf enum P0 = 1; + */ + const P0 = 1; + /** + * Critical impact on a production service. Service is currently unusable. + * + * Generated from protobuf enum P1 = 2; + */ + const P1 = 2; + /** + * Severe impact on a production service. Service is usable but greatly + * impaired. + * + * Generated from protobuf enum P2 = 3; + */ + const P2 = 3; + /** + * Medium impact on a production service. Service is available, but + * moderately impaired. + * + * Generated from protobuf enum P3 = 4; + */ + const P3 = 4; + /** + * General questions or minor issues. Production service is fully + * available. + * + * Generated from protobuf enum P4 = 5; + */ + const P4 = 5; + + private static $valueToName = [ + self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', + self::P0 => 'P0', + self::P1 => 'P1', + self::P2 => 'P2', + self::P3 => 'P3', + self::P4 => 'P4', + ]; + + 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/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php new file mode 100644 index 000000000000..9a4a8304d949 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php @@ -0,0 +1,86 @@ +google.cloud.support.v2.Case.State + */ +class State +{ + /** + * Case is in an unknown state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The case has been created but no one is assigned to work on it yet. + * + * Generated from protobuf enum NEW = 1; + */ + const PBNEW = 1; + /** + * The case is currently being handled by Google support. + * + * Generated from protobuf enum IN_PROGRESS_GOOGLE_SUPPORT = 2; + */ + const IN_PROGRESS_GOOGLE_SUPPORT = 2; + /** + * Google is waiting for a response. + * + * Generated from protobuf enum ACTION_REQUIRED = 3; + */ + const ACTION_REQUIRED = 3; + /** + * A solution has been offered for the case, but it isn't yet closed. + * + * Generated from protobuf enum SOLUTION_PROVIDED = 4; + */ + const SOLUTION_PROVIDED = 4; + /** + * The case has been resolved. + * + * Generated from protobuf enum CLOSED = 5; + */ + const CLOSED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PBNEW => 'NEW', + self::IN_PROGRESS_GOOGLE_SUPPORT => 'IN_PROGRESS_GOOGLE_SUPPORT', + self::ACTION_REQUIRED => 'ACTION_REQUIRED', + self::SOLUTION_PROVIDED => 'SOLUTION_PROVIDED', + 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)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php new file mode 100644 index 000000000000..b2951a27d2b8 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php @@ -0,0 +1,147 @@ +google.cloud.support.v2.SearchCaseClassificationsRequest + */ +class SearchCaseClassificationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + /** + * The maximum number of classifications fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * @type int $page_size + * The maximum number of classifications fetched with each request. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The maximum number of classifications fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of classifications fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php new file mode 100644 index 000000000000..01ddd091da7e --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2.SearchCaseClassificationsResponse + */ +class SearchCaseClassificationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; + */ + private $case_classifications; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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\Support\V2\CaseClassification[] $case_classifications + * The classifications retrieved. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; + * @return RepeatedField<\Google\Cloud\Support\V2\CaseClassification> + */ + public function getCaseClassifications() + { + return $this->case_classifications; + } + + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; + * @param \Google\Cloud\Support\V2\CaseClassification[] $var + * @return $this + */ + public function setCaseClassifications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\CaseClassification::class); + $this->case_classifications = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php new file mode 100644 index 000000000000..7fee30e6b0e2 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php @@ -0,0 +1,317 @@ +google.cloud.support.v2.SearchCasesRequest + */ +class SearchCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the parent resource to search for cases under. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + /** + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The name of the parent resource to search for cases under. + * @type string $query + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * @type int $page_size + * The maximum number of cases fetched with each request. The default page + * size is 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the parent resource to search for cases under. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The name of the parent resource to search for cases under. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php new file mode 100644 index 000000000000..d8dbd382a842 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php @@ -0,0 +1,113 @@ +google.cloud.support.v2.SearchCasesResponse + */ +class SearchCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + */ + private $cases; + /** + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * + * 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\Support\V2\PBCase[] $cases + * The list of cases associated with the parent after any + * filters have been applied. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + * @return RepeatedField<\Google\Cloud\Support\V2\PBCase> + */ + public function getCases() + { + return $this->cases; + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + * @param \Google\Cloud\Support\V2\PBCase[] $var + * @return $this + */ + public function setCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\PBCase::class); + $this->cases = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php new file mode 100644 index 000000000000..7cd1a7511a20 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php @@ -0,0 +1,353 @@ +google.cloud.support.v2.SupportEventSubscription + */ +class SupportEventSubscription extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the support event subscription. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * + * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pub_sub_topic = ''; + /** + * Output only. The state of the subscription. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failure_reason = 0; + /** + * Output only. The time at which the subscription was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which the subscription was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The time at which the subscription was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. The time at which the subscription will be purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $purge_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the support event subscription. + * @type string $pub_sub_topic + * Required. The name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * @type int $state + * Output only. The state of the subscription. + * @type int $failure_reason + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the subscription was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which the subscription was last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The time at which the subscription was deleted. + * @type \Google\Protobuf\Timestamp $purge_time + * Output only. The time at which the subscription will be purged. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscription::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the support event subscription. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the support event subscription. + * + * 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 name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * + * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPubSubTopic() + { + return $this->pub_sub_topic; + } + + /** + * Required. The name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * + * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPubSubTopic($var) + { + GPBUtil::checkString($var, True); + $this->pub_sub_topic = $var; + + return $this; + } + + /** + * Output only. The state of the subscription. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the subscription. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\SupportEventSubscription\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFailureReason() + { + return $this->failure_reason; + } + + /** + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFailureReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\SupportEventSubscription\FailureReason::class); + $this->failure_reason = $var; + + return $this; + } + + /** + * Output only. The time at which the subscription was created. + * + * 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. The time at which the subscription was created. + * + * 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. The time at which the subscription was last updated. + * + * 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. The time at which the subscription was last updated. + * + * 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. The time at which the subscription was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The time at which the subscription was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. The time at which the subscription will be purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPurgeTime() + { + return $this->purge_time; + } + + public function hasPurgeTime() + { + return isset($this->purge_time); + } + + public function clearPurgeTime() + { + unset($this->purge_time); + } + + /** + * Output only. The time at which the subscription will be purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPurgeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->purge_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php new file mode 100644 index 000000000000..d0e213d58cfa --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php @@ -0,0 +1,70 @@ +google.cloud.support.v2.SupportEventSubscription.FailureReason + */ +class FailureReason +{ + /** + * Unspecified failure reason. + * + * Generated from protobuf enum FAILURE_REASON_UNSPECIFIED = 0; + */ + const FAILURE_REASON_UNSPECIFIED = 0; + /** + * The service account (i.e. + * cloud-support-apievents\@system.gserviceaccount.com) lacks the permission + * to publish to the customer's Pub/Sub topic. + * + * Generated from protobuf enum PERMISSION_DENIED = 1; + */ + const PERMISSION_DENIED = 1; + /** + * The specified Pub/Sub topic does not exist. + * + * Generated from protobuf enum TOPIC_NOT_FOUND = 2; + */ + const TOPIC_NOT_FOUND = 2; + /** + * Message failed to publish due to a system-side error. + * + * Generated from protobuf enum OTHER = 3; + */ + const OTHER = 3; + + private static $valueToName = [ + self::FAILURE_REASON_UNSPECIFIED => 'FAILURE_REASON_UNSPECIFIED', + self::PERMISSION_DENIED => 'PERMISSION_DENIED', + self::TOPIC_NOT_FOUND => 'TOPIC_NOT_FOUND', + self::OTHER => 'OTHER', + ]; + + 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/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php new file mode 100644 index 000000000000..a06e2d1706c0 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php @@ -0,0 +1,71 @@ +google.cloud.support.v2.SupportEventSubscription.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Subscription is active and working. + * + * Generated from protobuf enum WORKING = 1; + */ + const WORKING = 1; + /** + * Subscription is failing. Notifications cannot be published for some + * reason. + * + * Generated from protobuf enum FAILING = 2; + */ + const FAILING = 2; + /** + * Subscription has been deleted and is pending purge. Notifications are not + * sent for deleted subscriptions. Deleted subscriptions are purged after + * their `purge_time` has passed. + * + * Generated from protobuf enum DELETED = 3; + */ + const DELETED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::WORKING => 'WORKING', + self::FAILING => 'FAILING', + 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/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..3277fa4eab91 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php @@ -0,0 +1,75 @@ +google.cloud.support.v2.UndeleteSupportEventSubscriptionRequest + */ +class UndeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php new file mode 100644 index 000000000000..7927f7822642 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php @@ -0,0 +1,167 @@ +google.cloud.support.v2.UpdateCaseRequest + */ +class UpdateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The case to update. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $case = null; + /** + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Support\V2\PBCase $case Required. The case to update. + * @param \Google\Protobuf\FieldMask $updateMask A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * @return \Google\Cloud\Support\V2\UpdateCaseRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Support\V2\PBCase $case, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCase($case) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Support\V2\PBCase $case + * Required. The case to update. + * @type \Google\Protobuf\FieldMask $update_mask + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The case to update. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\PBCase|null + */ + public function getCase() + { + return $this->case; + } + + public function hasCase() + { + return isset($this->case); + } + + public function clearCase() + { + unset($this->case); + } + + /** + * Required. The case to update. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\PBCase $var + * @return $this + */ + public function setCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\PBCase::class); + $this->case = $var; + + return $this; + } + + /** + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @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); + } + + /** + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @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/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..b6193ba06d07 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php @@ -0,0 +1,146 @@ +google.cloud.support.v2.UpdateSupportEventSubscriptionRequest + */ +class UpdateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $support_event_subscription = null; + /** + * Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * @return \Google\Cloud\Support\V2\UpdateSupportEventSubscriptionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSupportEventSubscription($supportEventSubscription) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Support\V2\SupportEventSubscription $support_event_subscription + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\SupportEventSubscription|null + */ + public function getSupportEventSubscription() + { + return $this->support_event_subscription; + } + + public function hasSupportEventSubscription() + { + return isset($this->support_event_subscription); + } + + public function clearSupportEventSubscription() + { + unset($this->support_event_subscription); + } + + /** + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\SupportEventSubscription $var + * @return $this + */ + public function setSupportEventSubscription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\SupportEventSubscription::class); + $this->support_event_subscription = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * 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. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * 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/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php new file mode 100644 index 000000000000..046a8aedb81e --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php @@ -0,0 +1,105 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Attachment $response */ + $response = $caseAttachmentServiceClient->getAttachment($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 = CaseAttachmentServiceClient::attachmentName( + '[ORGANIZATION]', + '[CASE]', + '[ATTACHMENT_ID]' + ); + + get_attachment_sample($formattedName); +} +// [END cloudsupport_v2_generated_CaseAttachmentService_GetAttachment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php new file mode 100644 index 000000000000..2f5f6c15522a --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseAttachmentServiceClient->listAttachments($request); + + /** @var Attachment $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 = CaseAttachmentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + list_attachments_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CaseAttachmentService_ListAttachments_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php new file mode 100644 index 000000000000..abe7fa02e037 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->closeCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + close_case_sample($formattedName); +} +// [END cloudsupport_v2_generated_CaseService_CloseCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php new file mode 100644 index 000000000000..bfa24805b97a --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setCase($case); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->createCase($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 +{ + $formattedParent = CaseServiceClient::projectName('[PROJECT]'); + + create_case_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CaseService_CreateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php new file mode 100644 index 000000000000..ff978d1bbba7 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->escalateCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + escalate_case_sample($formattedName); +} +// [END cloudsupport_v2_generated_CaseService_EscalateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php new file mode 100644 index 000000000000..c74fae332e8e --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->getCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + get_case_sample($formattedName); +} +// [END cloudsupport_v2_generated_CaseService_GetCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php new file mode 100644 index 000000000000..7889879da0e0 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseServiceClient->listCases($request); + + /** @var PBCase $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 = CaseServiceClient::projectName('[PROJECT]'); + + list_cases_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CaseService_ListCases_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php new file mode 100644 index 000000000000..6531ad0432f3 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php @@ -0,0 +1,71 @@ + "`. For example, + * `"Technical Issue > Compute > Compute Engine"`. + * + * Classification IDs returned by this endpoint are valid for at least six + * months. When a classification is deactivated, this endpoint immediately + * stops returning it. After six months, `case.create` requests using the + * classification will fail. + * + * 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 search_case_classifications_sample(): void +{ + // Create a client. + $caseServiceClient = new CaseServiceClient(); + + // Prepare the request message. + $request = new SearchCaseClassificationsRequest(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseServiceClient->searchCaseClassifications($request); + + /** @var CaseClassification $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 cloudsupport_v2_generated_CaseService_SearchCaseClassifications_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php new file mode 100644 index 000000000000..42e3e2f444e0 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php @@ -0,0 +1,62 @@ +searchCases($request); + + /** @var PBCase $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 cloudsupport_v2_generated_CaseService_SearchCases_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php new file mode 100644 index 000000000000..b723593f103a --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php @@ -0,0 +1,59 @@ +setCase($case); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->updateCase($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudsupport_v2_generated_CaseService_UpdateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php new file mode 100644 index 000000000000..36bf38f2e93a --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php @@ -0,0 +1,75 @@ +setParent($formattedParent) + ->setComment($comment); + + // Call the API and handle any network failures. + try { + /** @var Comment $response */ + $response = $commentServiceClient->createComment($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 +{ + $formattedParent = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + create_comment_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CommentService_CreateComment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php new file mode 100644 index 000000000000..10ebea221aa6 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php @@ -0,0 +1,100 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Comment $response */ + $response = $commentServiceClient->getComment($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 = CommentServiceClient::commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); + + get_comment_sample($formattedName); +} +// [END cloudsupport_v2_generated_CommentService_GetComment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php new file mode 100644 index 000000000000..cbfe58d206e6 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $commentServiceClient->listComments($request); + + /** @var Comment $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 = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + list_comments_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CommentService_ListComments_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php new file mode 100644 index 000000000000..16786c58af00 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php @@ -0,0 +1,80 @@ +setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->createSupportEventSubscription($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 +{ + $formattedParent = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); + $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; + + create_support_event_subscription_sample($formattedParent, $supportEventSubscriptionPubSubTopic); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_CreateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php new file mode 100644 index 000000000000..f7263d70ab14 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->deleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + delete_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_DeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php new file mode 100644 index 000000000000..3bfbb93c382a --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php @@ -0,0 +1,104 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $supportEventSubscriptionServiceClient->expungeSupportEventSubscription($request); + printf('Call completed successfully.' . PHP_EOL); + } 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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + expunge_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_ExpungeSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php new file mode 100644 index 000000000000..e8bdfd53d627 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->getSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + get_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_GetSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php new file mode 100644 index 000000000000..828bdacb0a68 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $supportEventSubscriptionServiceClient->listSupportEventSubscriptions($request); + + /** @var SupportEventSubscription $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 = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); + + list_support_event_subscriptions_sample($formattedParent); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_ListSupportEventSubscriptions_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php new file mode 100644 index 000000000000..0153eb19d132 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->undeleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + undelete_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_UndeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php new file mode 100644 index 000000000000..f7084b7cc9b4 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php @@ -0,0 +1,74 @@ +setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new UpdateSupportEventSubscriptionRequest()) + ->setSupportEventSubscription($supportEventSubscription); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->updateSupportEventSubscription($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 +{ + $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; + + update_support_event_subscription_sample($supportEventSubscriptionPubSubTopic); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_UpdateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php new file mode 100644 index 000000000000..8cdb4af45028 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php @@ -0,0 +1,409 @@ + getAttachmentAsync(GetAttachmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAttachmentsAsync(ListAttachmentsRequest $request, array $optionalArgs = []) + */ +final class CaseAttachmentServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2.CaseAttachmentService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/case_attachment_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/case_attachment_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/case_attachment_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/case_attachment_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a attachment + * resource. + * + * @param string $organization + * @param string $case + * @param string $attachmentId + * + * @return string The formatted attachment resource. + */ + public static function attachmentName(string $organization, string $case, string $attachmentId): string + { + return self::getPathTemplate('attachment')->render([ + 'organization' => $organization, + 'case' => $case, + 'attachment_id' => $attachmentId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case_attachment_id resource. + * + * @param string $organization + * @param string $case + * @param string $attachmentId + * + * @return string The formatted organization_case_attachment_id resource. + */ + public static function organizationCaseAttachmentIdName(string $organization, string $case, string $attachmentId): string + { + return self::getPathTemplate('organizationCaseAttachmentId')->render([ + 'organization' => $organization, + 'case' => $case, + 'attachment_id' => $attachmentId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_case_attachment_id resource. + * + * @param string $project + * @param string $case + * @param string $attachmentId + * + * @return string The formatted project_case_attachment_id resource. + */ + public static function projectCaseAttachmentIdName(string $project, string $case, string $attachmentId): string + { + return self::getPathTemplate('projectCaseAttachmentId')->render([ + 'project' => $project, + 'case' => $case, + 'attachment_id' => $attachmentId, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - attachment: organizations/{organization}/cases/{case}/attachments/{attachment_id} + * - case: organizations/{organization}/cases/{case} + * - organizationCase: organizations/{organization}/cases/{case} + * - organizationCaseAttachmentId: organizations/{organization}/cases/{case}/attachments/{attachment_id} + * - projectCase: projects/{project}/cases/{case} + * - projectCaseAttachmentId: projects/{project}/cases/{case}/attachments/{attachment_id} + * + * 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 'cloudsupport.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\Support\V2\CaseAttachmentServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CaseAttachmentServiceClient(['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); + } + + /** 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); + } + + /** + * Retrieve an attachment associated with a support case. + * + * EXAMPLES: + * + * cURL: + * + * ```shell + * attachment="projects/some-project/cases/23598314/attachments/0684M00000P3h1fQAB" + * curl \ + * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ + * "https://cloudsupport.googleapis.com/v2/$attachment" + * ``` + * + * Python: + * + * ```python + * import googleapiclient.discovery + * + * api_version = "v2" + * supportApiService = googleapiclient.discovery.build( + * serviceName="cloudsupport", + * version=api_version, + * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", + * ) + * request = ( + * supportApiService.cases() + * .attachments() + * .get(name="projects/some-project/cases/43595344/attachments/0684M00000P3h1fQAB") + * ) + * print(request.execute()) + * ``` + * + * The async variant is {@see CaseAttachmentServiceClient::getAttachmentAsync()} . + * + * @example samples/V2/CaseAttachmentServiceClient/get_attachment.php + * + * @param GetAttachmentRequest $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 Attachment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAttachment(GetAttachmentRequest $request, array $callOptions = []): Attachment + { + return $this->startApiCall('GetAttachment', $request, $callOptions)->wait(); + } + + /** + * List all the attachments associated with a support case. + * + * The async variant is {@see CaseAttachmentServiceClient::listAttachmentsAsync()} + * . + * + * @example samples/V2/CaseAttachmentServiceClient/list_attachments.php + * + * @param ListAttachmentsRequest $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 listAttachments(ListAttachmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAttachments', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php new file mode 100644 index 000000000000..e1f1a634d50d --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php @@ -0,0 +1,542 @@ + closeCaseAsync(CloseCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCaseAsync(CreateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface escalateCaseAsync(EscalateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCaseAsync(GetCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCasesAsync(ListCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchCaseClassificationsAsync(SearchCaseClassificationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchCasesAsync(SearchCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCaseAsync(UpdateCaseRequest $request, array $optionalArgs = []) + */ +final class CaseServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2.CaseService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/case_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/case_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/case_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/case_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - organization: organizations/{organization} + * - organizationCase: organizations/{organization}/cases/{case} + * - project: projects/{project} + * - projectCase: projects/{project}/cases/{case} + * + * 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 'cloudsupport.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\Support\V2\CaseServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CaseServiceClient(['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); + } + + /** 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); + } + + /** + * Close a case. + * + * The async variant is {@see CaseServiceClient::closeCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/close_case.php + * + * @param CloseCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function closeCase(CloseCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('CloseCase', $request, $callOptions)->wait(); + } + + /** + * Create a new case and associate it with a parent. + * + * It must have the following fields set: `display_name`, `description`, + * `classification`, and `priority`. If you're just testing the API and don't + * want to route your case to an agent, set `testCase=true`. + * + * The async variant is {@see CaseServiceClient::createCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/create_case.php + * + * @param CreateCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCase(CreateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('CreateCase', $request, $callOptions)->wait(); + } + + /** + * Escalate a case, starting the Google Cloud Support escalation management + * process. + * + * This operation is only available for some support services. Go to + * https://cloud.google.com/support and look for 'Technical support + * escalations' in the feature list to find out which ones let you + * do that. + * + * The async variant is {@see CaseServiceClient::escalateCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/escalate_case.php + * + * @param EscalateCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function escalateCase(EscalateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('EscalateCase', $request, $callOptions)->wait(); + } + + /** + * Retrieve a case. + * + * The async variant is {@see CaseServiceClient::getCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/get_case.php + * + * @param GetCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCase(GetCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('GetCase', $request, $callOptions)->wait(); + } + + /** + * Retrieve all cases under a parent, but not its children. + * + * For example, listing cases under an organization only returns the cases + * that are directly parented by that organization. To retrieve cases + * under an organization and its projects, use `cases.search`. + * + * The async variant is {@see CaseServiceClient::listCasesAsync()} . + * + * @example samples/V2/CaseServiceClient/list_cases.php + * + * @param ListCasesRequest $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 listCases(ListCasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCases', $request, $callOptions); + } + + /** + * Retrieve valid classifications to use when creating a support case. + * + * Classifications are hierarchical. Each classification is a string + * containing all levels of the hierarchy separated by `" > "`. For example, + * `"Technical Issue > Compute > Compute Engine"`. + * + * Classification IDs returned by this endpoint are valid for at least six + * months. When a classification is deactivated, this endpoint immediately + * stops returning it. After six months, `case.create` requests using the + * classification will fail. + * + * The async variant is {@see CaseServiceClient::searchCaseClassificationsAsync()} + * . + * + * @example samples/V2/CaseServiceClient/search_case_classifications.php + * + * @param SearchCaseClassificationsRequest $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 searchCaseClassifications(SearchCaseClassificationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchCaseClassifications', $request, $callOptions); + } + + /** + * Search for cases using a query. + * + * The async variant is {@see CaseServiceClient::searchCasesAsync()} . + * + * @example samples/V2/CaseServiceClient/search_cases.php + * + * @param SearchCasesRequest $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 searchCases(SearchCasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchCases', $request, $callOptions); + } + + /** + * Update a case. Only some fields can be updated. + * + * The async variant is {@see CaseServiceClient::updateCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/update_case.php + * + * @param UpdateCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCase(UpdateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('UpdateCase', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php new file mode 100644 index 000000000000..123c261c9c96 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php @@ -0,0 +1,437 @@ + createCommentAsync(CreateCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCommentAsync(GetCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCommentsAsync(ListCommentsRequest $request, array $optionalArgs = []) + */ +final class CommentServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2.CommentService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/comment_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/comment_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/comment_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/comment_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a comment + * resource. + * + * @param string $organization + * @param string $case + * @param string $comment + * + * @return string The formatted comment resource. + */ + public static function commentName(string $organization, string $case, string $comment): string + { + return self::getPathTemplate('comment')->render([ + 'organization' => $organization, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case_comment resource. + * + * @param string $organization + * @param string $case + * @param string $comment + * + * @return string The formatted organization_case_comment resource. + */ + public static function organizationCaseCommentName(string $organization, string $case, string $comment): string + { + return self::getPathTemplate('organizationCaseComment')->render([ + 'organization' => $organization, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_case_comment resource. + * + * @param string $project + * @param string $case + * @param string $comment + * + * @return string The formatted project_case_comment resource. + */ + public static function projectCaseCommentName(string $project, string $case, string $comment): string + { + return self::getPathTemplate('projectCaseComment')->render([ + 'project' => $project, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - comment: organizations/{organization}/cases/{case}/comments/{comment} + * - organizationCase: organizations/{organization}/cases/{case} + * - organizationCaseComment: organizations/{organization}/cases/{case}/comments/{comment} + * - projectCase: projects/{project}/cases/{case} + * - projectCaseComment: projects/{project}/cases/{case}/comments/{comment} + * + * 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 'cloudsupport.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\Support\V2\CommentServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CommentServiceClient(['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); + } + + /** 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); + } + + /** + * Add a new comment to a case. + * + * The comment must have the following fields set: `body`. + * + * The async variant is {@see CommentServiceClient::createCommentAsync()} . + * + * @example samples/V2/CommentServiceClient/create_comment.php + * + * @param CreateCommentRequest $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 Comment + * + * @throws ApiException Thrown if the API call fails. + */ + public function createComment(CreateCommentRequest $request, array $callOptions = []): Comment + { + return $this->startApiCall('CreateComment', $request, $callOptions)->wait(); + } + + /** + * Retrieve a comment. + * + * EXAMPLES: + * + * cURL: + * + * ```shell + * comment="projects/some-project/cases/43595344/comments/234567890" + * curl \ + * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ + * "https://cloudsupport.googleapis.com/v2/$comment" + * ``` + * + * Python: + * + * ```python + * import googleapiclient.discovery + * + * api_version = "v2" + * supportApiService = googleapiclient.discovery.build( + * serviceName="cloudsupport", + * version=api_version, + * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", + * ) + * + * request = supportApiService.cases().comments().get( + * name="projects/some-project/cases/43595344/comments/234567890", + * ) + * print(request.execute()) + * ``` + * + * The async variant is {@see CommentServiceClient::getCommentAsync()} . + * + * @example samples/V2/CommentServiceClient/get_comment.php + * + * @param GetCommentRequest $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 Comment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getComment(GetCommentRequest $request, array $callOptions = []): Comment + { + return $this->startApiCall('GetComment', $request, $callOptions)->wait(); + } + + /** + * List all the comments associated with a case. + * + * The async variant is {@see CommentServiceClient::listCommentsAsync()} . + * + * @example samples/V2/CommentServiceClient/list_comments.php + * + * @param ListCommentsRequest $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 listComments(ListCommentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListComments', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php new file mode 100644 index 000000000000..2d1e59412ff0 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php @@ -0,0 +1,480 @@ + createSupportEventSubscriptionAsync(CreateSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSupportEventSubscriptionAsync(DeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface expungeSupportEventSubscriptionAsync(ExpungeSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSupportEventSubscriptionAsync(GetSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSupportEventSubscriptionsAsync(ListSupportEventSubscriptionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface undeleteSupportEventSubscriptionAsync(UndeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSupportEventSubscriptionAsync(UpdateSupportEventSubscriptionRequest $request, array $optionalArgs = []) + */ +final class SupportEventSubscriptionServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2.SupportEventSubscriptionService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/support_event_subscription_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * support_event_subscription resource. + * + * @param string $organization + * @param string $supportEventSubscription + * + * @return string The formatted support_event_subscription resource. + */ + public static function supportEventSubscriptionName(string $organization, string $supportEventSubscription): string + { + return self::getPathTemplate('supportEventSubscription')->render([ + 'organization' => $organization, + 'support_event_subscription' => $supportEventSubscription, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - organization: organizations/{organization} + * - supportEventSubscription: organizations/{organization}/supportEventSubscriptions/{support_event_subscription} + * + * 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 'cloudsupport.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\Support\V2\SupportEventSubscriptionServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new SupportEventSubscriptionServiceClient(['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); + } + + /** 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); + } + + /** + * Creates a support event subscription for an organization. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::createSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php + * + * @param CreateSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSupportEventSubscription(CreateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('CreateSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Soft deletes a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::deleteSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php + * + * @param DeleteSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSupportEventSubscription(DeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('DeleteSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Expunges a support event subscription. + * + * EXAMPLES: + * + * cURL: + * + * ```shell + * support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" + * curl \ + * --request POST \ + * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ + * "https://cloudsupport.googleapis.com/v2/$support_event_subscription:expunge" + * ``` + * + * Python: + * + * ```python + * import googleapiclient.discovery + * + * api_version = "v2" + * supportApiService = googleapiclient.discovery.build( + * serviceName="cloudsupport", + * version=api_version, + * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", + * ) + * + * request = supportApiService.supportEventSubscriptions().expunge( + * name="organizations/123456789/supportEventSubscriptions/abcdef123456" + * ) + * print(request.execute()) + * ``` + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::expungeSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php + * + * @param ExpungeSupportEventSubscriptionRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function expungeSupportEventSubscription(ExpungeSupportEventSubscriptionRequest $request, array $callOptions = []): void + { + $this->startApiCall('ExpungeSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Gets a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::getSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php + * + * @param GetSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSupportEventSubscription(GetSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('GetSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Lists support event subscriptions for an organization. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::listSupportEventSubscriptionsAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php + * + * @param ListSupportEventSubscriptionsRequest $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 listSupportEventSubscriptions(ListSupportEventSubscriptionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSupportEventSubscriptions', $request, $callOptions); + } + + /** + * Undeletes a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::undeleteSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php + * + * @param UndeleteSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + */ + public function undeleteSupportEventSubscription(UndeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('UndeleteSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Updates a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::updateSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php + * + * @param UpdateSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSupportEventSubscription(UpdateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('UpdateSupportEventSubscription', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..a1a0b226e030 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json @@ -0,0 +1,145 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.support.v2", + "libraryPackage": "Google\\Cloud\\Support\\V2", + "services": { + "CaseAttachmentService": { + "clients": { + "grpc": { + "libraryClient": "CaseAttachmentServiceGapicClient", + "rpcs": { + "GetAttachment": { + "methods": [ + "getAttachment" + ] + }, + "ListAttachments": { + "methods": [ + "listAttachments" + ] + } + } + } + } + }, + "CaseService": { + "clients": { + "grpc": { + "libraryClient": "CaseServiceGapicClient", + "rpcs": { + "CloseCase": { + "methods": [ + "closeCase" + ] + }, + "CreateCase": { + "methods": [ + "createCase" + ] + }, + "EscalateCase": { + "methods": [ + "escalateCase" + ] + }, + "GetCase": { + "methods": [ + "getCase" + ] + }, + "ListCases": { + "methods": [ + "listCases" + ] + }, + "SearchCaseClassifications": { + "methods": [ + "searchCaseClassifications" + ] + }, + "SearchCases": { + "methods": [ + "searchCases" + ] + }, + "UpdateCase": { + "methods": [ + "updateCase" + ] + } + } + } + } + }, + "CommentService": { + "clients": { + "grpc": { + "libraryClient": "CommentServiceGapicClient", + "rpcs": { + "CreateComment": { + "methods": [ + "createComment" + ] + }, + "GetComment": { + "methods": [ + "getComment" + ] + }, + "ListComments": { + "methods": [ + "listComments" + ] + } + } + } + } + }, + "SupportEventSubscriptionService": { + "clients": { + "grpc": { + "libraryClient": "SupportEventSubscriptionServiceGapicClient", + "rpcs": { + "CreateSupportEventSubscription": { + "methods": [ + "createSupportEventSubscription" + ] + }, + "DeleteSupportEventSubscription": { + "methods": [ + "deleteSupportEventSubscription" + ] + }, + "ExpungeSupportEventSubscription": { + "methods": [ + "expungeSupportEventSubscription" + ] + }, + "GetSupportEventSubscription": { + "methods": [ + "getSupportEventSubscription" + ] + }, + "ListSupportEventSubscriptions": { + "methods": [ + "listSupportEventSubscriptions" + ] + }, + "UndeleteSupportEventSubscription": { + "methods": [ + "undeleteSupportEventSubscription" + ] + }, + "UpdateSupportEventSubscription": { + "methods": [ + "updateSupportEventSubscription" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json new file mode 100644 index 000000000000..86644d843261 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json @@ -0,0 +1,44 @@ +{ + "interfaces": { + "google.cloud.support.v2.CaseAttachmentService": { + "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": { + "GetAttachment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAttachments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php new file mode 100644 index 000000000000..d09c50e12e40 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php @@ -0,0 +1,68 @@ + [ + 'google.cloud.support.v2.CaseAttachmentService' => [ + 'GetAttachment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\Attachment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAttachments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAttachments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\ListAttachmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'attachment' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', + 'case' => 'organizations/{organization}/cases/{case}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'organizationCaseAttachmentId' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', + 'projectCase' => 'projects/{project}/cases/{case}', + 'projectCaseAttachmentId' => 'projects/{project}/cases/{case}/attachments/{attachment_id}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php new file mode 100644 index 000000000000..e0337097818c --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php @@ -0,0 +1,57 @@ + [ + 'google.cloud.support.v2.CaseAttachmentService' => [ + 'GetAttachment' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/cases/*/attachments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAttachments' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/attachments', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/attachments', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json new file mode 100644 index 000000000000..7fff474416b4 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json @@ -0,0 +1,84 @@ +{ + "interfaces": { + "google.cloud.support.v2.CaseService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "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 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CloseCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EscalateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetCase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchCaseClassifications": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php new file mode 100644 index 000000000000..51f3317d6a1c --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php @@ -0,0 +1,148 @@ + [ + 'google.cloud.support.v2.CaseService' => [ + 'CloseCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'EscalateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\ListCasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchCaseClassifications' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCaseClassifications', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SearchCaseClassificationsResponse', + ], + 'SearchCases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SearchCasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'case.name', + 'fieldAccessors' => [ + 'getCase', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'organization' => 'organizations/{organization}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'project' => 'projects/{project}', + 'projectCase' => 'projects/{project}/cases/{case}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php new file mode 100644 index 000000000000..f9f9374d9247 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php @@ -0,0 +1,161 @@ + [ + 'google.cloud.support.v2.CaseService' => [ + 'CloseCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/cases/*}:close', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/cases/*}:close', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/cases', + 'body' => 'case', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*}/cases', + 'body' => 'case', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'EscalateCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/cases/*}:escalate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/cases/*}:escalate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCase' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/cases/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/cases/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCases' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/cases', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/cases', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchCaseClassifications' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/caseClassifications:search', + ], + 'SearchCases' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/cases:search', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/cases:search', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCase' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{case.name=projects/*/cases/*}', + 'body' => 'case', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{case.name=organizations/*/cases/*}', + 'body' => 'case', + ], + ], + 'placeholders' => [ + 'case.name' => [ + 'getters' => [ + 'getCase', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json new file mode 100644 index 000000000000..8dba9a653701 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json @@ -0,0 +1,59 @@ +{ + "interfaces": { + "google.cloud.support.v2.CommentService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "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 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListComments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php new file mode 100644 index 000000000000..1157c2b2f18c --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php @@ -0,0 +1,80 @@ + [ + 'google.cloud.support.v2.CommentService' => [ + 'CreateComment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\Comment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetComment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\Comment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListComments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getComments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\ListCommentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'comment' => 'organizations/{organization}/cases/{case}/comments/{comment}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'organizationCaseComment' => 'organizations/{organization}/cases/{case}/comments/{comment}', + 'projectCase' => 'projects/{project}/cases/{case}', + 'projectCaseComment' => 'projects/{project}/cases/{case}/comments/{comment}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php new file mode 100644 index 000000000000..80f01b235112 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php @@ -0,0 +1,76 @@ + [ + 'google.cloud.support.v2.CommentService' => [ + 'CreateComment' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/comments', + 'body' => 'comment', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/comments', + 'body' => 'comment', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetComment' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/cases/*/comments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListComments' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/comments', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/comments', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json new file mode 100644 index 000000000000..207f6e81330a --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json @@ -0,0 +1,57 @@ +{ + "interfaces": { + "google.cloud.support.v2.SupportEventSubscriptionService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "CreateSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ExpungeSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSupportEventSubscriptions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UndeleteSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php new file mode 100644 index 000000000000..8524c72bce3c --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php @@ -0,0 +1,125 @@ + [ + 'google.cloud.support.v2.SupportEventSubscriptionService' => [ + 'CreateSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExpungeSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSupportEventSubscriptions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSupportEventSubscriptions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\ListSupportEventSubscriptionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UndeleteSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'support_event_subscription.name', + 'fieldAccessors' => [ + 'getSupportEventSubscription', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'organization' => 'organizations/{organization}', + 'supportEventSubscription' => 'organizations/{organization}/supportEventSubscriptions/{support_event_subscription}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php new file mode 100644 index 000000000000..d47c677179a1 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php @@ -0,0 +1,111 @@ + [ + 'google.cloud.support.v2.SupportEventSubscriptionService' => [ + 'CreateSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*}/supportEventSubscriptions', + 'body' => 'support_event_subscription', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSupportEventSubscription' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExpungeSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}:expunge', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSupportEventSubscription' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSupportEventSubscriptions' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/supportEventSubscriptions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UndeleteSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}:undelete', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSupportEventSubscription' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}', + 'body' => 'support_event_subscription', + 'placeholders' => [ + 'support_event_subscription.name' => [ + 'getters' => [ + 'getSupportEventSubscription', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php new file mode 100644 index 000000000000..601ac8d587e1 --- /dev/null +++ b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php @@ -0,0 +1,241 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CaseAttachmentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CaseAttachmentServiceClient($options); + } + + /** @test */ + public function getAttachmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $filename = 'filename-734768633'; + $mimeType = 'mimeType-196041627'; + $sizeBytes = 1796325715; + $expectedResponse = new Attachment(); + $expectedResponse->setName($name2); + $expectedResponse->setFilename($filename); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setSizeBytes($sizeBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); + $request = (new GetAttachmentRequest()) + ->setName($formattedName); + $response = $gapicClient->getAttachment($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.support.v2.CaseAttachmentService/GetAttachment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachmentExceptionTest() + { + $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->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); + $request = (new GetAttachmentRequest()) + ->setName($formattedName); + try { + $gapicClient->getAttachment($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 listAttachmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $attachmentsElement = new Attachment(); + $attachments = [ + $attachmentsElement, + ]; + $expectedResponse = new ListAttachmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAttachments($attachments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListAttachmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAttachments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAttachments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseAttachmentService/ListAttachments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAttachmentsExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListAttachmentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAttachments($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 getAttachmentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $filename = 'filename-734768633'; + $mimeType = 'mimeType-196041627'; + $sizeBytes = 1796325715; + $expectedResponse = new Attachment(); + $expectedResponse->setName($name2); + $expectedResponse->setFilename($filename); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setSizeBytes($sizeBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); + $request = (new GetAttachmentRequest()) + ->setName($formattedName); + $response = $gapicClient->getAttachmentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseAttachmentService/GetAttachment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php new file mode 100644 index 000000000000..e3977a3af5ad --- /dev/null +++ b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php @@ -0,0 +1,712 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CaseServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CaseServiceClient($options); + } + + /** @test */ + public function closeCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->closeCase($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.support.v2.CaseService/CloseCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function closeCaseExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->closeCase($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 createCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $case = new PBCase(); + $request = (new CreateCaseRequest()) + ->setParent($formattedParent) + ->setCase($case); + $response = $gapicClient->createCase($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.support.v2.CaseService/CreateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCase(); + $this->assertProtobufEquals($case, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCaseExceptionTest() + { + $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->projectName('[PROJECT]'); + $case = new PBCase(); + $request = (new CreateCaseRequest()) + ->setParent($formattedParent) + ->setCase($case); + try { + $gapicClient->createCase($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 escalateCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new EscalateCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->escalateCase($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.support.v2.CaseService/EscalateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function escalateCaseExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new EscalateCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->escalateCase($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 getCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new GetCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->getCase($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.support.v2.CaseService/GetCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCaseExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new GetCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->getCase($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 listCasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $casesElement = new PBCase(); + $cases = [ + $casesElement, + ]; + $expectedResponse = new ListCasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCases($cases); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListCasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseService/ListCases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCasesExceptionTest() + { + $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->projectName('[PROJECT]'); + $request = (new ListCasesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCases($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 searchCaseClassificationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $caseClassificationsElement = new CaseClassification(); + $caseClassifications = [ + $caseClassificationsElement, + ]; + $expectedResponse = new SearchCaseClassificationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCaseClassifications($caseClassifications); + $transport->addResponse($expectedResponse); + $request = new SearchCaseClassificationsRequest(); + $response = $gapicClient->searchCaseClassifications($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCaseClassifications()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseService/SearchCaseClassifications', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCaseClassificationsExceptionTest() + { + $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 SearchCaseClassificationsRequest(); + try { + $gapicClient->searchCaseClassifications($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 searchCasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $casesElement = new PBCase(); + $cases = [ + $casesElement, + ]; + $expectedResponse = new SearchCasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCases($cases); + $transport->addResponse($expectedResponse); + $request = new SearchCasesRequest(); + $response = $gapicClient->searchCases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseService/SearchCases', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCasesExceptionTest() + { + $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 SearchCasesRequest(); + try { + $gapicClient->searchCases($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 updateCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $case = new PBCase(); + $request = (new UpdateCaseRequest()) + ->setCase($case); + $response = $gapicClient->updateCase($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.support.v2.CaseService/UpdateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getCase(); + $this->assertProtobufEquals($case, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCaseExceptionTest() + { + $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 + $case = new PBCase(); + $request = (new UpdateCaseRequest()) + ->setCase($case); + try { + $gapicClient->updateCase($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 closeCaseAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->closeCaseAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseService/CloseCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php new file mode 100644 index 000000000000..0982658b529d --- /dev/null +++ b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php @@ -0,0 +1,316 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CommentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CommentServiceClient($options); + } + + /** @test */ + public function createCommentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + $response = $gapicClient->createComment($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.support.v2.CommentService/CreateComment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getComment(); + $this->assertProtobufEquals($comment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCommentExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + try { + $gapicClient->createComment($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 getCommentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name2); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); + $request = (new GetCommentRequest()) + ->setName($formattedName); + $response = $gapicClient->getComment($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.support.v2.CommentService/GetComment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCommentExceptionTest() + { + $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->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); + $request = (new GetCommentRequest()) + ->setName($formattedName); + try { + $gapicClient->getComment($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 listCommentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $commentsElement = new Comment(); + $comments = [ + $commentsElement, + ]; + $expectedResponse = new ListCommentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setComments($comments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListCommentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listComments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getComments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CommentService/ListComments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCommentsExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListCommentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listComments($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 createCommentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + $response = $gapicClient->createCommentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CommentService/CreateComment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getComment(); + $this->assertProtobufEquals($comment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php new file mode 100644 index 000000000000..90d1f77613e5 --- /dev/null +++ b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php @@ -0,0 +1,584 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SupportEventSubscriptionServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SupportEventSubscriptionServiceClient($options); + } + + /** @test */ + public function createSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + $response = $gapicClient->createSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSupportEventSubscription(); + $this->assertProtobufEquals($supportEventSubscription, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSupportEventSubscriptionExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + try { + $gapicClient->createSupportEventSubscription($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 deleteSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name2); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new DeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/DeleteSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new DeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSupportEventSubscription($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 expungeSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new ExpungeSupportEventSubscriptionRequest()) + ->setName($formattedName); + $gapicClient->expungeSupportEventSubscription($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.SupportEventSubscriptionService/ExpungeSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function expungeSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new ExpungeSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->expungeSupportEventSubscription($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 getSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name2); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new GetSupportEventSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->getSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/GetSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new GetSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->getSupportEventSubscription($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 listSupportEventSubscriptionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $supportEventSubscriptionsElement = new SupportEventSubscription(); + $supportEventSubscriptions = [ + $supportEventSubscriptionsElement, + ]; + $expectedResponse = new ListSupportEventSubscriptionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSupportEventSubscriptions($supportEventSubscriptions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new ListSupportEventSubscriptionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSupportEventSubscriptions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSupportEventSubscriptions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.SupportEventSubscriptionService/ListSupportEventSubscriptions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSupportEventSubscriptionsExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $request = (new ListSupportEventSubscriptionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSupportEventSubscriptions($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 undeleteSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name2); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new UndeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->undeleteSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/UndeleteSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function undeleteSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new UndeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->undeleteSupportEventSubscription($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 updateSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new UpdateSupportEventSubscriptionRequest()) + ->setSupportEventSubscription($supportEventSubscription); + $response = $gapicClient->updateSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/UpdateSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getSupportEventSubscription(); + $this->assertProtobufEquals($supportEventSubscription, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSupportEventSubscriptionExceptionTest() + { + $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 + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new UpdateSupportEventSubscriptionRequest()) + ->setSupportEventSubscription($supportEventSubscription); + try { + $gapicClient->updateSupportEventSubscription($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 createSupportEventSubscriptionAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + $response = $gapicClient->createSupportEventSubscriptionAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSupportEventSubscription(); + $this->assertProtobufEquals($supportEventSubscription, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php new file mode 100644 index 000000000000..1aa4b2dcd381 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xFE\x02\x0A'google/cloud/support/v2beta/actor.proto\x12\x1Bgoogle.cloud.support.v2beta\"d\x0A\x05Actor\x12\x14\x0A\x0Cdisplay_name\x18\x01 \x01(\x09\x12\x11\x0A\x05email\x18\x02 \x01(\x09B\x02\x18\x01\x12\x1B\x0A\x0Egoogle_support\x18\x04 \x01(\x08B\x03\xE0A\x03\x12\x15\x0A\x08username\x18\x05 \x01(\x09B\x03\xE0A\x03B\xC7\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0AActorProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php new file mode 100644 index 000000000000..4a62f7824389 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\x92\x06\x0A,google/cloud/support/v2beta/attachment.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x88\x03\x0A\x0AAttachment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x128\x0A\x07creator\x18\x03 \x01(\x0B2\".google.cloud.support.v2beta.ActorB\x03\xE0A\x03\x12\x10\x0A\x08filename\x18\x04 \x01(\x09\x12\x16\x0A\x09mime_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Asize_bytes\x18\x06 \x01(\x03B\x03\xE0A\x03:\xB0\x01\xEAA\xAC\x01\x0A&cloudsupport.googleapis.com/Attachment\x12Eorganizations/{organization}/cases/{case}/attachments/{attachment_id}\x12;projects/{project}/cases/{case}/attachments/{attachment_id}B\xCC\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0FAttachmentProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php new file mode 100644 index 000000000000..4ff8c684ca06 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\x82\x0A\x0A4google/cloud/support/v2beta/attachment_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/support/v2beta/attachment.proto\"y\x0A\x16ListAttachmentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"T\x0A\x14GetAttachmentRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&cloudsupport.googleapis.com/Attachment\"p\x0A\x17ListAttachmentsResponse\x12<\x0A\x0Battachments\x18\x01 \x03(\x0B2'.google.cloud.support.v2beta.Attachment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\x88\x04\x0A\x15CaseAttachmentService\x12\xF6\x01\x0A\x0FListAttachments\x123.google.cloud.support.v2beta.ListAttachmentsRequest\x1A4.google.cloud.support.v2beta.ListAttachmentsResponse\"x\xDAA\x06parent\x82\xD3\xE4\x93\x02i\x12//v2beta/{parent=projects/*/cases/*}/attachmentsZ6\x124/v2beta/{parent=organizations/*/cases/*}/attachments\x12\xA4\x01\x0A\x0DGetAttachment\x121.google.cloud.support.v2beta.GetAttachmentRequest\x1A'.google.cloud.support.v2beta.Attachment\"7\xDAA\x04name\x82\xD3\xE4\x93\x02*\x12(/v2beta/{name=*/*/cases/*/attachments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xD3\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x16AttachmentServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php new file mode 100644 index 000000000000..d96b709d8545 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\x84\x1C\x0A.google/cloud/support/v2beta/case_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A&google/cloud/support/v2beta/case.proto\x1A,google/cloud/support/v2beta/escalation.proto\x1A google/protobuf/field_mask.proto\"H\x0A\x0EGetCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"\x83\x01\x0A\x11CreateCaseRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x124\x0A\x04case\x18\x02 \x01(\x0B2!.google.cloud.support.v2beta.CaseB\x03\xE0A\x02\"\xD9\x01\x0A\x10ListCasesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\x12C\x0A\x0Cproduct_line\x18\x08 \x01(\x0E2(.google.cloud.support.v2beta.ProductLineH\x00\x88\x01\x01B\x0F\x0A\x0D_product_line\"^\x0A\x11ListCasesResponse\x120\x0A\x05cases\x18\x01 \x03(\x0B2!.google.cloud.support.v2beta.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"Z\x0A\x12SearchCasesRequest\x12\x0E\x0A\x06parent\x18\x04 \x01(\x09\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"`\x0A\x13SearchCasesResponse\x120\x0A\x05cases\x18\x01 \x03(\x0B2!.google.cloud.support.v2beta.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x8A\x01\x0A\x13EscalateCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12;\x0A\x0Aescalation\x18\x02 \x01(\x0B2'.google.cloud.support.v2beta.Escalation\"z\x0A\x11UpdateCaseRequest\x124\x0A\x04case\x18\x01 \x01(\x0B2!.google.cloud.support.v2beta.CaseB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"J\x0A\x10CloseCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"\x94\x01\x0A SearchCaseClassificationsRequest\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12:\x0A\x07product\x18\x07 \x01(\x0B2\$.google.cloud.support.v2beta.ProductB\x03\xE0A\x01\"\x8B\x01\x0A!SearchCaseClassificationsResponse\x12M\x0A\x14case_classifications\x18\x01 \x03(\x0B2/.google.cloud.support.v2beta.CaseClassification\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xCB\x0D\x0A\x0BCaseService\x12\xB5\x01\x0A\x07GetCase\x12+.google.cloud.support.v2beta.GetCaseRequest\x1A!.google.cloud.support.v2beta.Case\"Z\xDAA\x04name\x82\xD3\xE4\x93\x02M\x12!/v2beta/{name=projects/*/cases/*}Z(\x12&/v2beta/{name=organizations/*/cases/*}\x12\xC8\x01\x0A\x09ListCases\x12-.google.cloud.support.v2beta.ListCasesRequest\x1A..google.cloud.support.v2beta.ListCasesResponse\"\\\xDAA\x06parent\x82\xD3\xE4\x93\x02M\x12!/v2beta/{parent=projects/*}/casesZ(\x12&/v2beta/{parent=organizations/*}/cases\x12\xD3\x01\x0A\x0BSearchCases\x12/.google.cloud.support.v2beta.SearchCasesRequest\x1A0.google.cloud.support.v2beta.SearchCasesResponse\"a\x82\xD3\xE4\x93\x02[\x12(/v2beta/{parent=projects/*}/cases:searchZ/\x12-/v2beta/{parent=organizations/*}/cases:search\x12\xCE\x01\x0A\x0ACreateCase\x12..google.cloud.support.v2beta.CreateCaseRequest\x1A!.google.cloud.support.v2beta.Case\"m\xDAA\x0Bparent,case\x82\xD3\xE4\x93\x02Y\"!/v2beta/{parent=projects/*}/cases:\x04caseZ.\"&/v2beta/{parent=organizations/*}/cases:\x04case\x12\xDD\x01\x0A\x0AUpdateCase\x12..google.cloud.support.v2beta.UpdateCaseRequest\x1A!.google.cloud.support.v2beta.Case\"|\xDAA\x10case,update_mask\x82\xD3\xE4\x93\x02c2&/v2beta/{case.name=projects/*/cases/*}:\x04caseZ32+/v2beta/{case.name=organizations/*/cases/*}:\x04case\x12\xD0\x01\x0A\x0CEscalateCase\x120.google.cloud.support.v2beta.EscalateCaseRequest\x1A!.google.cloud.support.v2beta.Case\"k\x82\xD3\xE4\x93\x02e\"*/v2beta/{name=projects/*/cases/*}:escalate:\x01*Z4\"//v2beta/{name=organizations/*/cases/*}:escalate:\x01*\x12\xC4\x01\x0A\x09CloseCase\x12-.google.cloud.support.v2beta.CloseCaseRequest\x1A!.google.cloud.support.v2beta.Case\"e\x82\xD3\xE4\x93\x02_\"'/v2beta/{name=projects/*/cases/*}:close:\x01*Z1\",/v2beta/{name=organizations/*/cases/*}:close:\x01*\x12\xC6\x01\x0A\x19SearchCaseClassifications\x12=.google.cloud.support.v2beta.SearchCaseClassificationsRequest\x1A>.google.cloud.support.v2beta.SearchCaseClassificationsResponse\"*\x82\xD3\xE4\x93\x02\$\x12\"/v2beta/caseClassifications:search\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x10CaseServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php new file mode 100644 index 000000000000..04bdbfb5d675 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xDF\x05\x0A)google/cloud/support/v2beta/comment.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDB\x02\x0A\x07Comment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x128\x0A\x07creator\x18\x03 \x01(\x0B2\".google.cloud.support.v2beta.ActorB\x03\xE0A\x03\x12\x0C\x0A\x04body\x18\x04 \x01(\x09\x12\x1E\x0A\x0Fplain_text_body\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03:\x9B\x01\xEAA\x97\x01\x0A#cloudsupport.googleapis.com/Comment\x12internalAddGeneratedFile( + "\x0A\xCE\x0C\x0A1google/cloud/support/v2beta/comment_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/support/v2beta/comment.proto\"v\x0A\x13ListCommentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\"g\x0A\x14ListCommentsResponse\x126\x0A\x08comments\x18\x01 \x03(\x0B2\$.google.cloud.support.v2beta.Comment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x8C\x01\x0A\x14CreateCommentRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12:\x0A\x07comment\x18\x02 \x01(\x0B2\$.google.cloud.support.v2beta.CommentB\x03\xE0A\x02\"N\x0A\x11GetCommentRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#cloudsupport.googleapis.com/Comment2\xE0\x05\x0A\x0ECommentService\x12\xE7\x01\x0A\x0CListComments\x120.google.cloud.support.v2beta.ListCommentsRequest\x1A1.google.cloud.support.v2beta.ListCommentsResponse\"r\xDAA\x06parent\x82\xD3\xE4\x93\x02c\x12,/v2beta/{parent=projects/*/cases/*}/commentsZ3\x121/v2beta/{parent=organizations/*/cases/*}/comments\x12\xF7\x01\x0A\x0DCreateComment\x121.google.cloud.support.v2beta.CreateCommentRequest\x1A\$.google.cloud.support.v2beta.Comment\"\x8C\x01\xDAA\x0Eparent,comment\x82\xD3\xE4\x93\x02u\",/v2beta/{parent=projects/*/cases/*}/comments:\x07commentZ<\"1/v2beta/{parent=organizations/*/cases/*}/comments:\x07comment\x12\x98\x01\x0A\x0AGetComment\x12..google.cloud.support.v2beta.GetCommentRequest\x1A\$.google.cloud.support.v2beta.Comment\"4\xDAA\x04name\x82\xD3\xE4\x93\x02'\x12%/v2beta/{name=*/*/cases/*/comments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xD0\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x13CommentServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php new file mode 100644 index 000000000000..9732640975d1 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xBF\x02\x0A)google/cloud/support/v2beta/content.proto\x12\x1Bgoogle.cloud.support.v2beta\"!\x0A\x0BTextContent\x12\x12\x0A\x0Aplain_text\x18\x01 \x01(\x09B\xC9\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0CContentProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php new file mode 100644 index 000000000000..532f5c66b638 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xC3\x07\x0A/google/cloud/support/v2beta/email_message.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A)google/cloud/support/v2beta/content.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x89\x04\x0A\x0CEmailMessage\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\x126\x0A\x05actor\x18\x03 \x01(\x0B2\".google.cloud.support.v2beta.ActorB\x03\xE0A\x03\x12\x14\x0A\x07subject\x18\x04 \x01(\x09B\x03\xE0A\x03\x12&\x0A\x19recipient_email_addresses\x18\x05 \x03(\x09B\x03\xE0A\x03\x12\x1F\x0A\x12cc_email_addresses\x18\x06 \x03(\x09B\x03\xE0A\x03\x12C\x0A\x0Cbody_content\x18\x08 \x01(\x0B2(.google.cloud.support.v2beta.TextContentB\x03\xE0A\x03:\xD3\x01\xEAA\xCF\x01\x0A(cloudsupport.googleapis.com/EmailMessage\x12=projects/{project}/cases/{case}/emailMessages/{email_message}\x12Gorganizations/{organization}/cases/{case}/emailMessages/{email_message}*\x0DemailMessages2\x0CemailMessageB\xCE\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x11EmailMessageProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php new file mode 100644 index 000000000000..4f02ac33a05a --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xF7\x03\x0A,google/cloud/support/v2beta/escalation.proto\x12\x1Bgoogle.cloud.support.v2beta\"\xD2\x01\x0A\x0AEscalation\x12C\x0A\x06reason\x18\x04 \x01(\x0E2..google.cloud.support.v2beta.Escalation.ReasonB\x03\xE0A\x02\x12\x1A\x0A\x0Djustification\x18\x05 \x01(\x09B\x03\xE0A\x02\"c\x0A\x06Reason\x12\x16\x0A\x12REASON_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FRESOLUTION_TIME\x10\x01\x12\x17\x0A\x13TECHNICAL_EXPERTISE\x10\x02\x12\x13\x0A\x0FBUSINESS_IMPACT\x10\x03B\xCC\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0FEscalationProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php new file mode 100644 index 000000000000..ba6174c9de88 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xB3\x06\x0A+google/cloud/support/v2beta/feed_item.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A,google/cloud/support/v2beta/attachment.proto\x1A)google/cloud/support/v2beta/comment.proto\x1A/google/cloud/support/v2beta/email_message.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE6\x02\x0A\x08FeedItem\x12<\x0A\x07comment\x18d \x01(\x0B2\$.google.cloud.support.v2beta.CommentB\x03\xE0A\x03H\x00\x12B\x0A\x0Aattachment\x18e \x01(\x0B2'.google.cloud.support.v2beta.AttachmentB\x03\xE0A\x03H\x00\x12G\x0A\x0Demail_message\x18f \x01(\x0B2).google.cloud.support.v2beta.EmailMessageB\x03\xE0A\x03H\x00\x12J\x0A\x12deleted_attachment\x18g \x01(\x0B2'.google.cloud.support.v2beta.AttachmentB\x03\xE0A\x03H\x00\x123\x0A\x0Aevent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03B\x0E\x0A\x0Cevent_objectB\xCA\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0DFeedItemProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php new file mode 100644 index 000000000000..c8ed909c6857 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xE4\x07\x0A.google/cloud/support/v2beta/feed_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A+google/cloud/support/v2beta/feed_item.proto\"\x93\x01\x0A\x0FShowFeedRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x15\x0A\x08order_by\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x04 \x01(\x09B\x03\xE0A\x01\"f\x0A\x10ShowFeedResponse\x129\x0A\x0Afeed_items\x18\x01 \x03(\x0B2%.google.cloud.support.v2beta.FeedItem\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xBC\x02\x0A\x0BFeedService\x12\xDB\x01\x0A\x08ShowFeed\x12,.google.cloud.support.v2beta.ShowFeedRequest\x1A-.google.cloud.support.v2beta.ShowFeedResponse\"r\xDAA\x06parent\x82\xD3\xE4\x93\x02c\x12,/v2beta/{parent=projects/*/cases/*}:showFeedZ3\x121/v2beta/{parent=organizations/*/cases/*}:showFeed\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x10FeedServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php new file mode 100644 index 000000000000..a56bd0b1fbf4 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xFE\x0B\x0A&google/cloud/support/v2beta/case.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xF6\x06\x0A\x04Case\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x12G\x0A\x0Eclassification\x18\x04 \x01(\x0B2/.google.cloud.support.v2beta.CaseClassification\x12\x11\x0A\x09time_zone\x18\x08 \x01(\x09\x12\"\x0A\x1Asubscriber_email_addresses\x18\x09 \x03(\x09\x12;\x0A\x05state\x18\x0C \x01(\x0E2'.google.cloud.support.v2beta.Case.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x0D \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0E \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x123\x0A\x07creator\x18\x0F \x01(\x0B2\".google.cloud.support.v2beta.Actor\x12\x15\x0A\x0Dcontact_email\x18# \x01(\x09\x12\x11\x0A\x09escalated\x18\x11 \x01(\x08\x12\x11\x0A\x09test_case\x18\x13 \x01(\x08\x12\x15\x0A\x0Dlanguage_code\x18\x17 \x01(\x09\x12<\x0A\x08priority\x18 \x01(\x0E2*.google.cloud.support.v2beta.Case.Priority\"\x7F\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03NEW\x10\x01\x12\x1E\x0A\x1AIN_PROGRESS_GOOGLE_SUPPORT\x10\x02\x12\x13\x0A\x0FACTION_REQUIRED\x10\x03\x12\x15\x0A\x11SOLUTION_PROVIDED\x10\x04\x12\x0A\x0A\x06CLOSED\x10\x05\"L\x0A\x08Priority\x12\x18\x0A\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02P0\x10\x01\x12\x06\x0A\x02P1\x10\x02\x12\x06\x0A\x02P2\x10\x03\x12\x06\x0A\x02P3\x10\x04\x12\x06\x0A\x02P4\x10\x05:q\xEAAn\x0A cloudsupport.googleapis.com/Case\x12)organizations/{organization}/cases/{case}\x12\x1Fprojects/{project}/cases/{case}\"m\x0A\x12CaseClassification\x12\x0A\x0A\x02id\x18\x03 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x04 \x01(\x09\x125\x0A\x07product\x18\x0A \x01(\x0B2\$.google.cloud.support.v2beta.Product\"I\x0A\x07Product\x12>\x0A\x0Cproduct_line\x18\x01 \x01(\x0E2(.google.cloud.support.v2beta.ProductLine*N\x0A\x0BProductLine\x12\x1C\x0A\x18PRODUCT_LINE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CGOOGLE_CLOUD\x10\x01\x12\x0F\x0A\x0BGOOGLE_MAPS\x10\x02B\xC6\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x09CaseProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php new file mode 100644 index 000000000000..998bb4bd4afc --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xC8\x09\x0AinternalAddGeneratedFile( + "\x0A\xB7\x19\x0ADgoogle/cloud/support/v2beta/support_event_subscription_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1Agoogle.cloud.support.v2beta.Actor + */ +class Actor extends \Google\Protobuf\Internal\Message +{ + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * + * Generated from protobuf field string email = 2 [deprecated = true]; + * @deprecated + */ + protected $email = ''; + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_support = false; + /** + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * + * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $username = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * @type string $email + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * @type bool $google_support + * Output only. Whether the actor is a Google support actor. + * @type string $username + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\Actor::initOnce(); + parent::__construct($data); + } + + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * + * Generated from protobuf field string email = 2 [deprecated = true]; + * @return string + * @deprecated + */ + public function getEmail() + { + if ($this->email !== '') { + @trigger_error('email is deprecated.', E_USER_DEPRECATED); + } + return $this->email; + } + + /** + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * + * Generated from protobuf field string email = 2 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setEmail($var) + { + @trigger_error('email is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGoogleSupport() + { + return $this->google_support; + } + + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGoogleSupport($var) + { + GPBUtil::checkBool($var); + $this->google_support = $var; + + return $this; + } + + /** + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * + * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * + * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php new file mode 100644 index 000000000000..59369f69aad9 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php @@ -0,0 +1,267 @@ +google.cloud.support.v2beta.Attachment + */ +class Attachment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The time at which the attachment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = null; + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + */ + protected $filename = ''; + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $mime_type = ''; + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. The resource name of the attachment. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the attachment was created. + * @type \Google\Cloud\Support\V2beta\Actor $creator + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * @type string $filename + * The filename of the attachment (e.g. `"graph.jpg"`). + * @type string $mime_type + * Output only. The MIME type of the attachment (e.g. text/plain). + * @type int|string $size_bytes + * Output only. The size of the attachment in bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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. The time at which the attachment was created. + * + * 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. The time at which the attachment was created. + * + * 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. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + * @return string + */ + public function getFilename() + { + return $this->filename; + } + + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + * @param string $var + * @return $this + */ + public function setFilename($var) + { + GPBUtil::checkString($var, True); + $this->filename = $var; + + return $this; + } + + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->size_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php new file mode 100644 index 000000000000..804aaa392f49 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php @@ -0,0 +1,181 @@ +google.cloud.support.v2beta.CaseClassification + */ +class CaseClassification extends \Google\Protobuf\Internal\Message +{ + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * + * Generated from protobuf field string id = 3; + */ + protected $id = ''; + /** + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + /** + * The full product the classification corresponds to. + * + * Generated from protobuf field .google.cloud.support.v2beta.Product product = 10; + */ + protected $product = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * @type string $display_name + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * @type \Google\Cloud\Support\V2beta\Product $product + * The full product the classification corresponds to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\PBCase::initOnce(); + parent::__construct($data); + } + + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * + * Generated from protobuf field string id = 3; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * + * Generated from protobuf field string id = 3; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * + * Generated from protobuf field string display_name = 4; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The full product the classification corresponds to. + * + * Generated from protobuf field .google.cloud.support.v2beta.Product product = 10; + * @return \Google\Cloud\Support\V2beta\Product|null + */ + public function getProduct() + { + return $this->product; + } + + public function hasProduct() + { + return isset($this->product); + } + + public function clearProduct() + { + unset($this->product); + } + + /** + * The full product the classification corresponds to. + * + * Generated from protobuf field .google.cloud.support.v2beta.Product product = 10; + * @param \Google\Cloud\Support\V2beta\Product $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Product::class); + $this->product = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php new file mode 100644 index 000000000000..09abfd6689fb --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php @@ -0,0 +1,67 @@ +google.cloud.support.v2beta.CloseCaseRequest + */ +class CloseCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case to close. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the case to close. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case to close. + * + * 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 name of the case to close. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php new file mode 100644 index 000000000000..12b50d25f5a2 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php @@ -0,0 +1,245 @@ +google.cloud.support.v2beta.Comment + */ +class Comment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. The resource name of the comment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The time when the comment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The user or Google Support agent who created the comment. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = null; + /** + * The full comment body. + * Maximum of 12800 characters. + * + * Generated from protobuf field string body = 4; + */ + protected $body = ''; + /** + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * + * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $plain_text_body = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. The resource name of the comment. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the comment was created. + * @type \Google\Cloud\Support\V2beta\Actor $creator + * Output only. The user or Google Support agent who created the comment. + * @type string $body + * The full comment body. + * Maximum of 12800 characters. + * @type string $plain_text_body + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\Comment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. The resource name of the comment. + * + * 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. The resource name of the comment. + * + * 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; + } + + /** + * Output only. The time when the comment was created. + * + * 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. The time when the comment was created. + * + * 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. The user or Google Support agent who created the comment. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * Output only. The user or Google Support agent who created the comment. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * The full comment body. + * Maximum of 12800 characters. + * + * Generated from protobuf field string body = 4; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * The full comment body. + * Maximum of 12800 characters. + * + * Generated from protobuf field string body = 4; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + + /** + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * + * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + * @deprecated + */ + public function getPlainTextBody() + { + if ($this->plain_text_body !== '') { + @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); + } + return $this->plain_text_body; + } + + /** + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * + * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + * @deprecated + */ + public function setPlainTextBody($var) + { + @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->plain_text_body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php new file mode 100644 index 000000000000..3e6af8730079 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php @@ -0,0 +1,127 @@ +google.cloud.support.v2beta.CreateCaseRequest + */ +class CreateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent under which the case should be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The case to be created. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $case = null; + + /** + * @param string $parent Required. The name of the parent under which the case should be created. Please see + * {@see CaseServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\Support\V2beta\PBCase $case Required. The case to be created. + * + * @return \Google\Cloud\Support\V2beta\CreateCaseRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2beta\PBCase $case): self + { + return (new self()) + ->setParent($parent) + ->setCase($case); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent under which the case should be created. + * @type \Google\Cloud\Support\V2beta\PBCase $case + * Required. The case to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent under which the case should be created. + * + * 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 name of the parent under which the case should be created. + * + * 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 case to be created. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2beta\PBCase|null + */ + public function getCase() + { + return $this->case; + } + + public function hasCase() + { + return isset($this->case); + } + + public function clearCase() + { + unset($this->case); + } + + /** + * Required. The case to be created. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2beta\PBCase $var + * @return $this + */ + public function setCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\PBCase::class); + $this->case = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php new file mode 100644 index 000000000000..73722d599bcd --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php @@ -0,0 +1,127 @@ +google.cloud.support.v2beta.CreateCommentRequest + */ +class CreateCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case to which the comment should be added. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The comment to be added. + * + * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $comment = null; + + /** + * @param string $parent Required. The name of the case to which the comment should be added. Please see + * {@see CommentServiceClient::caseName()} for help formatting this field. + * @param \Google\Cloud\Support\V2beta\Comment $comment Required. The comment to be added. + * + * @return \Google\Cloud\Support\V2beta\CreateCommentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2beta\Comment $comment): self + { + return (new self()) + ->setParent($parent) + ->setComment($comment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the case to which the comment should be added. + * @type \Google\Cloud\Support\V2beta\Comment $comment + * Required. The comment to be added. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case to which the comment should be added. + * + * 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 name of the case to which the comment should be added. + * + * 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 comment to be added. + * + * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2beta\Comment|null + */ + public function getComment() + { + return $this->comment; + } + + public function hasComment() + { + return isset($this->comment); + } + + public function clearComment() + { + unset($this->comment); + } + + /** + * Required. The comment to be added. + * + * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2beta\Comment $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Comment::class); + $this->comment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..406c06c8dd58 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php @@ -0,0 +1,132 @@ +google.cloud.support.v2beta.CreateSupportEventSubscriptionRequest + */ +class CreateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Pub/Sub configuration to create. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $support_event_subscription = null; + + /** + * @param string $parent Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_id} + * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. + * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription Required. The Pub/Sub configuration to create. + * + * @return \Google\Cloud\Support\V2beta\CreateSupportEventSubscriptionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription): self + { + return (new self()) + ->setParent($parent) + ->setSupportEventSubscription($supportEventSubscription); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_id} + * @type \Google\Cloud\Support\V2beta\SupportEventSubscription $support_event_subscription + * Required. The Pub/Sub configuration to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_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 parent resource name where the support event subscription + * will be created. Format: organizations/{organization_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 Pub/Sub configuration to create. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2beta\SupportEventSubscription|null + */ + public function getSupportEventSubscription() + { + return $this->support_event_subscription; + } + + public function hasSupportEventSubscription() + { + return isset($this->support_event_subscription); + } + + public function clearSupportEventSubscription() + { + unset($this->support_event_subscription); + } + + /** + * Required. The Pub/Sub configuration to create. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $var + * @return $this + */ + public function setSupportEventSubscription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\SupportEventSubscription::class); + $this->support_event_subscription = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..749156d44fd3 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php @@ -0,0 +1,91 @@ +google.cloud.support.v2beta.DeleteSupportEventSubscriptionRequest + */ +class DeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\DeleteSupportEventSubscriptionRequest + * + * @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 name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php new file mode 100644 index 000000000000..fd71d8833511 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php @@ -0,0 +1,309 @@ +google.cloud.support.v2beta.EmailMessage + */ +class EmailMessage extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Resource name for the email message. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Time when this email message object was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The user or Google Support agent that created this email + * message. This is inferred from the headers on the email message. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor actor = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $actor = null; + /** + * Output only. Subject of the email. + * + * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $subject = ''; + /** + * Output only. Email addresses the email was sent to. + * + * Generated from protobuf field repeated string recipient_email_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $recipient_email_addresses; + /** + * Output only. Email addresses CCed on the email. + * + * Generated from protobuf field repeated string cc_email_addresses = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $cc_email_addresses; + /** + * Output only. The full email message body. A best-effort attempt is made to + * remove extraneous reply threads. + * + * Generated from protobuf field .google.cloud.support.v2beta.TextContent body_content = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $body_content = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Resource name for the email message. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time when this email message object was created. + * @type \Google\Cloud\Support\V2beta\Actor $actor + * Output only. The user or Google Support agent that created this email + * message. This is inferred from the headers on the email message. + * @type string $subject + * Output only. Subject of the email. + * @type string[] $recipient_email_addresses + * Output only. Email addresses the email was sent to. + * @type string[] $cc_email_addresses + * Output only. Email addresses CCed on the email. + * @type \Google\Cloud\Support\V2beta\TextContent $body_content + * Output only. The full email message body. A best-effort attempt is made to + * remove extraneous reply threads. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\EmailMessage::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Resource name for the email message. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Resource name for the email message. + * + * 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. Time when this email message object was created. + * + * 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. Time when this email message object was created. + * + * 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. The user or Google Support agent that created this email + * message. This is inferred from the headers on the email message. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor actor = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\Actor|null + */ + public function getActor() + { + return $this->actor; + } + + public function hasActor() + { + return isset($this->actor); + } + + public function clearActor() + { + unset($this->actor); + } + + /** + * Output only. The user or Google Support agent that created this email + * message. This is inferred from the headers on the email message. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor actor = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\Actor $var + * @return $this + */ + public function setActor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); + $this->actor = $var; + + return $this; + } + + /** + * Output only. Subject of the email. + * + * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSubject() + { + return $this->subject; + } + + /** + * Output only. Subject of the email. + * + * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSubject($var) + { + GPBUtil::checkString($var, True); + $this->subject = $var; + + return $this; + } + + /** + * Output only. Email addresses the email was sent to. + * + * Generated from protobuf field repeated string recipient_email_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + */ + public function getRecipientEmailAddresses() + { + return $this->recipient_email_addresses; + } + + /** + * Output only. Email addresses the email was sent to. + * + * Generated from protobuf field repeated string recipient_email_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string[] $var + * @return $this + */ + public function setRecipientEmailAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->recipient_email_addresses = $arr; + + return $this; + } + + /** + * Output only. Email addresses CCed on the email. + * + * Generated from protobuf field repeated string cc_email_addresses = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + */ + public function getCcEmailAddresses() + { + return $this->cc_email_addresses; + } + + /** + * Output only. Email addresses CCed on the email. + * + * Generated from protobuf field repeated string cc_email_addresses = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string[] $var + * @return $this + */ + public function setCcEmailAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->cc_email_addresses = $arr; + + return $this; + } + + /** + * Output only. The full email message body. A best-effort attempt is made to + * remove extraneous reply threads. + * + * Generated from protobuf field .google.cloud.support.v2beta.TextContent body_content = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\TextContent|null + */ + public function getBodyContent() + { + return $this->body_content; + } + + public function hasBodyContent() + { + return isset($this->body_content); + } + + public function clearBodyContent() + { + unset($this->body_content); + } + + /** + * Output only. The full email message body. A best-effort attempt is made to + * remove extraneous reply threads. + * + * Generated from protobuf field .google.cloud.support.v2beta.TextContent body_content = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\TextContent $var + * @return $this + */ + public function setBodyContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\TextContent::class); + $this->body_content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php new file mode 100644 index 000000000000..59acffdb5c87 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php @@ -0,0 +1,111 @@ +google.cloud.support.v2beta.EscalateCaseRequest + */ +class EscalateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case to be escalated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The escalation information to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2beta.Escalation escalation = 2; + */ + protected $escalation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the case to be escalated. + * @type \Google\Cloud\Support\V2beta\Escalation $escalation + * The escalation information to be sent with the escalation request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case to be escalated. + * + * 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 name of the case to be escalated. + * + * 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; + } + + /** + * The escalation information to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2beta.Escalation escalation = 2; + * @return \Google\Cloud\Support\V2beta\Escalation|null + */ + public function getEscalation() + { + return $this->escalation; + } + + public function hasEscalation() + { + return isset($this->escalation); + } + + public function clearEscalation() + { + unset($this->escalation); + } + + /** + * The escalation information to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2beta.Escalation escalation = 2; + * @param \Google\Cloud\Support\V2beta\Escalation $var + * @return $this + */ + public function setEscalation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Escalation::class); + $this->escalation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php new file mode 100644 index 000000000000..86610b1235f5 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php @@ -0,0 +1,105 @@ +google.cloud.support.v2beta.Escalation + */ +class Escalation extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2beta.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reason = 0; + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $justification = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $reason + * Required. The reason why the Case is being escalated. + * @type string $justification + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\Escalation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2beta.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReason() + { + return $this->reason; + } + + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2beta.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\Escalation\Reason::class); + $this->reason = $var; + + return $this; + } + + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getJustification() + { + return $this->justification; + } + + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setJustification($var) + { + GPBUtil::checkString($var, True); + $this->justification = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php new file mode 100644 index 000000000000..bd3d6fc6a7fe --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php @@ -0,0 +1,69 @@ +google.cloud.support.v2beta.Escalation.Reason + */ +class Reason +{ + /** + * The escalation reason is in an unknown state or has not been specified. + * + * Generated from protobuf enum REASON_UNSPECIFIED = 0; + */ + const REASON_UNSPECIFIED = 0; + /** + * The case is taking too long to resolve. + * + * Generated from protobuf enum RESOLUTION_TIME = 1; + */ + const RESOLUTION_TIME = 1; + /** + * The support agent does not have the expertise required to successfully + * resolve the issue. + * + * Generated from protobuf enum TECHNICAL_EXPERTISE = 2; + */ + const TECHNICAL_EXPERTISE = 2; + /** + * The issue is having a significant business impact. + * + * Generated from protobuf enum BUSINESS_IMPACT = 3; + */ + const BUSINESS_IMPACT = 3; + + private static $valueToName = [ + self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', + self::RESOLUTION_TIME => 'RESOLUTION_TIME', + self::TECHNICAL_EXPERTISE => 'TECHNICAL_EXPERTISE', + self::BUSINESS_IMPACT => 'BUSINESS_IMPACT', + ]; + + 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php new file mode 100644 index 000000000000..1e8aef659d41 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php @@ -0,0 +1,221 @@ +google.cloud.support.v2beta.FeedItem + */ +class FeedItem extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Time corresponding to the event of this item. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $event_time = null; + protected $event_object; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Support\V2beta\Comment $comment + * Output only. A comment added to the case. + * @type \Google\Cloud\Support\V2beta\Attachment $attachment + * Output only. An attachment attached to the case. + * @type \Google\Cloud\Support\V2beta\EmailMessage $email_message + * Output only. An email message received in reply to the case. + * @type \Google\Cloud\Support\V2beta\Attachment $deleted_attachment + * Output only. A deleted attachment that used to be associated with the + * support case. + * @type \Google\Protobuf\Timestamp $event_time + * Output only. Time corresponding to the event of this item. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\FeedItem::initOnce(); + parent::__construct($data); + } + + /** + * Output only. A comment added to the case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\Comment|null + */ + public function getComment() + { + return $this->readOneof(100); + } + + public function hasComment() + { + return $this->hasOneof(100); + } + + /** + * Output only. A comment added to the case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\Comment $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Comment::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * Output only. An attachment attached to the case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Attachment attachment = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\Attachment|null + */ + public function getAttachment() + { + return $this->readOneof(101); + } + + public function hasAttachment() + { + return $this->hasOneof(101); + } + + /** + * Output only. An attachment attached to the case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Attachment attachment = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\Attachment $var + * @return $this + */ + public function setAttachment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Attachment::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Output only. An email message received in reply to the case. + * + * Generated from protobuf field .google.cloud.support.v2beta.EmailMessage email_message = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\EmailMessage|null + */ + public function getEmailMessage() + { + return $this->readOneof(102); + } + + public function hasEmailMessage() + { + return $this->hasOneof(102); + } + + /** + * Output only. An email message received in reply to the case. + * + * Generated from protobuf field .google.cloud.support.v2beta.EmailMessage email_message = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\EmailMessage $var + * @return $this + */ + public function setEmailMessage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\EmailMessage::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * Output only. A deleted attachment that used to be associated with the + * support case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Attachment deleted_attachment = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\Attachment|null + */ + public function getDeletedAttachment() + { + return $this->readOneof(103); + } + + public function hasDeletedAttachment() + { + return $this->hasOneof(103); + } + + /** + * Output only. A deleted attachment that used to be associated with the + * support case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Attachment deleted_attachment = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\Attachment $var + * @return $this + */ + public function setDeletedAttachment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Attachment::class); + $this->writeOneof(103, $var); + + return $this; + } + + /** + * Output only. Time corresponding to the event of this item. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * Output only. Time corresponding to the event of this item. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getEventObject() + { + return $this->whichOneof("event_object"); + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php new file mode 100644 index 000000000000..579ba88a3902 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2beta.GetAttachmentRequest + */ +class GetAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the attachment to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the attachment to get. Please see + * {@see CaseAttachmentServiceClient::attachmentName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\GetAttachmentRequest + * + * @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 name of the attachment to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the attachment to get. + * + * 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 name of the attachment to get. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php new file mode 100644 index 000000000000..ff14ec737b03 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2beta.GetCaseRequest + */ +class GetCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of a case to be retrieved. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full name of a case to be retrieved. Please see + * {@see CaseServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\GetCaseRequest + * + * @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 full name of a case to be retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of a case to be retrieved. + * + * 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 full name of a case to be retrieved. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php new file mode 100644 index 000000000000..32f4fe3c943f --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2beta.GetCommentRequest + */ +class GetCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the comment to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the comment to retrieve. Please see + * {@see CommentServiceClient::commentName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\GetCommentRequest + * + * @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 name of the comment to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the comment to retrieve. + * + * 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 name of the comment to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..ce6febd2d464 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php @@ -0,0 +1,91 @@ +google.cloud.support.v2beta.GetSupportEventSubscriptionRequest + */ +class GetSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\GetSupportEventSubscriptionRequest + * + * @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 name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php new file mode 100644 index 000000000000..22e0f596a164 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php @@ -0,0 +1,173 @@ +google.cloud.support.v2beta.ListAttachmentsRequest + */ +class ListAttachmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case for which attachments should be listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the case for which attachments should be listed. Please see + * {@see CaseAttachmentServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\ListAttachmentsRequest + * + * @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 name of the case for which attachments should be listed. + * @type int $page_size + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case for which attachments should be listed. + * + * 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 name of the case for which attachments should be listed. + * + * 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; + } + + /** + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php new file mode 100644 index 000000000000..8260ee7d199d --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2beta.ListAttachmentsResponse + */ +class ListAttachmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of attachments associated with a case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Attachment attachments = 1; + */ + private $attachments; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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\Support\V2beta\Attachment[] $attachments + * The list of attachments associated with a case. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * The list of attachments associated with a case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Attachment attachments = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\Attachment> + */ + public function getAttachments() + { + return $this->attachments; + } + + /** + * The list of attachments associated with a case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Attachment attachments = 1; + * @param \Google\Cloud\Support\V2beta\Attachment[] $var + * @return $this + */ + public function setAttachments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\Attachment::class); + $this->attachments = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php new file mode 100644 index 000000000000..7623afe88571 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php @@ -0,0 +1,287 @@ +google.cloud.support.v2beta.ListCasesRequest + */ +class ListCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of a parent to list cases under. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + /** + * The product line to request cases for. If unspecified, only + * Google Cloud cases will be returned. + * + * Generated from protobuf field optional .google.cloud.support.v2beta.ProductLine product_line = 8; + */ + protected $product_line = null; + + /** + * @param string $parent Required. The name of a parent to list cases under. Please see + * {@see CaseServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\ListCasesRequest + * + * @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 name of a parent to list cases under. + * @type string $filter + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * @type int $page_size + * The maximum number of cases fetched with each request. Defaults to 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * @type int $product_line + * The product line to request cases for. If unspecified, only + * Google Cloud cases will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of a parent to list cases under. + * + * 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 name of a parent to list cases under. + * + * 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; + } + + /** + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The product line to request cases for. If unspecified, only + * Google Cloud cases will be returned. + * + * Generated from protobuf field optional .google.cloud.support.v2beta.ProductLine product_line = 8; + * @return int + */ + public function getProductLine() + { + return isset($this->product_line) ? $this->product_line : 0; + } + + public function hasProductLine() + { + return isset($this->product_line); + } + + public function clearProductLine() + { + unset($this->product_line); + } + + /** + * The product line to request cases for. If unspecified, only + * Google Cloud cases will be returned. + * + * Generated from protobuf field optional .google.cloud.support.v2beta.ProductLine product_line = 8; + * @param int $var + * @return $this + */ + public function setProductLine($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\ProductLine::class); + $this->product_line = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php new file mode 100644 index 000000000000..217fcabeaf16 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php @@ -0,0 +1,113 @@ +google.cloud.support.v2beta.ListCasesResponse + */ +class ListCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; + */ + private $cases; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * + * 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\Support\V2beta\PBCase[] $cases + * The list of cases associated with the parent after any + * filters have been applied. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\PBCase> + */ + public function getCases() + { + return $this->cases; + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; + * @param \Google\Cloud\Support\V2beta\PBCase[] $var + * @return $this + */ + public function setCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\PBCase::class); + $this->cases = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php new file mode 100644 index 000000000000..1fee69ba5c52 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php @@ -0,0 +1,153 @@ +google.cloud.support.v2beta.ListCommentsRequest + */ +class ListCommentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case for which to list comments. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of comments to fetch. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the case for which to list comments. Please see + * {@see CommentServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\ListCommentsRequest + * + * @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 name of the case for which to list comments. + * @type int $page_size + * The maximum number of comments to fetch. Defaults to 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case for which to list comments. + * + * 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 name of the case for which to list comments. + * + * 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; + } + + /** + * The maximum number of comments to fetch. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of comments to fetch. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * + * Generated from protobuf field string page_token = 5; + * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php new file mode 100644 index 000000000000..98b78c99579e --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2beta.ListCommentsResponse + */ +class ListCommentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of the comments associated with the case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Comment comments = 1; + */ + private $comments; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * + * 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\Support\V2beta\Comment[] $comments + * List of the comments associated with the case. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * List of the comments associated with the case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Comment comments = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\Comment> + */ + public function getComments() + { + return $this->comments; + } + + /** + * List of the comments associated with the case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Comment comments = 1; + * @param \Google\Cloud\Support\V2beta\Comment[] $var + * @return $this + */ + public function setComments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\Comment::class); + $this->comments = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php new file mode 100644 index 000000000000..975a70aa91fc --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php @@ -0,0 +1,274 @@ +google.cloud.support.v2beta.ListSupportEventSubscriptionsRequest + */ +class ListSupportEventSubscriptionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * + * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_deleted = false; + /** + * Optional. The maximum number of support event subscriptions to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_id} + * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\ListSupportEventSubscriptionsRequest + * + * @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 fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_id} + * @type string $filter + * Optional. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * @type bool $show_deleted + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * @type int $page_size + * Optional. The maximum number of support event subscriptions to return. + * @type string $page_token + * Optional. A token identifying the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_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 fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_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. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * + * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * + * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + + /** + * Optional. The maximum number of support event subscriptions to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of support event subscriptions to return. + * + * 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 the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * + * 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 the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php new file mode 100644 index 000000000000..399066f36b1d --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.support.v2beta.ListSupportEventSubscriptionsResponse + */ +class ListSupportEventSubscriptionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The support event subscriptions. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.SupportEventSubscription support_event_subscriptions = 1; + */ + private $support_event_subscriptions; + /** + * A token, which can be sent 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\Support\V2beta\SupportEventSubscription[] $support_event_subscriptions + * The support event subscriptions. + * @type string $next_page_token + * A token, which can be sent 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\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * The support event subscriptions. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.SupportEventSubscription support_event_subscriptions = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\SupportEventSubscription> + */ + public function getSupportEventSubscriptions() + { + return $this->support_event_subscriptions; + } + + /** + * The support event subscriptions. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.SupportEventSubscription support_event_subscriptions = 1; + * @param \Google\Cloud\Support\V2beta\SupportEventSubscription[] $var + * @return $this + */ + public function setSupportEventSubscriptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\SupportEventSubscription::class); + $this->support_event_subscriptions = $arr; + + return $this; + } + + /** + * A token, which can be sent 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, which can be sent 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php new file mode 100644 index 000000000000..fad5de1eb73e --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php @@ -0,0 +1,654 @@ +google.cloud.support.v2beta.Case + */ +class PBCase extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name for the case. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2beta.CaseClassification classification = 4; + */ + protected $classification = null; + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + */ + protected $time_zone = ''; + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + */ + private $subscriber_email_addresses; + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 15; + */ + protected $creator = null; + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + */ + protected $contact_email = ''; + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + */ + protected $escalated = false; + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + */ + protected $test_case = false; + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + */ + protected $language_code = ''; + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case.Priority priority = 32; + */ + protected $priority = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name for the case. + * @type string $display_name + * The short summary of the issue reported in this case. + * @type string $description + * A broad description of the issue. + * @type \Google\Cloud\Support\V2beta\CaseClassification $classification + * The issue classification applicable to this case. + * @type string $time_zone + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * @type string[] $subscriber_email_addresses + * The email addresses to receive updates on this case. + * @type int $state + * Output only. The current status of the support case. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time this case was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time this case was last updated. + * @type \Google\Cloud\Support\V2beta\Actor $creator + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * @type string $contact_email + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * @type bool $escalated + * Whether the case is currently escalated. + * @type bool $test_case + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * @type string $language_code + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * @type int $priority + * The priority of this case. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\PBCase::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name for the case. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name for the case. + * + * 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; + } + + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2beta.CaseClassification classification = 4; + * @return \Google\Cloud\Support\V2beta\CaseClassification|null + */ + public function getClassification() + { + return $this->classification; + } + + public function hasClassification() + { + return isset($this->classification); + } + + public function clearClassification() + { + unset($this->classification); + } + + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2beta.CaseClassification classification = 4; + * @param \Google\Cloud\Support\V2beta\CaseClassification $var + * @return $this + */ + public function setClassification($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\CaseClassification::class); + $this->classification = $var; + + return $this; + } + + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + * @return RepeatedField + */ + public function getSubscriberEmailAddresses() + { + return $this->subscriber_email_addresses; + } + + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + * @param string[] $var + * @return $this + */ + public function setSubscriberEmailAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->subscriber_email_addresses = $arr; + + return $this; + } + + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\PBCase\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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. The time this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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; + } + + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 15; + * @return \Google\Cloud\Support\V2beta\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 15; + * @param \Google\Cloud\Support\V2beta\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + * @return string + */ + public function getContactEmail() + { + return $this->contact_email; + } + + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + * @param string $var + * @return $this + */ + public function setContactEmail($var) + { + GPBUtil::checkString($var, True); + $this->contact_email = $var; + + return $this; + } + + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + * @return bool + */ + public function getEscalated() + { + return $this->escalated; + } + + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + * @param bool $var + * @return $this + */ + public function setEscalated($var) + { + GPBUtil::checkBool($var); + $this->escalated = $var; + + return $this; + } + + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + * @return bool + */ + public function getTestCase() + { + return $this->test_case; + } + + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + * @param bool $var + * @return $this + */ + public function setTestCase($var) + { + GPBUtil::checkBool($var); + $this->test_case = $var; + + return $this; + } + + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case.Priority priority = 32; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case.Priority priority = 32; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\PBCase\Priority::class); + $this->priority = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php new file mode 100644 index 000000000000..051cdb63b60c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php @@ -0,0 +1,85 @@ +google.cloud.support.v2beta.Case.Priority + */ +class Priority +{ + /** + * Priority is undefined or has not been set yet. + * + * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; + */ + const PRIORITY_UNSPECIFIED = 0; + /** + * Extreme impact on a production service. Service is hard down. + * + * Generated from protobuf enum P0 = 1; + */ + const P0 = 1; + /** + * Critical impact on a production service. Service is currently unusable. + * + * Generated from protobuf enum P1 = 2; + */ + const P1 = 2; + /** + * Severe impact on a production service. Service is usable but greatly + * impaired. + * + * Generated from protobuf enum P2 = 3; + */ + const P2 = 3; + /** + * Medium impact on a production service. Service is available, but + * moderately impaired. + * + * Generated from protobuf enum P3 = 4; + */ + const P3 = 4; + /** + * General questions or minor issues. Production service is fully + * available. + * + * Generated from protobuf enum P4 = 5; + */ + const P4 = 5; + + private static $valueToName = [ + self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', + self::P0 => 'P0', + self::P1 => 'P1', + self::P2 => 'P2', + self::P3 => 'P3', + self::P4 => 'P4', + ]; + + 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php new file mode 100644 index 000000000000..29f64a2bed5c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php @@ -0,0 +1,86 @@ +google.cloud.support.v2beta.Case.State + */ +class State +{ + /** + * Case is in an unknown state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The case has been created but no one is assigned to work on it yet. + * + * Generated from protobuf enum NEW = 1; + */ + const PBNEW = 1; + /** + * The case is currently being handled by Google support. + * + * Generated from protobuf enum IN_PROGRESS_GOOGLE_SUPPORT = 2; + */ + const IN_PROGRESS_GOOGLE_SUPPORT = 2; + /** + * Google is waiting for a response. + * + * Generated from protobuf enum ACTION_REQUIRED = 3; + */ + const ACTION_REQUIRED = 3; + /** + * A solution has been offered for the case, but it isn't yet closed. + * + * Generated from protobuf enum SOLUTION_PROVIDED = 4; + */ + const SOLUTION_PROVIDED = 4; + /** + * The case has been resolved. + * + * Generated from protobuf enum CLOSED = 5; + */ + const CLOSED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PBNEW => 'NEW', + self::IN_PROGRESS_GOOGLE_SUPPORT => 'IN_PROGRESS_GOOGLE_SUPPORT', + self::ACTION_REQUIRED => 'ACTION_REQUIRED', + self::SOLUTION_PROVIDED => 'SOLUTION_PROVIDED', + 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)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php new file mode 100644 index 000000000000..c3544621a2df --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php @@ -0,0 +1,67 @@ +google.cloud.support.v2beta.Product + */ +class Product extends \Google\Protobuf\Internal\Message +{ + /** + * The product line of the Product. + * + * Generated from protobuf field .google.cloud.support.v2beta.ProductLine product_line = 1; + */ + protected $product_line = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $product_line + * The product line of the Product. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\PBCase::initOnce(); + parent::__construct($data); + } + + /** + * The product line of the Product. + * + * Generated from protobuf field .google.cloud.support.v2beta.ProductLine product_line = 1; + * @return int + */ + public function getProductLine() + { + return $this->product_line; + } + + /** + * The product line of the Product. + * + * Generated from protobuf field .google.cloud.support.v2beta.ProductLine product_line = 1; + * @param int $var + * @return $this + */ + public function setProductLine($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\ProductLine::class); + $this->product_line = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php new file mode 100644 index 000000000000..9df6d79ba10a --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php @@ -0,0 +1,61 @@ +google.cloud.support.v2beta.ProductLine + */ +class ProductLine +{ + /** + * Unknown product type. + * + * Generated from protobuf enum PRODUCT_LINE_UNSPECIFIED = 0; + */ + const PRODUCT_LINE_UNSPECIFIED = 0; + /** + * Google Cloud + * + * Generated from protobuf enum GOOGLE_CLOUD = 1; + */ + const GOOGLE_CLOUD = 1; + /** + * Google Maps + * + * Generated from protobuf enum GOOGLE_MAPS = 2; + */ + const GOOGLE_MAPS = 2; + + private static $valueToName = [ + self::PRODUCT_LINE_UNSPECIFIED => 'PRODUCT_LINE_UNSPECIFIED', + self::GOOGLE_CLOUD => 'GOOGLE_CLOUD', + self::GOOGLE_MAPS => 'GOOGLE_MAPS', + ]; + + 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php new file mode 100644 index 000000000000..8bfcfda2cd22 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php @@ -0,0 +1,191 @@ +google.cloud.support.v2beta.SearchCaseClassificationsRequest + */ +class SearchCaseClassificationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + /** + * The maximum number of classifications fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. The product to return case classifications for. + * + * Generated from protobuf field .google.cloud.support.v2beta.Product product = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $product = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * @type int $page_size + * The maximum number of classifications fetched with each request. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * @type \Google\Cloud\Support\V2beta\Product $product + * Optional. The product to return case classifications for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The maximum number of classifications fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of classifications fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The product to return case classifications for. + * + * Generated from protobuf field .google.cloud.support.v2beta.Product product = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Support\V2beta\Product|null + */ + public function getProduct() + { + return $this->product; + } + + public function hasProduct() + { + return isset($this->product); + } + + public function clearProduct() + { + unset($this->product); + } + + /** + * Optional. The product to return case classifications for. + * + * Generated from protobuf field .google.cloud.support.v2beta.Product product = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Support\V2beta\Product $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Product::class); + $this->product = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php new file mode 100644 index 000000000000..71c9b17fddd7 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2beta.SearchCaseClassificationsResponse + */ +class SearchCaseClassificationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.CaseClassification case_classifications = 1; + */ + private $case_classifications; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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\Support\V2beta\CaseClassification[] $case_classifications + * The classifications retrieved. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.CaseClassification case_classifications = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\CaseClassification> + */ + public function getCaseClassifications() + { + return $this->case_classifications; + } + + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.CaseClassification case_classifications = 1; + * @param \Google\Cloud\Support\V2beta\CaseClassification[] $var + * @return $this + */ + public function setCaseClassifications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\CaseClassification::class); + $this->case_classifications = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php new file mode 100644 index 000000000000..cfc445fa224a --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php @@ -0,0 +1,317 @@ +google.cloud.support.v2beta.SearchCasesRequest + */ +class SearchCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the parent resource to search for cases under. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + /** + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The name of the parent resource to search for cases under. + * @type string $query + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * @type int $page_size + * The maximum number of cases fetched with each request. The default page + * size is 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the parent resource to search for cases under. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The name of the parent resource to search for cases under. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php new file mode 100644 index 000000000000..ee2c8f233996 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php @@ -0,0 +1,113 @@ +google.cloud.support.v2beta.SearchCasesResponse + */ +class SearchCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; + */ + private $cases; + /** + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * + * 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\Support\V2beta\PBCase[] $cases + * The list of cases associated with the parent after any + * filters have been applied. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\PBCase> + */ + public function getCases() + { + return $this->cases; + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; + * @param \Google\Cloud\Support\V2beta\PBCase[] $var + * @return $this + */ + public function setCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\PBCase::class); + $this->cases = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php new file mode 100644 index 000000000000..f499a100b720 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php @@ -0,0 +1,208 @@ +google.cloud.support.v2beta.ShowFeedRequest + */ +class ShowFeedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the case for which feed items should be + * listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Field to order feed items by, followed by `asc` or `desc` + * postfix. The only valid field is + * `creation_time`. This list is case-insensitive, default sorting order is + * ascending, and the redundant space characters are insignificant. + * Example: `creation_time desc` + * + * Generated from protobuf field string order_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. The maximum number of feed items fetched with each request. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying the page of results to return. If + * unspecified, it retrieves the first page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the case for which feed items should be + * listed. Please see + * {@see FeedServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\ShowFeedRequest + * + * @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 resource name of the case for which feed items should be + * listed. + * @type string $order_by + * Optional. Field to order feed items by, followed by `asc` or `desc` + * postfix. The only valid field is + * `creation_time`. This list is case-insensitive, default sorting order is + * ascending, and the redundant space characters are insignificant. + * Example: `creation_time desc` + * @type int $page_size + * Optional. The maximum number of feed items fetched with each request. + * @type string $page_token + * Optional. A token identifying the page of results to return. If + * unspecified, it retrieves the first page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\FeedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the case for which feed items should be + * listed. + * + * 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 resource name of the case for which feed items should be + * listed. + * + * 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. Field to order feed items by, followed by `asc` or `desc` + * postfix. The only valid field is + * `creation_time`. This list is case-insensitive, default sorting order is + * ascending, and the redundant space characters are insignificant. + * Example: `creation_time desc` + * + * Generated from protobuf field string order_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Field to order feed items by, followed by `asc` or `desc` + * postfix. The only valid field is + * `creation_time`. This list is case-insensitive, default sorting order is + * ascending, and the redundant space characters are insignificant. + * Example: `creation_time desc` + * + * Generated from protobuf field string order_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. The maximum number of feed items fetched with each request. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of feed items fetched with each request. + * + * Generated from protobuf field int32 page_size = 3 [(.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 the page of results to return. If + * unspecified, it retrieves the first page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying the page of results to return. If + * unspecified, it retrieves the first page. + * + * Generated from protobuf field string page_token = 4 [(.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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php new file mode 100644 index 000000000000..a8c8646a2c51 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2beta.ShowFeedResponse + */ +class ShowFeedResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of feed items associated with the given Case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.FeedItem feed_items = 1; + */ + private $feed_items; + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `ShowFeedRequests`. + * If unspecified, there are no more results to retrieve. + * + * 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\Support\V2beta\FeedItem[] $feed_items + * The list of feed items associated with the given Case. + * @type string $next_page_token + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `ShowFeedRequests`. + * If unspecified, there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\FeedService::initOnce(); + parent::__construct($data); + } + + /** + * The list of feed items associated with the given Case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.FeedItem feed_items = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\FeedItem> + */ + public function getFeedItems() + { + return $this->feed_items; + } + + /** + * The list of feed items associated with the given Case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.FeedItem feed_items = 1; + * @param \Google\Cloud\Support\V2beta\FeedItem[] $var + * @return $this + */ + public function setFeedItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\FeedItem::class); + $this->feed_items = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `ShowFeedRequests`. + * If unspecified, there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `ShowFeedRequests`. + * If unspecified, there are no more results to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php new file mode 100644 index 000000000000..00735a9a48d8 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php @@ -0,0 +1,353 @@ +google.cloud.support.v2beta.SupportEventSubscription + */ +class SupportEventSubscription extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the support event subscription. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * + * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pub_sub_topic = ''; + /** + * Output only. The state of the subscription. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failure_reason = 0; + /** + * Output only. The time at which the subscription was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which the subscription was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The time at which the subscription was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. The time at which the subscription will be purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $purge_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the support event subscription. + * @type string $pub_sub_topic + * Required. The name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * @type int $state + * Output only. The state of the subscription. + * @type int $failure_reason + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the subscription was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which the subscription was last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The time at which the subscription was deleted. + * @type \Google\Protobuf\Timestamp $purge_time + * Output only. The time at which the subscription will be purged. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscription::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the support event subscription. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the support event subscription. + * + * 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 name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * + * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPubSubTopic() + { + return $this->pub_sub_topic; + } + + /** + * Required. The name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * + * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPubSubTopic($var) + { + GPBUtil::checkString($var, True); + $this->pub_sub_topic = $var; + + return $this; + } + + /** + * Output only. The state of the subscription. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the subscription. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\SupportEventSubscription\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFailureReason() + { + return $this->failure_reason; + } + + /** + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFailureReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\SupportEventSubscription\FailureReason::class); + $this->failure_reason = $var; + + return $this; + } + + /** + * Output only. The time at which the subscription was created. + * + * 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. The time at which the subscription was created. + * + * 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. The time at which the subscription was last updated. + * + * 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. The time at which the subscription was last updated. + * + * 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. The time at which the subscription was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The time at which the subscription was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. The time at which the subscription will be purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPurgeTime() + { + return $this->purge_time; + } + + public function hasPurgeTime() + { + return isset($this->purge_time); + } + + public function clearPurgeTime() + { + unset($this->purge_time); + } + + /** + * Output only. The time at which the subscription will be purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPurgeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->purge_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php new file mode 100644 index 000000000000..de7f91e52472 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php @@ -0,0 +1,70 @@ +google.cloud.support.v2beta.SupportEventSubscription.FailureReason + */ +class FailureReason +{ + /** + * Unspecified failure reason. + * + * Generated from protobuf enum FAILURE_REASON_UNSPECIFIED = 0; + */ + const FAILURE_REASON_UNSPECIFIED = 0; + /** + * The service account (i.e. + * cloud-support-apievents\@system.gserviceaccount.com) lacks the permission + * to publish to the customer's Pub/Sub topic. + * + * Generated from protobuf enum PERMISSION_DENIED = 1; + */ + const PERMISSION_DENIED = 1; + /** + * The specified Pub/Sub topic does not exist. + * + * Generated from protobuf enum TOPIC_NOT_FOUND = 2; + */ + const TOPIC_NOT_FOUND = 2; + /** + * Message failed to publish due to a system-side error. + * + * Generated from protobuf enum OTHER = 3; + */ + const OTHER = 3; + + private static $valueToName = [ + self::FAILURE_REASON_UNSPECIFIED => 'FAILURE_REASON_UNSPECIFIED', + self::PERMISSION_DENIED => 'PERMISSION_DENIED', + self::TOPIC_NOT_FOUND => 'TOPIC_NOT_FOUND', + self::OTHER => 'OTHER', + ]; + + 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php new file mode 100644 index 000000000000..e4c34e234dc3 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php @@ -0,0 +1,71 @@ +google.cloud.support.v2beta.SupportEventSubscription.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Subscription is active and working. + * + * Generated from protobuf enum WORKING = 1; + */ + const WORKING = 1; + /** + * Subscription is failing. Notifications cannot be published for some + * reason. + * + * Generated from protobuf enum FAILING = 2; + */ + const FAILING = 2; + /** + * Subscription has been deleted and is pending purge. Notifications are not + * sent for deleted subscriptions. Deleted subscriptions are purged after + * their `purge_time` has passed. + * + * Generated from protobuf enum DELETED = 3; + */ + const DELETED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::WORKING => 'WORKING', + self::FAILING => 'FAILING', + 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php new file mode 100644 index 000000000000..e34f8aa6e1ae --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php @@ -0,0 +1,67 @@ +google.cloud.support.v2beta.TextContent + */ +class TextContent extends \Google\Protobuf\Internal\Message +{ + /** + * Content in this field should be rendered and interpreted as-is. + * + * Generated from protobuf field string plain_text = 1; + */ + protected $plain_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $plain_text + * Content in this field should be rendered and interpreted as-is. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\Content::initOnce(); + parent::__construct($data); + } + + /** + * Content in this field should be rendered and interpreted as-is. + * + * Generated from protobuf field string plain_text = 1; + * @return string + */ + public function getPlainText() + { + return $this->plain_text; + } + + /** + * Content in this field should be rendered and interpreted as-is. + * + * Generated from protobuf field string plain_text = 1; + * @param string $var + * @return $this + */ + public function setPlainText($var) + { + GPBUtil::checkString($var, True); + $this->plain_text = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..82aa755ae583 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php @@ -0,0 +1,75 @@ +google.cloud.support.v2beta.UndeleteSupportEventSubscriptionRequest + */ +class UndeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php new file mode 100644 index 000000000000..00144f33d32c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php @@ -0,0 +1,167 @@ +google.cloud.support.v2beta.UpdateCaseRequest + */ +class UpdateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The case to update. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $case = null; + /** + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Support\V2beta\PBCase $case Required. The case to update. + * @param \Google\Protobuf\FieldMask $updateMask A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * @return \Google\Cloud\Support\V2beta\UpdateCaseRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Support\V2beta\PBCase $case, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCase($case) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Support\V2beta\PBCase $case + * Required. The case to update. + * @type \Google\Protobuf\FieldMask $update_mask + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The case to update. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2beta\PBCase|null + */ + public function getCase() + { + return $this->case; + } + + public function hasCase() + { + return isset($this->case); + } + + public function clearCase() + { + unset($this->case); + } + + /** + * Required. The case to update. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2beta\PBCase $var + * @return $this + */ + public function setCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\PBCase::class); + $this->case = $var; + + return $this; + } + + /** + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @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); + } + + /** + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..25630369d25c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php @@ -0,0 +1,146 @@ +google.cloud.support.v2beta.UpdateSupportEventSubscriptionRequest + */ +class UpdateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $support_event_subscription = null; + /** + * Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * @return \Google\Cloud\Support\V2beta\UpdateSupportEventSubscriptionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSupportEventSubscription($supportEventSubscription) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Support\V2beta\SupportEventSubscription $support_event_subscription + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2beta\SupportEventSubscription|null + */ + public function getSupportEventSubscription() + { + return $this->support_event_subscription; + } + + public function hasSupportEventSubscription() + { + return isset($this->support_event_subscription); + } + + public function clearSupportEventSubscription() + { + unset($this->support_event_subscription); + } + + /** + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $var + * @return $this + */ + public function setSupportEventSubscription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\SupportEventSubscription::class); + $this->support_event_subscription = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * 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. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * 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/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php new file mode 100644 index 000000000000..2e1f084ac7a8 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Attachment $response */ + $response = $caseAttachmentServiceClient->getAttachment($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 = CaseAttachmentServiceClient::attachmentName( + '[ORGANIZATION]', + '[CASE]', + '[ATTACHMENT_ID]' + ); + + get_attachment_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_CaseAttachmentService_GetAttachment_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php new file mode 100644 index 000000000000..f4eae9af7556 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseAttachmentServiceClient->listAttachments($request); + + /** @var Attachment $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 = CaseAttachmentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + list_attachments_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_CaseAttachmentService_ListAttachments_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php new file mode 100644 index 000000000000..872794606f3c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->closeCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + close_case_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_CaseService_CloseCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php new file mode 100644 index 000000000000..e6b2fb4d5f8d --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setCase($case); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->createCase($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 +{ + $formattedParent = CaseServiceClient::projectName('[PROJECT]'); + + create_case_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_CaseService_CreateCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php new file mode 100644 index 000000000000..7e040cb9b05e --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->escalateCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + escalate_case_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_CaseService_EscalateCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php new file mode 100644 index 000000000000..46c7e7f725bc --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->getCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + get_case_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_CaseService_GetCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php new file mode 100644 index 000000000000..c8001c3a45bc --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseServiceClient->listCases($request); + + /** @var PBCase $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 = CaseServiceClient::projectName('[PROJECT]'); + + list_cases_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_CaseService_ListCases_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php new file mode 100644 index 000000000000..d22043d60a9a --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php @@ -0,0 +1,71 @@ + "`. For example, + * `"Technical Issue > Compute > Compute Engine"`. + * + * Classification IDs returned by this endpoint are valid for at least six + * months. When a classification is deactivated, this endpoint immediately + * stops returning it. After six months, `case.create` requests using the + * classification will fail. + * + * 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 search_case_classifications_sample(): void +{ + // Create a client. + $caseServiceClient = new CaseServiceClient(); + + // Prepare the request message. + $request = new SearchCaseClassificationsRequest(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseServiceClient->searchCaseClassifications($request); + + /** @var CaseClassification $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 cloudsupport_v2beta_generated_CaseService_SearchCaseClassifications_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php new file mode 100644 index 000000000000..57e95d86f279 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php @@ -0,0 +1,62 @@ +searchCases($request); + + /** @var PBCase $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 cloudsupport_v2beta_generated_CaseService_SearchCases_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php new file mode 100644 index 000000000000..5d6da5dda2bc --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php @@ -0,0 +1,59 @@ +setCase($case); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->updateCase($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudsupport_v2beta_generated_CaseService_UpdateCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php new file mode 100644 index 000000000000..a4c6bc8eaf58 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php @@ -0,0 +1,75 @@ +setParent($formattedParent) + ->setComment($comment); + + // Call the API and handle any network failures. + try { + /** @var Comment $response */ + $response = $commentServiceClient->createComment($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 +{ + $formattedParent = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + create_comment_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_CommentService_CreateComment_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php new file mode 100644 index 000000000000..05fa2f51eaed --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Comment $response */ + $response = $commentServiceClient->getComment($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 = CommentServiceClient::commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); + + get_comment_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_CommentService_GetComment_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php new file mode 100644 index 000000000000..2549f5508593 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $commentServiceClient->listComments($request); + + /** @var Comment $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 = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + list_comments_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_CommentService_ListComments_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php b/owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php new file mode 100644 index 000000000000..98c127e2a626 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $feedServiceClient->showFeed($request); + + /** @var FeedItem $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 = FeedServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + show_feed_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_FeedService_ShowFeed_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php new file mode 100644 index 000000000000..08c3cfecd28b --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php @@ -0,0 +1,80 @@ +setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->createSupportEventSubscription($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 +{ + $formattedParent = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); + $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; + + create_support_event_subscription_sample($formattedParent, $supportEventSubscriptionPubSubTopic); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_CreateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php new file mode 100644 index 000000000000..2b80c814cb7c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->deleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + delete_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_DeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php new file mode 100644 index 000000000000..aa5b9e21636f --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->getSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + get_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_GetSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php new file mode 100644 index 000000000000..e1ec9e763534 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $supportEventSubscriptionServiceClient->listSupportEventSubscriptions($request); + + /** @var SupportEventSubscription $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 = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); + + list_support_event_subscriptions_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_ListSupportEventSubscriptions_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php new file mode 100644 index 000000000000..2177e3aecaa9 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->undeleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + undelete_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_UndeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php new file mode 100644 index 000000000000..690560ac45b7 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php @@ -0,0 +1,74 @@ +setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new UpdateSupportEventSubscriptionRequest()) + ->setSupportEventSubscription($supportEventSubscription); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->updateSupportEventSubscription($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 +{ + $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; + + update_support_event_subscription_sample($supportEventSubscriptionPubSubTopic); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_UpdateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php new file mode 100644 index 000000000000..d08be6f860e0 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php @@ -0,0 +1,403 @@ + getAttachmentAsync(GetAttachmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAttachmentsAsync(ListAttachmentsRequest $request, array $optionalArgs = []) + */ +final class CaseAttachmentServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2beta.CaseAttachmentService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/case_attachment_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/case_attachment_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/case_attachment_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/case_attachment_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a attachment + * resource. + * + * @param string $organization + * @param string $case + * @param string $attachmentId + * + * @return string The formatted attachment resource. + * + * @experimental + */ + public static function attachmentName(string $organization, string $case, string $attachmentId): string + { + return self::getPathTemplate('attachment')->render([ + 'organization' => $organization, + 'case' => $case, + 'attachment_id' => $attachmentId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + * + * @experimental + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + * + * @experimental + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case_attachment_id resource. + * + * @param string $organization + * @param string $case + * @param string $attachmentId + * + * @return string The formatted organization_case_attachment_id resource. + * + * @experimental + */ + public static function organizationCaseAttachmentIdName(string $organization, string $case, string $attachmentId): string + { + return self::getPathTemplate('organizationCaseAttachmentId')->render([ + 'organization' => $organization, + 'case' => $case, + 'attachment_id' => $attachmentId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + * + * @experimental + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_case_attachment_id resource. + * + * @param string $project + * @param string $case + * @param string $attachmentId + * + * @return string The formatted project_case_attachment_id resource. + * + * @experimental + */ + public static function projectCaseAttachmentIdName(string $project, string $case, string $attachmentId): string + { + return self::getPathTemplate('projectCaseAttachmentId')->render([ + 'project' => $project, + 'case' => $case, + 'attachment_id' => $attachmentId, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - attachment: organizations/{organization}/cases/{case}/attachments/{attachment_id} + * - case: organizations/{organization}/cases/{case} + * - organizationCase: organizations/{organization}/cases/{case} + * - organizationCaseAttachmentId: organizations/{organization}/cases/{case}/attachments/{attachment_id} + * - projectCase: projects/{project}/cases/{case} + * - projectCaseAttachmentId: projects/{project}/cases/{case}/attachments/{attachment_id} + * + * 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. + * + * @experimental + */ + 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 'cloudsupport.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\Support\V2beta\CaseAttachmentServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CaseAttachmentServiceClient(['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 + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Retrieve an attachment. + * + * The async variant is {@see CaseAttachmentServiceClient::getAttachmentAsync()} . + * + * @example samples/V2beta/CaseAttachmentServiceClient/get_attachment.php + * + * @param GetAttachmentRequest $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 Attachment + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getAttachment(GetAttachmentRequest $request, array $callOptions = []): Attachment + { + return $this->startApiCall('GetAttachment', $request, $callOptions)->wait(); + } + + /** + * List all the attachments associated with a support case. + * + * The async variant is {@see CaseAttachmentServiceClient::listAttachmentsAsync()} + * . + * + * @example samples/V2beta/CaseAttachmentServiceClient/list_attachments.php + * + * @param ListAttachmentsRequest $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. + * + * @experimental + */ + public function listAttachments(ListAttachmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAttachments', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php new file mode 100644 index 000000000000..1ee28a54ab51 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php @@ -0,0 +1,576 @@ + closeCaseAsync(CloseCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCaseAsync(CreateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface escalateCaseAsync(EscalateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCaseAsync(GetCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCasesAsync(ListCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchCaseClassificationsAsync(SearchCaseClassificationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchCasesAsync(SearchCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCaseAsync(UpdateCaseRequest $request, array $optionalArgs = []) + */ +final class CaseServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2beta.CaseService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/case_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/case_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/case_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/case_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + * + * @experimental + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + * + * @experimental + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + * + * @experimental + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + * + * @experimental + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + * + * @experimental + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - organization: organizations/{organization} + * - organizationCase: organizations/{organization}/cases/{case} + * - project: projects/{project} + * - projectCase: projects/{project}/cases/{case} + * + * 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. + * + * @experimental + */ + 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 'cloudsupport.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\Support\V2beta\CaseServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CaseServiceClient(['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 + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Close a case. + * + * The async variant is {@see CaseServiceClient::closeCaseAsync()} . + * + * @example samples/V2beta/CaseServiceClient/close_case.php + * + * @param CloseCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function closeCase(CloseCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('CloseCase', $request, $callOptions)->wait(); + } + + /** + * Create a new case and associate it with a parent. + * + * It must have the following fields set: `display_name`, `description`, + * `classification`, and `priority`. If you're just testing the API and don't + * want to route your case to an agent, set `testCase=true`. + * + * The async variant is {@see CaseServiceClient::createCaseAsync()} . + * + * @example samples/V2beta/CaseServiceClient/create_case.php + * + * @param CreateCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createCase(CreateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('CreateCase', $request, $callOptions)->wait(); + } + + /** + * Escalate a case, starting the Google Cloud Support escalation management + * process. + * + * This operation is only available for some support services. Go to + * https://cloud.google.com/support and look for 'Technical support + * escalations' in the feature list to find out which ones let you + * do that. + * + * The async variant is {@see CaseServiceClient::escalateCaseAsync()} . + * + * @example samples/V2beta/CaseServiceClient/escalate_case.php + * + * @param EscalateCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function escalateCase(EscalateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('EscalateCase', $request, $callOptions)->wait(); + } + + /** + * Retrieve a case. + * + * The async variant is {@see CaseServiceClient::getCaseAsync()} . + * + * @example samples/V2beta/CaseServiceClient/get_case.php + * + * @param GetCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getCase(GetCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('GetCase', $request, $callOptions)->wait(); + } + + /** + * Retrieve all cases under a parent, but not its children. + * + * For example, listing cases under an organization only returns the cases + * that are directly parented by that organization. To retrieve cases + * under an organization and its projects, use `cases.search`. + * + * The async variant is {@see CaseServiceClient::listCasesAsync()} . + * + * @example samples/V2beta/CaseServiceClient/list_cases.php + * + * @param ListCasesRequest $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. + * + * @experimental + */ + public function listCases(ListCasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCases', $request, $callOptions); + } + + /** + * Retrieve valid classifications to use when creating a support case. + * + * Classifications are hierarchical. Each classification is a string + * containing all levels of the hierarchy separated by `" > "`. For example, + * `"Technical Issue > Compute > Compute Engine"`. + * + * Classification IDs returned by this endpoint are valid for at least six + * months. When a classification is deactivated, this endpoint immediately + * stops returning it. After six months, `case.create` requests using the + * classification will fail. + * + * The async variant is {@see CaseServiceClient::searchCaseClassificationsAsync()} + * . + * + * @example samples/V2beta/CaseServiceClient/search_case_classifications.php + * + * @param SearchCaseClassificationsRequest $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. + * + * @experimental + */ + public function searchCaseClassifications(SearchCaseClassificationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchCaseClassifications', $request, $callOptions); + } + + /** + * Search for cases using a query. + * + * The async variant is {@see CaseServiceClient::searchCasesAsync()} . + * + * @example samples/V2beta/CaseServiceClient/search_cases.php + * + * @param SearchCasesRequest $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. + * + * @experimental + */ + public function searchCases(SearchCasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchCases', $request, $callOptions); + } + + /** + * Update a case. Only some fields can be updated. + * + * The async variant is {@see CaseServiceClient::updateCaseAsync()} . + * + * @example samples/V2beta/CaseServiceClient/update_case.php + * + * @param UpdateCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateCase(UpdateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('UpdateCase', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php new file mode 100644 index 000000000000..31930ea0515d --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php @@ -0,0 +1,434 @@ + createCommentAsync(CreateCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCommentAsync(GetCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCommentsAsync(ListCommentsRequest $request, array $optionalArgs = []) + */ +final class CommentServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2beta.CommentService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/comment_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/comment_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/comment_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/comment_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + * + * @experimental + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a comment + * resource. + * + * @param string $organization + * @param string $case + * @param string $comment + * + * @return string The formatted comment resource. + * + * @experimental + */ + public static function commentName(string $organization, string $case, string $comment): string + { + return self::getPathTemplate('comment')->render([ + 'organization' => $organization, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + * + * @experimental + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case_comment resource. + * + * @param string $organization + * @param string $case + * @param string $comment + * + * @return string The formatted organization_case_comment resource. + * + * @experimental + */ + public static function organizationCaseCommentName(string $organization, string $case, string $comment): string + { + return self::getPathTemplate('organizationCaseComment')->render([ + 'organization' => $organization, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + * + * @experimental + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_case_comment resource. + * + * @param string $project + * @param string $case + * @param string $comment + * + * @return string The formatted project_case_comment resource. + * + * @experimental + */ + public static function projectCaseCommentName(string $project, string $case, string $comment): string + { + return self::getPathTemplate('projectCaseComment')->render([ + 'project' => $project, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - comment: organizations/{organization}/cases/{case}/comments/{comment} + * - organizationCase: organizations/{organization}/cases/{case} + * - organizationCaseComment: organizations/{organization}/cases/{case}/comments/{comment} + * - projectCase: projects/{project}/cases/{case} + * - projectCaseComment: projects/{project}/cases/{case}/comments/{comment} + * + * 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. + * + * @experimental + */ + 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 'cloudsupport.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\Support\V2beta\CommentServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CommentServiceClient(['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 + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Add a new comment to a case. + * + * The comment must have the following fields set: `body`. + * + * The async variant is {@see CommentServiceClient::createCommentAsync()} . + * + * @example samples/V2beta/CommentServiceClient/create_comment.php + * + * @param CreateCommentRequest $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 Comment + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createComment(CreateCommentRequest $request, array $callOptions = []): Comment + { + return $this->startApiCall('CreateComment', $request, $callOptions)->wait(); + } + + /** + * Retrieve a comment. + * + * The async variant is {@see CommentServiceClient::getCommentAsync()} . + * + * @example samples/V2beta/CommentServiceClient/get_comment.php + * + * @param GetCommentRequest $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 Comment + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getComment(GetCommentRequest $request, array $callOptions = []): Comment + { + return $this->startApiCall('GetComment', $request, $callOptions)->wait(); + } + + /** + * List all the comments associated with a case. + * + * The async variant is {@see CommentServiceClient::listCommentsAsync()} . + * + * @example samples/V2beta/CommentServiceClient/list_comments.php + * + * @param ListCommentsRequest $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. + * + * @experimental + */ + public function listComments(ListCommentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListComments', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php new file mode 100644 index 000000000000..bd9204cb0a37 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php @@ -0,0 +1,306 @@ + showFeedAsync(ShowFeedRequest $request, array $optionalArgs = []) + */ +final class FeedServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2beta.FeedService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/feed_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/feed_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/feed_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/feed_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + * + * @experimental + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + * + * @experimental + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + * + * @experimental + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - organizationCase: organizations/{organization}/cases/{case} + * - projectCase: projects/{project}/cases/{case} + * + * 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. + * + * @experimental + */ + 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 'cloudsupport.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\Support\V2beta\FeedServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new FeedServiceClient(['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 + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Show items in the feed of this case, including case emails, + * attachments, and comments. + * + * The async variant is {@see FeedServiceClient::showFeedAsync()} . + * + * @example samples/V2beta/FeedServiceClient/show_feed.php + * + * @param ShowFeedRequest $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. + * + * @experimental + */ + public function showFeed(ShowFeedRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ShowFeed', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php new file mode 100644 index 000000000000..d9bc913ee4e9 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php @@ -0,0 +1,446 @@ + createSupportEventSubscriptionAsync(CreateSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSupportEventSubscriptionAsync(DeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSupportEventSubscriptionAsync(GetSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSupportEventSubscriptionsAsync(ListSupportEventSubscriptionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface undeleteSupportEventSubscriptionAsync(UndeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSupportEventSubscriptionAsync(UpdateSupportEventSubscriptionRequest $request, array $optionalArgs = []) + */ +final class SupportEventSubscriptionServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2beta.SupportEventSubscriptionService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/support_event_subscription_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + * + * @experimental + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * support_event_subscription resource. + * + * @param string $organization + * @param string $supportEventSubscription + * + * @return string The formatted support_event_subscription resource. + * + * @experimental + */ + public static function supportEventSubscriptionName(string $organization, string $supportEventSubscription): string + { + return self::getPathTemplate('supportEventSubscription')->render([ + 'organization' => $organization, + 'support_event_subscription' => $supportEventSubscription, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - organization: organizations/{organization} + * - supportEventSubscription: organizations/{organization}/supportEventSubscriptions/{support_event_subscription} + * + * 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. + * + * @experimental + */ + 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 'cloudsupport.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\Support\V2beta\SupportEventSubscriptionServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new SupportEventSubscriptionServiceClient(['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 + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Creates a support event subscription for an organization. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::createSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php + * + * @param CreateSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createSupportEventSubscription(CreateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('CreateSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Soft deletes a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::deleteSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php + * + * @param DeleteSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function deleteSupportEventSubscription(DeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('DeleteSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Gets a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::getSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php + * + * @param GetSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getSupportEventSubscription(GetSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('GetSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Lists support event subscriptions. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::listSupportEventSubscriptionsAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php + * + * @param ListSupportEventSubscriptionsRequest $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. + * + * @experimental + */ + public function listSupportEventSubscriptions(ListSupportEventSubscriptionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSupportEventSubscriptions', $request, $callOptions); + } + + /** + * Undeletes a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::undeleteSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php + * + * @param UndeleteSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function undeleteSupportEventSubscription(UndeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('UndeleteSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Updates a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::updateSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php + * + * @param UpdateSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateSupportEventSubscription(UpdateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('UpdateSupportEventSubscription', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json b/owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json new file mode 100644 index 000000000000..f91cf79c6b4d --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json @@ -0,0 +1,154 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.support.v2beta", + "libraryPackage": "Google\\Cloud\\Support\\V2beta", + "services": { + "CaseAttachmentService": { + "clients": { + "grpc": { + "libraryClient": "CaseAttachmentServiceGapicClient", + "rpcs": { + "GetAttachment": { + "methods": [ + "getAttachment" + ] + }, + "ListAttachments": { + "methods": [ + "listAttachments" + ] + } + } + } + } + }, + "CaseService": { + "clients": { + "grpc": { + "libraryClient": "CaseServiceGapicClient", + "rpcs": { + "CloseCase": { + "methods": [ + "closeCase" + ] + }, + "CreateCase": { + "methods": [ + "createCase" + ] + }, + "EscalateCase": { + "methods": [ + "escalateCase" + ] + }, + "GetCase": { + "methods": [ + "getCase" + ] + }, + "ListCases": { + "methods": [ + "listCases" + ] + }, + "SearchCaseClassifications": { + "methods": [ + "searchCaseClassifications" + ] + }, + "SearchCases": { + "methods": [ + "searchCases" + ] + }, + "UpdateCase": { + "methods": [ + "updateCase" + ] + } + } + } + } + }, + "CommentService": { + "clients": { + "grpc": { + "libraryClient": "CommentServiceGapicClient", + "rpcs": { + "CreateComment": { + "methods": [ + "createComment" + ] + }, + "GetComment": { + "methods": [ + "getComment" + ] + }, + "ListComments": { + "methods": [ + "listComments" + ] + } + } + } + } + }, + "FeedService": { + "clients": { + "grpc": { + "libraryClient": "FeedServiceGapicClient", + "rpcs": { + "ShowFeed": { + "methods": [ + "showFeed" + ] + } + } + } + } + }, + "SupportEventSubscriptionService": { + "clients": { + "grpc": { + "libraryClient": "SupportEventSubscriptionServiceGapicClient", + "rpcs": { + "CreateSupportEventSubscription": { + "methods": [ + "createSupportEventSubscription" + ] + }, + "DeleteSupportEventSubscription": { + "methods": [ + "deleteSupportEventSubscription" + ] + }, + "GetSupportEventSubscription": { + "methods": [ + "getSupportEventSubscription" + ] + }, + "ListSupportEventSubscriptions": { + "methods": [ + "listSupportEventSubscriptions" + ] + }, + "UndeleteSupportEventSubscription": { + "methods": [ + "undeleteSupportEventSubscription" + ] + }, + "UpdateSupportEventSubscription": { + "methods": [ + "updateSupportEventSubscription" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json new file mode 100644 index 000000000000..f19639a4ac33 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json @@ -0,0 +1,44 @@ +{ + "interfaces": { + "google.cloud.support.v2beta.CaseAttachmentService": { + "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": { + "GetAttachment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAttachments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php new file mode 100644 index 000000000000..287ae1c56302 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php @@ -0,0 +1,68 @@ + [ + 'google.cloud.support.v2beta.CaseAttachmentService' => [ + 'GetAttachment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\Attachment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAttachments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAttachments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\ListAttachmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'attachment' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', + 'case' => 'organizations/{organization}/cases/{case}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'organizationCaseAttachmentId' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', + 'projectCase' => 'projects/{project}/cases/{case}', + 'projectCaseAttachmentId' => 'projects/{project}/cases/{case}/attachments/{attachment_id}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php new file mode 100644 index 000000000000..6622e38fed04 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php @@ -0,0 +1,57 @@ + [ + 'google.cloud.support.v2beta.CaseAttachmentService' => [ + 'GetAttachment' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{name=*/*/cases/*/attachments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAttachments' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}/attachments', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}/attachments', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json new file mode 100644 index 000000000000..110f290f14da --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json @@ -0,0 +1,84 @@ +{ + "interfaces": { + "google.cloud.support.v2beta.CaseService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "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 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CloseCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EscalateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetCase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchCaseClassifications": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php new file mode 100644 index 000000000000..e197c704af4b --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php @@ -0,0 +1,148 @@ + [ + 'google.cloud.support.v2beta.CaseService' => [ + 'CloseCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'EscalateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\ListCasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchCaseClassifications' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCaseClassifications', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SearchCaseClassificationsResponse', + ], + 'SearchCases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SearchCasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'case.name', + 'fieldAccessors' => [ + 'getCase', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'organization' => 'organizations/{organization}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'project' => 'projects/{project}', + 'projectCase' => 'projects/{project}/cases/{case}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php new file mode 100644 index 000000000000..14753e7f357c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php @@ -0,0 +1,161 @@ + [ + 'google.cloud.support.v2beta.CaseService' => [ + 'CloseCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{name=projects/*/cases/*}:close', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{name=organizations/*/cases/*}:close', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{parent=projects/*}/cases', + 'body' => 'case', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{parent=organizations/*}/cases', + 'body' => 'case', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'EscalateCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{name=projects/*/cases/*}:escalate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{name=organizations/*/cases/*}:escalate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCase' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{name=projects/*/cases/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{name=organizations/*/cases/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCases' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=projects/*}/cases', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=organizations/*}/cases', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchCaseClassifications' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/caseClassifications:search', + ], + 'SearchCases' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=projects/*}/cases:search', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=organizations/*}/cases:search', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCase' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2beta/{case.name=projects/*/cases/*}', + 'body' => 'case', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2beta/{case.name=organizations/*/cases/*}', + 'body' => 'case', + ], + ], + 'placeholders' => [ + 'case.name' => [ + 'getters' => [ + 'getCase', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json new file mode 100644 index 000000000000..a12278e1bc21 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json @@ -0,0 +1,59 @@ +{ + "interfaces": { + "google.cloud.support.v2beta.CommentService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "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 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListComments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php new file mode 100644 index 000000000000..615a3a58f6b9 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php @@ -0,0 +1,80 @@ + [ + 'google.cloud.support.v2beta.CommentService' => [ + 'CreateComment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\Comment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetComment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\Comment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListComments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getComments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\ListCommentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'comment' => 'organizations/{organization}/cases/{case}/comments/{comment}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'organizationCaseComment' => 'organizations/{organization}/cases/{case}/comments/{comment}', + 'projectCase' => 'projects/{project}/cases/{case}', + 'projectCaseComment' => 'projects/{project}/cases/{case}/comments/{comment}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php new file mode 100644 index 000000000000..29cc3af0ddb0 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php @@ -0,0 +1,76 @@ + [ + 'google.cloud.support.v2beta.CommentService' => [ + 'CreateComment' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}/comments', + 'body' => 'comment', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}/comments', + 'body' => 'comment', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetComment' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{name=*/*/cases/*/comments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListComments' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}/comments', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}/comments', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json new file mode 100644 index 000000000000..04b964759795 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json @@ -0,0 +1,39 @@ +{ + "interfaces": { + "google.cloud.support.v2beta.FeedService": { + "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": { + "ShowFeed": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php new file mode 100644 index 000000000000..d71f2a17c867 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php @@ -0,0 +1,53 @@ + [ + 'google.cloud.support.v2beta.FeedService' => [ + 'ShowFeed' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFeedItems', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\ShowFeedResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'projectCase' => 'projects/{project}/cases/{case}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php new file mode 100644 index 000000000000..e5d5d3336a27 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php @@ -0,0 +1,46 @@ + [ + 'google.cloud.support.v2beta.FeedService' => [ + 'ShowFeed' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}:showFeed', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}:showFeed', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json new file mode 100644 index 000000000000..b40a371728ef --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json @@ -0,0 +1,52 @@ +{ + "interfaces": { + "google.cloud.support.v2beta.SupportEventSubscriptionService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "CreateSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSupportEventSubscriptions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UndeleteSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php new file mode 100644 index 000000000000..824f8c5dabe9 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php @@ -0,0 +1,113 @@ + [ + 'google.cloud.support.v2beta.SupportEventSubscriptionService' => [ + 'CreateSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSupportEventSubscriptions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSupportEventSubscriptions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\ListSupportEventSubscriptionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UndeleteSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'support_event_subscription.name', + 'fieldAccessors' => [ + 'getSupportEventSubscription', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'organization' => 'organizations/{organization}', + 'supportEventSubscription' => 'organizations/{organization}/supportEventSubscriptions/{support_event_subscription}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php new file mode 100644 index 000000000000..78d090501dce --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php @@ -0,0 +1,99 @@ + [ + 'google.cloud.support.v2beta.SupportEventSubscriptionService' => [ + 'CreateSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{parent=*/*}/supportEventSubscriptions', + 'body' => 'support_event_subscription', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSupportEventSubscription' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2beta/{name=*/*/supportEventSubscriptions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSupportEventSubscription' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{name=*/*/supportEventSubscriptions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSupportEventSubscriptions' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=*/*}/supportEventSubscriptions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UndeleteSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{name=*/*/supportEventSubscriptions/*}:undelete', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSupportEventSubscription' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2beta/{support_event_subscription.name=*/*/supportEventSubscriptions/*}', + 'body' => 'support_event_subscription', + 'placeholders' => [ + 'support_event_subscription.name' => [ + 'getters' => [ + 'getSupportEventSubscription', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php new file mode 100644 index 000000000000..5e7448a0adcd --- /dev/null +++ b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php @@ -0,0 +1,241 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CaseAttachmentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CaseAttachmentServiceClient($options); + } + + /** @test */ + public function getAttachmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $filename = 'filename-734768633'; + $mimeType = 'mimeType-196041627'; + $sizeBytes = 1796325715; + $expectedResponse = new Attachment(); + $expectedResponse->setName($name2); + $expectedResponse->setFilename($filename); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setSizeBytes($sizeBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); + $request = (new GetAttachmentRequest()) + ->setName($formattedName); + $response = $gapicClient->getAttachment($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.support.v2beta.CaseAttachmentService/GetAttachment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachmentExceptionTest() + { + $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->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); + $request = (new GetAttachmentRequest()) + ->setName($formattedName); + try { + $gapicClient->getAttachment($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 listAttachmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $attachmentsElement = new Attachment(); + $attachments = [ + $attachmentsElement, + ]; + $expectedResponse = new ListAttachmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAttachments($attachments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListAttachmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAttachments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAttachments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CaseAttachmentService/ListAttachments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAttachmentsExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListAttachmentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAttachments($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 getAttachmentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $filename = 'filename-734768633'; + $mimeType = 'mimeType-196041627'; + $sizeBytes = 1796325715; + $expectedResponse = new Attachment(); + $expectedResponse->setName($name2); + $expectedResponse->setFilename($filename); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setSizeBytes($sizeBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); + $request = (new GetAttachmentRequest()) + ->setName($formattedName); + $response = $gapicClient->getAttachmentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CaseAttachmentService/GetAttachment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php new file mode 100644 index 000000000000..64d4d93e4b7b --- /dev/null +++ b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php @@ -0,0 +1,712 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CaseServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CaseServiceClient($options); + } + + /** @test */ + public function closeCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->closeCase($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.support.v2beta.CaseService/CloseCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function closeCaseExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->closeCase($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 createCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $case = new PBCase(); + $request = (new CreateCaseRequest()) + ->setParent($formattedParent) + ->setCase($case); + $response = $gapicClient->createCase($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.support.v2beta.CaseService/CreateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCase(); + $this->assertProtobufEquals($case, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCaseExceptionTest() + { + $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->projectName('[PROJECT]'); + $case = new PBCase(); + $request = (new CreateCaseRequest()) + ->setParent($formattedParent) + ->setCase($case); + try { + $gapicClient->createCase($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 escalateCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new EscalateCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->escalateCase($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.support.v2beta.CaseService/EscalateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function escalateCaseExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new EscalateCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->escalateCase($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 getCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new GetCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->getCase($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.support.v2beta.CaseService/GetCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCaseExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new GetCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->getCase($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 listCasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $casesElement = new PBCase(); + $cases = [ + $casesElement, + ]; + $expectedResponse = new ListCasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCases($cases); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListCasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CaseService/ListCases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCasesExceptionTest() + { + $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->projectName('[PROJECT]'); + $request = (new ListCasesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCases($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 searchCaseClassificationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $caseClassificationsElement = new CaseClassification(); + $caseClassifications = [ + $caseClassificationsElement, + ]; + $expectedResponse = new SearchCaseClassificationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCaseClassifications($caseClassifications); + $transport->addResponse($expectedResponse); + $request = new SearchCaseClassificationsRequest(); + $response = $gapicClient->searchCaseClassifications($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCaseClassifications()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CaseService/SearchCaseClassifications', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCaseClassificationsExceptionTest() + { + $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 SearchCaseClassificationsRequest(); + try { + $gapicClient->searchCaseClassifications($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 searchCasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $casesElement = new PBCase(); + $cases = [ + $casesElement, + ]; + $expectedResponse = new SearchCasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCases($cases); + $transport->addResponse($expectedResponse); + $request = new SearchCasesRequest(); + $response = $gapicClient->searchCases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CaseService/SearchCases', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCasesExceptionTest() + { + $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 SearchCasesRequest(); + try { + $gapicClient->searchCases($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 updateCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $case = new PBCase(); + $request = (new UpdateCaseRequest()) + ->setCase($case); + $response = $gapicClient->updateCase($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.support.v2beta.CaseService/UpdateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getCase(); + $this->assertProtobufEquals($case, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCaseExceptionTest() + { + $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 + $case = new PBCase(); + $request = (new UpdateCaseRequest()) + ->setCase($case); + try { + $gapicClient->updateCase($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 closeCaseAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->closeCaseAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CaseService/CloseCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php new file mode 100644 index 000000000000..0e38fc9ee9d2 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php @@ -0,0 +1,316 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CommentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CommentServiceClient($options); + } + + /** @test */ + public function createCommentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + $response = $gapicClient->createComment($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.support.v2beta.CommentService/CreateComment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getComment(); + $this->assertProtobufEquals($comment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCommentExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + try { + $gapicClient->createComment($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 getCommentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name2); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); + $request = (new GetCommentRequest()) + ->setName($formattedName); + $response = $gapicClient->getComment($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.support.v2beta.CommentService/GetComment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCommentExceptionTest() + { + $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->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); + $request = (new GetCommentRequest()) + ->setName($formattedName); + try { + $gapicClient->getComment($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 listCommentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $commentsElement = new Comment(); + $comments = [ + $commentsElement, + ]; + $expectedResponse = new ListCommentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setComments($comments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListCommentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listComments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getComments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CommentService/ListComments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCommentsExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListCommentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listComments($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 createCommentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + $response = $gapicClient->createCommentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CommentService/CreateComment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getComment(); + $this->assertProtobufEquals($comment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php new file mode 100644 index 000000000000..303a6a57e9b5 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php @@ -0,0 +1,172 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FeedServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FeedServiceClient($options); + } + + /** @test */ + public function showFeedTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $feedItemsElement = new FeedItem(); + $feedItems = [ + $feedItemsElement, + ]; + $expectedResponse = new ShowFeedResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFeedItems($feedItems); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ShowFeedRequest()) + ->setParent($formattedParent); + $response = $gapicClient->showFeed($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFeedItems()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.FeedService/ShowFeed', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showFeedExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ShowFeedRequest()) + ->setParent($formattedParent); + try { + $gapicClient->showFeed($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 showFeedAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $feedItemsElement = new FeedItem(); + $feedItems = [ + $feedItemsElement, + ]; + $expectedResponse = new ShowFeedResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFeedItems($feedItems); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ShowFeedRequest()) + ->setParent($formattedParent); + $response = $gapicClient->showFeedAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFeedItems()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.FeedService/ShowFeed', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php new file mode 100644 index 000000000000..e2e28fbb6561 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php @@ -0,0 +1,521 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SupportEventSubscriptionServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SupportEventSubscriptionServiceClient($options); + } + + /** @test */ + public function createSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + $response = $gapicClient->createSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSupportEventSubscription(); + $this->assertProtobufEquals($supportEventSubscription, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSupportEventSubscriptionExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + try { + $gapicClient->createSupportEventSubscription($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 deleteSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name2); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new DeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/DeleteSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new DeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSupportEventSubscription($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 getSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name2); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new GetSupportEventSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->getSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/GetSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new GetSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->getSupportEventSubscription($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 listSupportEventSubscriptionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $supportEventSubscriptionsElement = new SupportEventSubscription(); + $supportEventSubscriptions = [ + $supportEventSubscriptionsElement, + ]; + $expectedResponse = new ListSupportEventSubscriptionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSupportEventSubscriptions($supportEventSubscriptions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new ListSupportEventSubscriptionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSupportEventSubscriptions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSupportEventSubscriptions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.SupportEventSubscriptionService/ListSupportEventSubscriptions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSupportEventSubscriptionsExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $request = (new ListSupportEventSubscriptionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSupportEventSubscriptions($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 undeleteSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name2); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new UndeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->undeleteSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/UndeleteSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function undeleteSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new UndeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->undeleteSupportEventSubscription($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 updateSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new UpdateSupportEventSubscriptionRequest()) + ->setSupportEventSubscription($supportEventSubscription); + $response = $gapicClient->updateSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/UpdateSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getSupportEventSubscription(); + $this->assertProtobufEquals($supportEventSubscription, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSupportEventSubscriptionExceptionTest() + { + $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 + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new UpdateSupportEventSubscriptionRequest()) + ->setSupportEventSubscription($supportEventSubscription); + try { + $gapicClient->updateSupportEventSubscription($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 createSupportEventSubscriptionAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + $response = $gapicClient->createSupportEventSubscriptionAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSupportEventSubscription(); + $this->assertProtobufEquals($supportEventSubscription, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From b1ca222fd0ca2bb520e32a23fa7d2a791160c15c Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 24 Jul 2026 21:05:44 +0000 Subject: [PATCH 2/4] =?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 --- .../V2/SupportEventSubscriptionService.php | 3 +- .../expunge_support_event_subscription.php | 0 .../list_support_event_subscriptions.php | 2 +- .../SupportEventSubscriptionServiceClient.php | 62 +- ...ExpungeSupportEventSubscriptionRequest.php | 0 Support/src/V2/gapic_metadata.json | 5 + ...nt_subscription_service_client_config.json | 5 + ...subscription_service_descriptor_config.php | 12 + ...ubscription_service_rest_client_config.php | 24 +- ...portEventSubscriptionServiceClientTest.php | 67 ++ .../Google/Cloud/Support/V2/Actor.php | 25 - .../Google/Cloud/Support/V2/Attachment.php | 28 - .../Cloud/Support/V2/AttachmentService.php | 29 - .../Google/Cloud/Support/V2/CaseService.php | 31 - .../Google/Cloud/Support/V2/Comment.php | 28 - .../Cloud/Support/V2/CommentService.php | 29 - .../Google/Cloud/Support/V2/Escalation.php | 25 - .../Google/Cloud/Support/V2/PBCase.php | 28 - .../Support/V2/SupportEventSubscription.php | 27 - .../V2/SupportEventSubscriptionService.php | 31 - .../src/Google/Cloud/Support/V2/Actor.php | 222 ------ .../Google/Cloud/Support/V2/Attachment.php | 267 ------- .../Cloud/Support/V2/CaseClassification.php | 137 ---- .../Cloud/Support/V2/CloseCaseRequest.php | 67 -- .../src/Google/Cloud/Support/V2/Comment.php | 245 ------ .../Cloud/Support/V2/CreateCaseRequest.php | 127 ---- .../Cloud/Support/V2/CreateCommentRequest.php | 127 ---- .../CreateSupportEventSubscriptionRequest.php | 132 ---- .../DeleteSupportEventSubscriptionRequest.php | 91 --- .../Cloud/Support/V2/EscalateCaseRequest.php | 111 --- .../Google/Cloud/Support/V2/Escalation.php | 105 --- .../Cloud/Support/V2/Escalation/Reason.php | 69 -- .../Cloud/Support/V2/GetAttachmentRequest.php | 81 -- .../Cloud/Support/V2/GetCaseRequest.php | 81 -- .../Cloud/Support/V2/GetCommentRequest.php | 81 -- .../V2/GetSupportEventSubscriptionRequest.php | 91 --- .../Support/V2/ListAttachmentsRequest.php | 173 ----- .../Support/V2/ListAttachmentsResponse.php | 109 --- .../Cloud/Support/V2/ListCasesRequest.php | 239 ------ .../Cloud/Support/V2/ListCasesResponse.php | 113 --- .../Cloud/Support/V2/ListCommentsRequest.php | 153 ---- .../Cloud/Support/V2/ListCommentsResponse.php | 109 --- .../ListSupportEventSubscriptionsRequest.php | 274 ------- .../ListSupportEventSubscriptionsResponse.php | 105 --- .../src/Google/Cloud/Support/V2/PBCase.php | 654 ---------------- .../Cloud/Support/V2/PBCase/Priority.php | 85 --- .../Google/Cloud/Support/V2/PBCase/State.php | 86 --- .../V2/SearchCaseClassificationsRequest.php | 147 ---- .../V2/SearchCaseClassificationsResponse.php | 109 --- .../Cloud/Support/V2/SearchCasesRequest.php | 317 -------- .../Cloud/Support/V2/SearchCasesResponse.php | 113 --- .../Support/V2/SupportEventSubscription.php | 353 --------- .../FailureReason.php | 70 -- .../V2/SupportEventSubscription/State.php | 71 -- ...ndeleteSupportEventSubscriptionRequest.php | 75 -- .../Cloud/Support/V2/UpdateCaseRequest.php | 167 ---- .../UpdateSupportEventSubscriptionRequest.php | 146 ---- .../get_attachment.php | 105 --- .../list_attachments.php | 76 -- .../V2/CaseServiceClient/close_case.php | 71 -- .../V2/CaseServiceClient/create_case.php | 77 -- .../V2/CaseServiceClient/escalate_case.php | 77 -- .../samples/V2/CaseServiceClient/get_case.php | 71 -- .../V2/CaseServiceClient/list_cases.php | 80 -- .../search_case_classifications.php | 71 -- .../V2/CaseServiceClient/search_cases.php | 62 -- .../V2/CaseServiceClient/update_case.php | 59 -- .../CommentServiceClient/create_comment.php | 75 -- .../V2/CommentServiceClient/get_comment.php | 100 --- .../V2/CommentServiceClient/list_comments.php | 76 -- .../create_support_event_subscription.php | 80 -- .../delete_support_event_subscription.php | 76 -- .../get_support_event_subscription.php | 76 -- .../list_support_event_subscriptions.php | 77 -- .../undelete_support_event_subscription.php | 76 -- .../update_support_event_subscription.php | 74 -- .../V2/Client/CaseAttachmentServiceClient.php | 409 ---------- .../v2/src/V2/Client/CaseServiceClient.php | 542 ------------- .../v2/src/V2/Client/CommentServiceClient.php | 437 ----------- .../SupportEventSubscriptionServiceClient.php | 480 ------------ .../Support/v2/src/V2/gapic_metadata.json | 145 ---- ...case_attachment_service_client_config.json | 44 -- ...e_attachment_service_descriptor_config.php | 68 -- ..._attachment_service_rest_client_config.php | 57 -- .../resources/case_service_client_config.json | 84 --- .../case_service_descriptor_config.php | 148 ---- .../case_service_rest_client_config.php | 161 ---- .../comment_service_client_config.json | 59 -- .../comment_service_descriptor_config.php | 80 -- .../comment_service_rest_client_config.php | 76 -- ...nt_subscription_service_client_config.json | 57 -- ...subscription_service_descriptor_config.php | 125 --- ...ubscription_service_rest_client_config.php | 111 --- .../CaseAttachmentServiceClientTest.php | 241 ------ .../Unit/V2/Client/CaseServiceClientTest.php | 712 ------------------ .../V2/Client/CommentServiceClientTest.php | 316 -------- ...portEventSubscriptionServiceClientTest.php | 584 -------------- .../Google/Cloud/Support/V2Beta/Actor.php | 25 - .../Cloud/Support/V2Beta/Attachment.php | 28 - .../Support/V2Beta/AttachmentService.php | 29 - .../Cloud/Support/V2Beta/CaseService.php | 31 - .../Google/Cloud/Support/V2Beta/Comment.php | 28 - .../Cloud/Support/V2Beta/CommentService.php | 29 - .../Google/Cloud/Support/V2Beta/Content.php | 24 - .../Cloud/Support/V2Beta/EmailMessage.php | 29 - .../Cloud/Support/V2Beta/Escalation.php | 25 - .../Google/Cloud/Support/V2Beta/FeedItem.php | 29 - .../Cloud/Support/V2Beta/FeedService.php | 29 - .../Google/Cloud/Support/V2Beta/PBCase.php | 28 - .../V2Beta/SupportEventSubscription.php | 27 - .../SupportEventSubscriptionService.php | 30 - .../src/Google/Cloud/Support/V2beta/Actor.php | 222 ------ .../Cloud/Support/V2beta/Attachment.php | 267 ------- .../Support/V2beta/CaseClassification.php | 181 ----- .../Cloud/Support/V2beta/CloseCaseRequest.php | 67 -- .../Google/Cloud/Support/V2beta/Comment.php | 245 ------ .../Support/V2beta/CreateCaseRequest.php | 127 ---- .../Support/V2beta/CreateCommentRequest.php | 127 ---- .../CreateSupportEventSubscriptionRequest.php | 132 ---- .../DeleteSupportEventSubscriptionRequest.php | 91 --- .../Cloud/Support/V2beta/EmailMessage.php | 309 -------- .../Support/V2beta/EscalateCaseRequest.php | 111 --- .../Cloud/Support/V2beta/Escalation.php | 105 --- .../Support/V2beta/Escalation/Reason.php | 69 -- .../Google/Cloud/Support/V2beta/FeedItem.php | 221 ------ .../Support/V2beta/GetAttachmentRequest.php | 81 -- .../Cloud/Support/V2beta/GetCaseRequest.php | 81 -- .../Support/V2beta/GetCommentRequest.php | 81 -- .../GetSupportEventSubscriptionRequest.php | 91 --- .../Support/V2beta/ListAttachmentsRequest.php | 173 ----- .../V2beta/ListAttachmentsResponse.php | 109 --- .../Cloud/Support/V2beta/ListCasesRequest.php | 287 ------- .../Support/V2beta/ListCasesResponse.php | 113 --- .../Support/V2beta/ListCommentsRequest.php | 153 ---- .../Support/V2beta/ListCommentsResponse.php | 109 --- .../ListSupportEventSubscriptionsRequest.php | 274 ------- .../ListSupportEventSubscriptionsResponse.php | 105 --- .../Google/Cloud/Support/V2beta/PBCase.php | 654 ---------------- .../Cloud/Support/V2beta/PBCase/Priority.php | 85 --- .../Cloud/Support/V2beta/PBCase/State.php | 86 --- .../Google/Cloud/Support/V2beta/Product.php | 67 -- .../Cloud/Support/V2beta/ProductLine.php | 61 -- .../SearchCaseClassificationsRequest.php | 191 ----- .../SearchCaseClassificationsResponse.php | 109 --- .../Support/V2beta/SearchCasesRequest.php | 317 -------- .../Support/V2beta/SearchCasesResponse.php | 113 --- .../Cloud/Support/V2beta/ShowFeedRequest.php | 208 ----- .../Cloud/Support/V2beta/ShowFeedResponse.php | 109 --- .../V2beta/SupportEventSubscription.php | 353 --------- .../FailureReason.php | 70 -- .../V2beta/SupportEventSubscription/State.php | 71 -- .../Cloud/Support/V2beta/TextContent.php | 67 -- ...ndeleteSupportEventSubscriptionRequest.php | 75 -- .../Support/V2beta/UpdateCaseRequest.php | 167 ---- .../UpdateSupportEventSubscriptionRequest.php | 146 ---- .../get_attachment.php | 75 -- .../list_attachments.php | 76 -- .../V2beta/CaseServiceClient/close_case.php | 71 -- .../V2beta/CaseServiceClient/create_case.php | 77 -- .../CaseServiceClient/escalate_case.php | 77 -- .../V2beta/CaseServiceClient/get_case.php | 71 -- .../V2beta/CaseServiceClient/list_cases.php | 80 -- .../search_case_classifications.php | 71 -- .../V2beta/CaseServiceClient/search_cases.php | 62 -- .../V2beta/CaseServiceClient/update_case.php | 59 -- .../CommentServiceClient/create_comment.php | 75 -- .../CommentServiceClient/get_comment.php | 71 -- .../CommentServiceClient/list_comments.php | 76 -- .../V2beta/FeedServiceClient/show_feed.php | 78 -- .../create_support_event_subscription.php | 80 -- .../delete_support_event_subscription.php | 76 -- .../get_support_event_subscription.php | 76 -- .../list_support_event_subscriptions.php | 77 -- .../undelete_support_event_subscription.php | 76 -- .../update_support_event_subscription.php | 74 -- .../Client/CaseAttachmentServiceClient.php | 403 ---------- .../src/V2beta/Client/CaseServiceClient.php | 576 -------------- .../V2beta/Client/CommentServiceClient.php | 434 ----------- .../src/V2beta/Client/FeedServiceClient.php | 306 -------- .../SupportEventSubscriptionServiceClient.php | 446 ----------- .../v2beta/src/V2beta/gapic_metadata.json | 154 ---- ...case_attachment_service_client_config.json | 44 -- ...e_attachment_service_descriptor_config.php | 68 -- ..._attachment_service_rest_client_config.php | 57 -- .../resources/case_service_client_config.json | 84 --- .../case_service_descriptor_config.php | 148 ---- .../case_service_rest_client_config.php | 161 ---- .../comment_service_client_config.json | 59 -- .../comment_service_descriptor_config.php | 80 -- .../comment_service_rest_client_config.php | 76 -- .../resources/feed_service_client_config.json | 39 - .../feed_service_descriptor_config.php | 53 -- .../feed_service_rest_client_config.php | 46 -- ...nt_subscription_service_client_config.json | 52 -- ...subscription_service_descriptor_config.php | 113 --- ...ubscription_service_rest_client_config.php | 99 --- .../CaseAttachmentServiceClientTest.php | 241 ------ .../V2beta/Client/CaseServiceClientTest.php | 712 ------------------ .../Client/CommentServiceClientTest.php | 316 -------- .../V2beta/Client/FeedServiceClientTest.php | 172 ----- ...portEventSubscriptionServiceClientTest.php | 521 ------------- 201 files changed, 171 insertions(+), 26596 deletions(-) rename {owl-bot-staging/Support/v2 => Support}/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php (100%) rename {owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support => Support/src}/V2/ExpungeSupportEventSubscriptionRequest.php (100%) delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CommentService.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CommentService.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscriptionService.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Actor.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php diff --git a/Support/metadata/V2/SupportEventSubscriptionService.php b/Support/metadata/V2/SupportEventSubscriptionService.php index c361e9bfbf16..bf830fd0b677 100644 --- a/Support/metadata/V2/SupportEventSubscriptionService.php +++ b/Support/metadata/V2/SupportEventSubscriptionService.php @@ -19,9 +19,10 @@ public static function initOnce() { \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscription::initOnce(); + \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xC3\x18\x0A@google/cloud/support/v2/support_event_subscription_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A8google/cloud/support/v2/support_event_subscription.proto\x1A google/protobuf/field_mask.proto\"\xD1\x01\x0A%CreateSupportEventSubscriptionRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124cloudsupport.googleapis.com/SupportEventSubscription\x12Z\x0A\x1Asupport_event_subscription\x18\x02 \x01(\x0B21.google.cloud.support.v2.SupportEventSubscriptionB\x03\xE0A\x02\"p\x0A\"GetSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"\xD5\x01\x0A\$ListSupportEventSubscriptionsRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124cloudsupport.googleapis.com/SupportEventSubscription\x12\x13\x0A\x06filter\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x19\x0A\x0Cshow_deleted\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\"\x98\x01\x0A%ListSupportEventSubscriptionsResponse\x12V\x0A\x1Bsupport_event_subscriptions\x18\x01 \x03(\x0B21.google.cloud.support.v2.SupportEventSubscription\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xB9\x01\x0A%UpdateSupportEventSubscriptionRequest\x12Z\x0A\x1Asupport_event_subscription\x18\x01 \x01(\x0B21.google.cloud.support.v2.SupportEventSubscriptionB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"s\x0A%DeleteSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"u\x0A'UndeleteSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription2\xFB\x0B\x0A\x1FSupportEventSubscriptionService\x12\x87\x02\x0A\x1ECreateSupportEventSubscription\x12>.google.cloud.support.v2.CreateSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"r\xDAA!parent,support_event_subscription\x82\xD3\xE4\x93\x02H\"*/v2/{parent=*/*}/supportEventSubscriptions:\x1Asupport_event_subscription\x12\xC8\x01\x0A\x1BGetSupportEventSubscription\x12;.google.cloud.support.v2.GetSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"9\xDAA\x04name\x82\xD3\xE4\x93\x02,\x12*/v2/{name=*/*/supportEventSubscriptions/*}\x12\xDB\x01\x0A\x1DListSupportEventSubscriptions\x12=.google.cloud.support.v2.ListSupportEventSubscriptionsRequest\x1A>.google.cloud.support.v2.ListSupportEventSubscriptionsResponse\";\xDAA\x06parent\x82\xD3\xE4\x93\x02,\x12*/v2/{parent=*/*}/supportEventSubscriptions\x12\xA8\x02\x0A\x1EUpdateSupportEventSubscription\x12>.google.cloud.support.v2.UpdateSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"\x92\x01\xDAA&support_event_subscription,update_mask\x82\xD3\xE4\x93\x02c2E/v2/{support_event_subscription.name=*/*/supportEventSubscriptions/*}:\x1Asupport_event_subscription\x12\xCE\x01\x0A\x1EDeleteSupportEventSubscription\x12>.google.cloud.support.v2.DeleteSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"9\xDAA\x04name\x82\xD3\xE4\x93\x02,**/v2/{name=*/*/supportEventSubscriptions/*}\x12\xD7\x01\x0A UndeleteSupportEventSubscription\x12@.google.cloud.support.v2.UndeleteSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\">\x82\xD3\xE4\x93\x028\"3/v2/{name=*/*/supportEventSubscriptions/*}:undelete:\x01*\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Bcom.google.cloud.support.v2B\$SupportEventSubscriptionServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + "\x0A\xED\x1B\x0A@google/cloud/support/v2/support_event_subscription_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A8google/cloud/support/v2/support_event_subscription.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\"\xD1\x01\x0A%CreateSupportEventSubscriptionRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124cloudsupport.googleapis.com/SupportEventSubscription\x12Z\x0A\x1Asupport_event_subscription\x18\x02 \x01(\x0B21.google.cloud.support.v2.SupportEventSubscriptionB\x03\xE0A\x02\"p\x0A\"GetSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"\xD5\x01\x0A\$ListSupportEventSubscriptionsRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124cloudsupport.googleapis.com/SupportEventSubscription\x12\x13\x0A\x06filter\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x19\x0A\x0Cshow_deleted\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\"\x98\x01\x0A%ListSupportEventSubscriptionsResponse\x12V\x0A\x1Bsupport_event_subscriptions\x18\x01 \x03(\x0B21.google.cloud.support.v2.SupportEventSubscription\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xB9\x01\x0A%UpdateSupportEventSubscriptionRequest\x12Z\x0A\x1Asupport_event_subscription\x18\x01 \x01(\x0B21.google.cloud.support.v2.SupportEventSubscriptionB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"s\x0A%DeleteSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"u\x0A'UndeleteSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"t\x0A&ExpungeSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription2\x92\x0E\x0A\x1FSupportEventSubscriptionService\x12\x93\x02\x0A\x1ECreateSupportEventSubscription\x12>.google.cloud.support.v2.CreateSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"~\xDAA!parent,support_event_subscription\x82\xD3\xE4\x93\x02T\"6/v2/{parent=organizations/*}/supportEventSubscriptions:\x1Asupport_event_subscription\x12\xD4\x01\x0A\x1BGetSupportEventSubscription\x12;.google.cloud.support.v2.GetSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\x126/v2/{name=organizations/*/supportEventSubscriptions/*}\x12\xE7\x01\x0A\x1DListSupportEventSubscriptions\x12=.google.cloud.support.v2.ListSupportEventSubscriptionsRequest\x1A>.google.cloud.support.v2.ListSupportEventSubscriptionsResponse\"G\xDAA\x06parent\x82\xD3\xE4\x93\x028\x126/v2/{parent=organizations/*}/supportEventSubscriptions\x12\xB4\x02\x0A\x1EUpdateSupportEventSubscription\x12>.google.cloud.support.v2.UpdateSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"\x9E\x01\xDAA&support_event_subscription,update_mask\x82\xD3\xE4\x93\x02o2Q/v2/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}:\x1Asupport_event_subscription\x12\xDA\x01\x0A\x1EDeleteSupportEventSubscription\x12>.google.cloud.support.v2.DeleteSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"E\xDAA\x04name\x82\xD3\xE4\x93\x028*6/v2/{name=organizations/*/supportEventSubscriptions/*}\x12\xE3\x01\x0A UndeleteSupportEventSubscription\x12@.google.cloud.support.v2.UndeleteSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"J\x82\xD3\xE4\x93\x02D\"?/v2/{name=organizations/*/supportEventSubscriptions/*}:undelete:\x01*\x12\xCC\x01\x0A\x1FExpungeSupportEventSubscription\x12?.google.cloud.support.v2.ExpungeSupportEventSubscriptionRequest\x1A\x16.google.protobuf.Empty\"P\xDAA\x04name\x82\xD3\xE4\x93\x02C\">/v2/{name=organizations/*/supportEventSubscriptions/*}:expunge:\x01*\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Bcom.google.cloud.support.v2B\$SupportEventSubscriptionServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" , true); static::$is_initialized = true; diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php b/Support/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php similarity index 100% rename from owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php rename to Support/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php diff --git a/Support/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php b/Support/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php index 78fab41cb693..828bdacb0a68 100644 --- a/Support/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php +++ b/Support/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php @@ -30,7 +30,7 @@ use Google\Cloud\Support\V2\SupportEventSubscription; /** - * Lists support event subscriptions. + * Lists support event subscriptions for an organization. * * @param string $formattedParent The fully qualified name of the Cloud resource to list support * event subscriptions under. Format: organizations/{organization_id} diff --git a/Support/src/V2/Client/SupportEventSubscriptionServiceClient.php b/Support/src/V2/Client/SupportEventSubscriptionServiceClient.php index 593734414d5b..a9e2a7ac9b3c 100644 --- a/Support/src/V2/Client/SupportEventSubscriptionServiceClient.php +++ b/Support/src/V2/Client/SupportEventSubscriptionServiceClient.php @@ -36,6 +36,7 @@ use Google\Auth\FetchAuthTokenInterface; use Google\Cloud\Support\V2\CreateSupportEventSubscriptionRequest; use Google\Cloud\Support\V2\DeleteSupportEventSubscriptionRequest; +use Google\Cloud\Support\V2\ExpungeSupportEventSubscriptionRequest; use Google\Cloud\Support\V2\GetSupportEventSubscriptionRequest; use Google\Cloud\Support\V2\ListSupportEventSubscriptionsRequest; use Google\Cloud\Support\V2\SupportEventSubscription; @@ -57,6 +58,7 @@ * * @method PromiseInterface createSupportEventSubscriptionAsync(CreateSupportEventSubscriptionRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteSupportEventSubscriptionAsync(DeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface expungeSupportEventSubscriptionAsync(ExpungeSupportEventSubscriptionRequest $request, array $optionalArgs = []) * @method PromiseInterface getSupportEventSubscriptionAsync(GetSupportEventSubscriptionRequest $request, array $optionalArgs = []) * @method PromiseInterface listSupportEventSubscriptionsAsync(ListSupportEventSubscriptionsRequest $request, array $optionalArgs = []) * @method PromiseInterface undeleteSupportEventSubscriptionAsync(UndeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) @@ -312,6 +314,64 @@ public function deleteSupportEventSubscription( return $this->startApiCall('DeleteSupportEventSubscription', $request, $callOptions)->wait(); } + /** + * Expunges a support event subscription. + * + * EXAMPLES: + * + * cURL: + * + * ```shell + * support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" + * curl \ + * --request POST \ + * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ + * "https://cloudsupport.googleapis.com/v2/$support_event_subscription:expunge" + * ``` + * + * Python: + * + * ```python + * import googleapiclient.discovery + * + * api_version = "v2" + * supportApiService = googleapiclient.discovery.build( + * serviceName="cloudsupport", + * version=api_version, + * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", + * ) + * + * request = supportApiService.supportEventSubscriptions().expunge( + * name="organizations/123456789/supportEventSubscriptions/abcdef123456" + * ) + * print(request.execute()) + * ``` + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::expungeSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php + * + * @param ExpungeSupportEventSubscriptionRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function expungeSupportEventSubscription( + ExpungeSupportEventSubscriptionRequest $request, + array $callOptions = [] + ): void { + $this->startApiCall('ExpungeSupportEventSubscription', $request, $callOptions)->wait(); + } + /** * Gets a support event subscription. * @@ -343,7 +403,7 @@ public function getSupportEventSubscription( } /** - * Lists support event subscriptions. + * Lists support event subscriptions for an organization. * * The async variant is * {@see SupportEventSubscriptionServiceClient::listSupportEventSubscriptionsAsync()} diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php b/Support/src/V2/ExpungeSupportEventSubscriptionRequest.php similarity index 100% rename from owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php rename to Support/src/V2/ExpungeSupportEventSubscriptionRequest.php diff --git a/Support/src/V2/gapic_metadata.json b/Support/src/V2/gapic_metadata.json index 8ffc19ff8ec6..a1a0b226e030 100644 --- a/Support/src/V2/gapic_metadata.json +++ b/Support/src/V2/gapic_metadata.json @@ -112,6 +112,11 @@ "deleteSupportEventSubscription" ] }, + "ExpungeSupportEventSubscription": { + "methods": [ + "expungeSupportEventSubscription" + ] + }, "GetSupportEventSubscription": { "methods": [ "getSupportEventSubscription" diff --git a/Support/src/V2/resources/support_event_subscription_service_client_config.json b/Support/src/V2/resources/support_event_subscription_service_client_config.json index 14684cd59877..207f6e81330a 100644 --- a/Support/src/V2/resources/support_event_subscription_service_client_config.json +++ b/Support/src/V2/resources/support_event_subscription_service_client_config.json @@ -26,6 +26,11 @@ "retry_codes_name": "no_retry_codes", "retry_params_name": "no_retry_params" }, + "ExpungeSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, "GetSupportEventSubscription": { "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", diff --git a/Support/src/V2/resources/support_event_subscription_service_descriptor_config.php b/Support/src/V2/resources/support_event_subscription_service_descriptor_config.php index b959ac9833dc..8524c72bce3c 100644 --- a/Support/src/V2/resources/support_event_subscription_service_descriptor_config.php +++ b/Support/src/V2/resources/support_event_subscription_service_descriptor_config.php @@ -47,6 +47,18 @@ ], ], ], + 'ExpungeSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'GetSupportEventSubscription' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', diff --git a/Support/src/V2/resources/support_event_subscription_service_rest_client_config.php b/Support/src/V2/resources/support_event_subscription_service_rest_client_config.php index f15b8c82e902..d47c677179a1 100644 --- a/Support/src/V2/resources/support_event_subscription_service_rest_client_config.php +++ b/Support/src/V2/resources/support_event_subscription_service_rest_client_config.php @@ -25,7 +25,7 @@ 'google.cloud.support.v2.SupportEventSubscriptionService' => [ 'CreateSupportEventSubscription' => [ 'method' => 'post', - 'uriTemplate' => '/v2/{parent=*/*}/supportEventSubscriptions', + 'uriTemplate' => '/v2/{parent=organizations/*}/supportEventSubscriptions', 'body' => 'support_event_subscription', 'placeholders' => [ 'parent' => [ @@ -37,7 +37,19 @@ ], 'DeleteSupportEventSubscription' => [ 'method' => 'delete', - 'uriTemplate' => '/v2/{name=*/*/supportEventSubscriptions/*}', + 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExpungeSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}:expunge', + 'body' => '*', 'placeholders' => [ 'name' => [ 'getters' => [ @@ -48,7 +60,7 @@ ], 'GetSupportEventSubscription' => [ 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/supportEventSubscriptions/*}', + 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}', 'placeholders' => [ 'name' => [ 'getters' => [ @@ -59,7 +71,7 @@ ], 'ListSupportEventSubscriptions' => [ 'method' => 'get', - 'uriTemplate' => '/v2/{parent=*/*}/supportEventSubscriptions', + 'uriTemplate' => '/v2/{parent=organizations/*}/supportEventSubscriptions', 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -70,7 +82,7 @@ ], 'UndeleteSupportEventSubscription' => [ 'method' => 'post', - 'uriTemplate' => '/v2/{name=*/*/supportEventSubscriptions/*}:undelete', + 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}:undelete', 'body' => '*', 'placeholders' => [ 'name' => [ @@ -82,7 +94,7 @@ ], 'UpdateSupportEventSubscription' => [ 'method' => 'patch', - 'uriTemplate' => '/v2/{support_event_subscription.name=*/*/supportEventSubscriptions/*}', + 'uriTemplate' => '/v2/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}', 'body' => 'support_event_subscription', 'placeholders' => [ 'support_event_subscription.name' => [ diff --git a/Support/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php b/Support/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php index fb6dd7a07617..3cdc771f7e4f 100644 --- a/Support/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php +++ b/Support/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php @@ -29,12 +29,14 @@ use Google\Cloud\Support\V2\Client\SupportEventSubscriptionServiceClient; use Google\Cloud\Support\V2\CreateSupportEventSubscriptionRequest; use Google\Cloud\Support\V2\DeleteSupportEventSubscriptionRequest; +use Google\Cloud\Support\V2\ExpungeSupportEventSubscriptionRequest; use Google\Cloud\Support\V2\GetSupportEventSubscriptionRequest; use Google\Cloud\Support\V2\ListSupportEventSubscriptionsRequest; use Google\Cloud\Support\V2\ListSupportEventSubscriptionsResponse; use Google\Cloud\Support\V2\SupportEventSubscription; use Google\Cloud\Support\V2\UndeleteSupportEventSubscriptionRequest; use Google\Cloud\Support\V2\UpdateSupportEventSubscriptionRequest; +use Google\Protobuf\GPBEmpty; use Google\Rpc\Code; use stdClass; @@ -220,6 +222,71 @@ public function deleteSupportEventSubscriptionExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function expungeSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new ExpungeSupportEventSubscriptionRequest())->setName($formattedName); + $gapicClient->expungeSupportEventSubscription($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.support.v2.SupportEventSubscriptionService/ExpungeSupportEventSubscription', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function expungeSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new ExpungeSupportEventSubscriptionRequest())->setName($formattedName); + try { + $gapicClient->expungeSupportEventSubscription($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 getSupportEventSubscriptionTest() { diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php deleted file mode 100644 index 6a81217bb838..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xE2\x02\x0A#google/cloud/support/v2/actor.proto\x12\x17google.cloud.support.v2\"d\x0A\x05Actor\x12\x14\x0A\x0Cdisplay_name\x18\x01 \x01(\x09\x12\x11\x0A\x05email\x18\x02 \x01(\x09B\x02\x18\x01\x12\x1B\x0A\x0Egoogle_support\x18\x04 \x01(\x08B\x03\xE0A\x03\x12\x15\x0A\x08username\x18\x05 \x01(\x09B\x03\xE0A\x03B\xB3\x01\x0A\x1Bcom.google.cloud.support.v2B\x0AActorProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php deleted file mode 100644 index 5c8e5e22e383..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xEE\x05\x0A(google/cloud/support/v2/attachment.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A#google/cloud/support/v2/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x84\x03\x0A\x0AAttachment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x07creator\x18\x03 \x01(\x0B2\x1E.google.cloud.support.v2.ActorB\x03\xE0A\x03\x12\x10\x0A\x08filename\x18\x04 \x01(\x09\x12\x16\x0A\x09mime_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Asize_bytes\x18\x06 \x01(\x03B\x03\xE0A\x03:\xB0\x01\xEAA\xAC\x01\x0A&cloudsupport.googleapis.com/Attachment\x12Eorganizations/{organization}/cases/{case}/attachments/{attachment_id}\x12;projects/{project}/cases/{case}/attachments/{attachment_id}B\xB8\x01\x0A\x1Bcom.google.cloud.support.v2B\x0FAttachmentProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php deleted file mode 100644 index 1516fd0052ef..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC2\x09\x0A0google/cloud/support/v2/attachment_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A(google/cloud/support/v2/attachment.proto\"y\x0A\x16ListAttachmentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"T\x0A\x14GetAttachmentRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&cloudsupport.googleapis.com/Attachment\"l\x0A\x17ListAttachmentsResponse\x128\x0A\x0Battachments\x18\x01 \x03(\x0B2#.google.cloud.support.v2.Attachment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xEC\x03\x0A\x15CaseAttachmentService\x12\xE6\x01\x0A\x0FListAttachments\x12/.google.cloud.support.v2.ListAttachmentsRequest\x1A0.google.cloud.support.v2.ListAttachmentsResponse\"p\xDAA\x06parent\x82\xD3\xE4\x93\x02a\x12+/v2/{parent=projects/*/cases/*}/attachmentsZ2\x120/v2/{parent=organizations/*/cases/*}/attachments\x12\x98\x01\x0A\x0DGetAttachment\x12-.google.cloud.support.v2.GetAttachmentRequest\x1A#.google.cloud.support.v2.Attachment\"3\xDAA\x04name\x82\xD3\xE4\x93\x02&\x12\$/v2/{name=*/*/cases/*/attachments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xBF\x01\x0A\x1Bcom.google.cloud.support.v2B\x16AttachmentServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php deleted file mode 100644 index 5a6996bec887..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xB8\x19\x0A*google/cloud/support/v2/case_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\"google/cloud/support/v2/case.proto\x1A(google/cloud/support/v2/escalation.proto\x1A google/protobuf/field_mask.proto\"H\x0A\x0EGetCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"\x7F\x0A\x11CreateCaseRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x120\x0A\x04case\x18\x02 \x01(\x0B2\x1D.google.cloud.support.v2.CaseB\x03\xE0A\x02\"\x83\x01\x0A\x10ListCasesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\"Z\x0A\x11ListCasesResponse\x12,\x0A\x05cases\x18\x01 \x03(\x0B2\x1D.google.cloud.support.v2.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"Z\x0A\x12SearchCasesRequest\x12\x0E\x0A\x06parent\x18\x04 \x01(\x09\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\\\x0A\x13SearchCasesResponse\x12,\x0A\x05cases\x18\x01 \x03(\x0B2\x1D.google.cloud.support.v2.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x86\x01\x0A\x13EscalateCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x127\x0A\x0Aescalation\x18\x02 \x01(\x0B2#.google.cloud.support.v2.Escalation\"v\x0A\x11UpdateCaseRequest\x120\x0A\x04case\x18\x01 \x01(\x0B2\x1D.google.cloud.support.v2.CaseB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"J\x0A\x10CloseCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"X\x0A SearchCaseClassificationsRequest\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x87\x01\x0A!SearchCaseClassificationsResponse\x12I\x0A\x14case_classifications\x18\x01 \x03(\x0B2+.google.cloud.support.v2.CaseClassification\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xCF\x0C\x0A\x0BCaseService\x12\xA5\x01\x0A\x07GetCase\x12'.google.cloud.support.v2.GetCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"R\xDAA\x04name\x82\xD3\xE4\x93\x02E\x12\x1D/v2/{name=projects/*/cases/*}Z\$\x12\"/v2/{name=organizations/*/cases/*}\x12\xB8\x01\x0A\x09ListCases\x12).google.cloud.support.v2.ListCasesRequest\x1A*.google.cloud.support.v2.ListCasesResponse\"T\xDAA\x06parent\x82\xD3\xE4\x93\x02E\x12\x1D/v2/{parent=projects/*}/casesZ\$\x12\"/v2/{parent=organizations/*}/cases\x12\xC3\x01\x0A\x0BSearchCases\x12+.google.cloud.support.v2.SearchCasesRequest\x1A,.google.cloud.support.v2.SearchCasesResponse\"Y\x82\xD3\xE4\x93\x02S\x12\$/v2/{parent=projects/*}/cases:searchZ+\x12)/v2/{parent=organizations/*}/cases:search\x12\xBE\x01\x0A\x0ACreateCase\x12*.google.cloud.support.v2.CreateCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"e\xDAA\x0Bparent,case\x82\xD3\xE4\x93\x02Q\"\x1D/v2/{parent=projects/*}/cases:\x04caseZ*\"\"/v2/{parent=organizations/*}/cases:\x04case\x12\xCD\x01\x0A\x0AUpdateCase\x12*.google.cloud.support.v2.UpdateCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"t\xDAA\x10case,update_mask\x82\xD3\xE4\x93\x02[2\"/v2/{case.name=projects/*/cases/*}:\x04caseZ/2'/v2/{case.name=organizations/*/cases/*}:\x04case\x12\xC0\x01\x0A\x0CEscalateCase\x12,.google.cloud.support.v2.EscalateCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"c\x82\xD3\xE4\x93\x02]\"&/v2/{name=projects/*/cases/*}:escalate:\x01*Z0\"+/v2/{name=organizations/*/cases/*}:escalate:\x01*\x12\xB4\x01\x0A\x09CloseCase\x12).google.cloud.support.v2.CloseCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"]\x82\xD3\xE4\x93\x02W\"#/v2/{name=projects/*/cases/*}:close:\x01*Z-\"(/v2/{name=organizations/*/cases/*}:close:\x01*\x12\xBA\x01\x0A\x19SearchCaseClassifications\x129.google.cloud.support.v2.SearchCaseClassificationsRequest\x1A:.google.cloud.support.v2.SearchCaseClassificationsResponse\"&\x82\xD3\xE4\x93\x02 \x12\x1E/v2/caseClassifications:search\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xB9\x01\x0A\x1Bcom.google.cloud.support.v2B\x10CaseServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php deleted file mode 100644 index 18113ad5b3a7..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBB\x05\x0A%google/cloud/support/v2/comment.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A#google/cloud/support/v2/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xD7\x02\x0A\x07Comment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x07creator\x18\x03 \x01(\x0B2\x1E.google.cloud.support.v2.ActorB\x03\xE0A\x03\x12\x0C\x0A\x04body\x18\x04 \x01(\x09\x12\x1E\x0A\x0Fplain_text_body\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03:\x9B\x01\xEAA\x97\x01\x0A#cloudsupport.googleapis.com/Comment\x12internalAddGeneratedFile( - "\x0A\xFA\x0B\x0A-google/cloud/support/v2/comment_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A%google/cloud/support/v2/comment.proto\"v\x0A\x13ListCommentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\"c\x0A\x14ListCommentsResponse\x122\x0A\x08comments\x18\x01 \x03(\x0B2 .google.cloud.support.v2.Comment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x88\x01\x0A\x14CreateCommentRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x126\x0A\x07comment\x18\x02 \x01(\x0B2 .google.cloud.support.v2.CommentB\x03\xE0A\x02\"N\x0A\x11GetCommentRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#cloudsupport.googleapis.com/Comment2\xB4\x05\x0A\x0ECommentService\x12\xD7\x01\x0A\x0CListComments\x12,.google.cloud.support.v2.ListCommentsRequest\x1A-.google.cloud.support.v2.ListCommentsResponse\"j\xDAA\x06parent\x82\xD3\xE4\x93\x02[\x12(/v2/{parent=projects/*/cases/*}/commentsZ/\x12-/v2/{parent=organizations/*/cases/*}/comments\x12\xE7\x01\x0A\x0DCreateComment\x12-.google.cloud.support.v2.CreateCommentRequest\x1A .google.cloud.support.v2.Comment\"\x84\x01\xDAA\x0Eparent,comment\x82\xD3\xE4\x93\x02m\"(/v2/{parent=projects/*/cases/*}/comments:\x07commentZ8\"-/v2/{parent=organizations/*/cases/*}/comments:\x07comment\x12\x8C\x01\x0A\x0AGetComment\x12*.google.cloud.support.v2.GetCommentRequest\x1A .google.cloud.support.v2.Comment\"0\xDAA\x04name\x82\xD3\xE4\x93\x02#\x12!/v2/{name=*/*/cases/*/comments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xBC\x01\x0A\x1Bcom.google.cloud.support.v2B\x13CommentServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php deleted file mode 100644 index 3fe62b602963..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xD7\x03\x0A(google/cloud/support/v2/escalation.proto\x12\x17google.cloud.support.v2\"\xCE\x01\x0A\x0AEscalation\x12?\x0A\x06reason\x18\x04 \x01(\x0E2*.google.cloud.support.v2.Escalation.ReasonB\x03\xE0A\x02\x12\x1A\x0A\x0Djustification\x18\x05 \x01(\x09B\x03\xE0A\x02\"c\x0A\x06Reason\x12\x16\x0A\x12REASON_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FRESOLUTION_TIME\x10\x01\x12\x17\x0A\x13TECHNICAL_EXPERTISE\x10\x02\x12\x13\x0A\x0FBUSINESS_IMPACT\x10\x03B\xB8\x01\x0A\x1Bcom.google.cloud.support.v2B\x0FEscalationProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php deleted file mode 100644 index a841b40ecb03..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xFC\x09\x0A\"google/cloud/support/v2/case.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A#google/cloud/support/v2/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE6\x06\x0A\x04Case\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x12C\x0A\x0Eclassification\x18\x04 \x01(\x0B2+.google.cloud.support.v2.CaseClassification\x12\x11\x0A\x09time_zone\x18\x08 \x01(\x09\x12\"\x0A\x1Asubscriber_email_addresses\x18\x09 \x03(\x09\x127\x0A\x05state\x18\x0C \x01(\x0E2#.google.cloud.support.v2.Case.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x0D \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0E \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12/\x0A\x07creator\x18\x0F \x01(\x0B2\x1E.google.cloud.support.v2.Actor\x12\x15\x0A\x0Dcontact_email\x18# \x01(\x09\x12\x11\x0A\x09escalated\x18\x11 \x01(\x08\x12\x11\x0A\x09test_case\x18\x13 \x01(\x08\x12\x15\x0A\x0Dlanguage_code\x18\x17 \x01(\x09\x128\x0A\x08priority\x18 \x01(\x0E2&.google.cloud.support.v2.Case.Priority\"\x7F\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03NEW\x10\x01\x12\x1E\x0A\x1AIN_PROGRESS_GOOGLE_SUPPORT\x10\x02\x12\x13\x0A\x0FACTION_REQUIRED\x10\x03\x12\x15\x0A\x11SOLUTION_PROVIDED\x10\x04\x12\x0A\x0A\x06CLOSED\x10\x05\"L\x0A\x08Priority\x12\x18\x0A\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02P0\x10\x01\x12\x06\x0A\x02P1\x10\x02\x12\x06\x0A\x02P2\x10\x03\x12\x06\x0A\x02P3\x10\x04\x12\x06\x0A\x02P4\x10\x05:q\xEAAn\x0A cloudsupport.googleapis.com/Case\x12)organizations/{organization}/cases/{case}\x12\x1Fprojects/{project}/cases/{case}\"6\x0A\x12CaseClassification\x12\x0A\x0A\x02id\x18\x03 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\xB2\x01\x0A\x1Bcom.google.cloud.support.v2B\x09CaseProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php deleted file mode 100644 index 23e8067b0f15..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xA4\x09\x0A8google/cloud/support/v2/support_event_subscription.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xC1\x06\x0A\x18SupportEventSubscription\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1A\x0A\x0Dpub_sub_topic\x18\x02 \x01(\x09B\x03\xE0A\x02\x12K\x0A\x05state\x18\x03 \x01(\x0E27.google.cloud.support.v2.SupportEventSubscription.StateB\x03\xE0A\x03\x12\\\x0A\x0Efailure_reason\x18\x04 \x01(\x0E2?.google.cloud.support.v2.SupportEventSubscription.FailureReasonB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bdelete_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x123\x0A\x0Apurge_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"E\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07WORKING\x10\x01\x12\x0B\x0A\x07FAILING\x10\x02\x12\x0B\x0A\x07DELETED\x10\x03\"f\x0A\x0DFailureReason\x12\x1E\x0A\x1AFAILURE_REASON_UNSPECIFIED\x10\x00\x12\x15\x0A\x11PERMISSION_DENIED\x10\x01\x12\x13\x0A\x0FTOPIC_NOT_FOUND\x10\x02\x12\x09\x0A\x05OTHER\x10\x03:\xC4\x01\xEAA\xC0\x01\x0A4cloudsupport.googleapis.com/SupportEventSubscription\x12Sorganizations/{organization}/supportEventSubscriptions/{support_event_subscription}*\x19supportEventSubscriptions2\x18supportEventSubscriptionB\xC6\x01\x0A\x1Bcom.google.cloud.support.v2B\x1DSupportEventSubscriptionProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php deleted file mode 100644 index bf830fd0b677..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xED\x1B\x0A@google/cloud/support/v2/support_event_subscription_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A8google/cloud/support/v2/support_event_subscription.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\"\xD1\x01\x0A%CreateSupportEventSubscriptionRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124cloudsupport.googleapis.com/SupportEventSubscription\x12Z\x0A\x1Asupport_event_subscription\x18\x02 \x01(\x0B21.google.cloud.support.v2.SupportEventSubscriptionB\x03\xE0A\x02\"p\x0A\"GetSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"\xD5\x01\x0A\$ListSupportEventSubscriptionsRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124cloudsupport.googleapis.com/SupportEventSubscription\x12\x13\x0A\x06filter\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x19\x0A\x0Cshow_deleted\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\"\x98\x01\x0A%ListSupportEventSubscriptionsResponse\x12V\x0A\x1Bsupport_event_subscriptions\x18\x01 \x03(\x0B21.google.cloud.support.v2.SupportEventSubscription\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xB9\x01\x0A%UpdateSupportEventSubscriptionRequest\x12Z\x0A\x1Asupport_event_subscription\x18\x01 \x01(\x0B21.google.cloud.support.v2.SupportEventSubscriptionB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"s\x0A%DeleteSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"u\x0A'UndeleteSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"t\x0A&ExpungeSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription2\x92\x0E\x0A\x1FSupportEventSubscriptionService\x12\x93\x02\x0A\x1ECreateSupportEventSubscription\x12>.google.cloud.support.v2.CreateSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"~\xDAA!parent,support_event_subscription\x82\xD3\xE4\x93\x02T\"6/v2/{parent=organizations/*}/supportEventSubscriptions:\x1Asupport_event_subscription\x12\xD4\x01\x0A\x1BGetSupportEventSubscription\x12;.google.cloud.support.v2.GetSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\x126/v2/{name=organizations/*/supportEventSubscriptions/*}\x12\xE7\x01\x0A\x1DListSupportEventSubscriptions\x12=.google.cloud.support.v2.ListSupportEventSubscriptionsRequest\x1A>.google.cloud.support.v2.ListSupportEventSubscriptionsResponse\"G\xDAA\x06parent\x82\xD3\xE4\x93\x028\x126/v2/{parent=organizations/*}/supportEventSubscriptions\x12\xB4\x02\x0A\x1EUpdateSupportEventSubscription\x12>.google.cloud.support.v2.UpdateSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"\x9E\x01\xDAA&support_event_subscription,update_mask\x82\xD3\xE4\x93\x02o2Q/v2/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}:\x1Asupport_event_subscription\x12\xDA\x01\x0A\x1EDeleteSupportEventSubscription\x12>.google.cloud.support.v2.DeleteSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"E\xDAA\x04name\x82\xD3\xE4\x93\x028*6/v2/{name=organizations/*/supportEventSubscriptions/*}\x12\xE3\x01\x0A UndeleteSupportEventSubscription\x12@.google.cloud.support.v2.UndeleteSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"J\x82\xD3\xE4\x93\x02D\"?/v2/{name=organizations/*/supportEventSubscriptions/*}:undelete:\x01*\x12\xCC\x01\x0A\x1FExpungeSupportEventSubscription\x12?.google.cloud.support.v2.ExpungeSupportEventSubscriptionRequest\x1A\x16.google.protobuf.Empty\"P\xDAA\x04name\x82\xD3\xE4\x93\x02C\">/v2/{name=organizations/*/supportEventSubscriptions/*}:expunge:\x01*\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Bcom.google.cloud.support.v2B\$SupportEventSubscriptionServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php deleted file mode 100644 index 57386d9ba65c..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.support.v2.Actor - */ -class Actor extends \Google\Protobuf\Internal\Message -{ - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * - * Generated from protobuf field string email = 2 [deprecated = true]; - * @deprecated - */ - protected $email = ''; - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_support = false; - /** - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * - * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $username = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * @type string $email - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * @type bool $google_support - * Output only. Whether the actor is a Google support actor. - * @type string $username - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\Actor::initOnce(); - parent::__construct($data); - } - - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * - * Generated from protobuf field string email = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getEmail() - { - if ($this->email !== '') { - @trigger_error('email is deprecated.', E_USER_DEPRECATED); - } - return $this->email; - } - - /** - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * - * Generated from protobuf field string email = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEmail($var) - { - @trigger_error('email is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getGoogleSupport() - { - return $this->google_support; - } - - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setGoogleSupport($var) - { - GPBUtil::checkBool($var); - $this->google_support = $var; - - return $this; - } - - /** - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * - * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * - * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php deleted file mode 100644 index d6da92e2a525..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.support.v2.Attachment - */ -class Attachment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The time at which the attachment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = null; - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - */ - protected $filename = ''; - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $mime_type = ''; - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. The resource name of the attachment. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the attachment was created. - * @type \Google\Cloud\Support\V2\Actor $creator - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * @type string $filename - * The filename of the attachment (e.g. `"graph.jpg"`). - * @type string $mime_type - * Output only. The MIME type of the attachment (e.g. text/plain). - * @type int|string $size_bytes - * Output only. The size of the attachment in bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\Attachment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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. The time at which the attachment was created. - * - * 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. The time at which the attachment was created. - * - * 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. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - * @return string - */ - public function getFilename() - { - return $this->filename; - } - - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - * @param string $var - * @return $this - */ - public function setFilename($var) - { - GPBUtil::checkString($var, True); - $this->filename = $var; - - return $this; - } - - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php deleted file mode 100644 index 026ffb5c3278..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.support.v2.CaseClassification - */ -class CaseClassification extends \Google\Protobuf\Internal\Message -{ - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * - * Generated from protobuf field string id = 3; - */ - protected $id = ''; - /** - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * @type string $display_name - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\PBCase::initOnce(); - parent::__construct($data); - } - - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * - * Generated from protobuf field string id = 3; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * - * Generated from protobuf field string id = 3; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php deleted file mode 100644 index 7a5f629348a4..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.support.v2.CloseCaseRequest - */ -class CloseCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case to close. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the case to close. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case to close. - * - * 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 name of the case to close. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php deleted file mode 100644 index 9aeb311e6952..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.support.v2.Comment - */ -class Comment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. The resource name of the comment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The time when the comment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The user or Google Support agent who created the comment. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = null; - /** - * The full comment body. - * Maximum of 12800 characters. - * - * Generated from protobuf field string body = 4; - */ - protected $body = ''; - /** - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * - * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - protected $plain_text_body = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. The resource name of the comment. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the comment was created. - * @type \Google\Cloud\Support\V2\Actor $creator - * Output only. The user or Google Support agent who created the comment. - * @type string $body - * The full comment body. - * Maximum of 12800 characters. - * @type string $plain_text_body - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\Comment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. The resource name of the comment. - * - * 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. The resource name of the comment. - * - * 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; - } - - /** - * Output only. The time when the comment was created. - * - * 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. The time when the comment was created. - * - * 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. The user or Google Support agent who created the comment. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * Output only. The user or Google Support agent who created the comment. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * The full comment body. - * Maximum of 12800 characters. - * - * Generated from protobuf field string body = 4; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * The full comment body. - * Maximum of 12800 characters. - * - * Generated from protobuf field string body = 4; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - - /** - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * - * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - * @deprecated - */ - public function getPlainTextBody() - { - if ($this->plain_text_body !== '') { - @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); - } - return $this->plain_text_body; - } - - /** - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * - * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - * @deprecated - */ - public function setPlainTextBody($var) - { - @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->plain_text_body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php deleted file mode 100644 index 2df993059685..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.support.v2.CreateCaseRequest - */ -class CreateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent under which the case should be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The case to be created. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $case = null; - - /** - * @param string $parent Required. The name of the parent under which the case should be created. Please see - * {@see CaseServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\Support\V2\PBCase $case Required. The case to be created. - * - * @return \Google\Cloud\Support\V2\CreateCaseRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2\PBCase $case): self - { - return (new self()) - ->setParent($parent) - ->setCase($case); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent under which the case should be created. - * @type \Google\Cloud\Support\V2\PBCase $case - * Required. The case to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent under which the case should be created. - * - * 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 name of the parent under which the case should be created. - * - * 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 case to be created. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\PBCase|null - */ - public function getCase() - { - return $this->case; - } - - public function hasCase() - { - return isset($this->case); - } - - public function clearCase() - { - unset($this->case); - } - - /** - * Required. The case to be created. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\PBCase $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\PBCase::class); - $this->case = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php deleted file mode 100644 index 192221045eb4..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.support.v2.CreateCommentRequest - */ -class CreateCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case to which the comment should be added. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The comment to be added. - * - * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $comment = null; - - /** - * @param string $parent Required. The name of the case to which the comment should be added. Please see - * {@see CommentServiceClient::caseName()} for help formatting this field. - * @param \Google\Cloud\Support\V2\Comment $comment Required. The comment to be added. - * - * @return \Google\Cloud\Support\V2\CreateCommentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2\Comment $comment): self - { - return (new self()) - ->setParent($parent) - ->setComment($comment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the case to which the comment should be added. - * @type \Google\Cloud\Support\V2\Comment $comment - * Required. The comment to be added. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case to which the comment should be added. - * - * 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 name of the case to which the comment should be added. - * - * 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 comment to be added. - * - * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\Comment|null - */ - public function getComment() - { - return $this->comment; - } - - public function hasComment() - { - return isset($this->comment); - } - - public function clearComment() - { - unset($this->comment); - } - - /** - * Required. The comment to be added. - * - * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\Comment $var - * @return $this - */ - public function setComment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Comment::class); - $this->comment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php deleted file mode 100644 index 0ec88c1c9e3f..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.support.v2.CreateSupportEventSubscriptionRequest - */ -class CreateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Pub/Sub configuration to create. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $support_event_subscription = null; - - /** - * @param string $parent Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_id} - * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. - * @param \Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription Required. The Pub/Sub configuration to create. - * - * @return \Google\Cloud\Support\V2\CreateSupportEventSubscriptionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription): self - { - return (new self()) - ->setParent($parent) - ->setSupportEventSubscription($supportEventSubscription); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_id} - * @type \Google\Cloud\Support\V2\SupportEventSubscription $support_event_subscription - * Required. The Pub/Sub configuration to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_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 parent resource name where the support event subscription - * will be created. Format: organizations/{organization_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 Pub/Sub configuration to create. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\SupportEventSubscription|null - */ - public function getSupportEventSubscription() - { - return $this->support_event_subscription; - } - - public function hasSupportEventSubscription() - { - return isset($this->support_event_subscription); - } - - public function clearSupportEventSubscription() - { - unset($this->support_event_subscription); - } - - /** - * Required. The Pub/Sub configuration to create. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\SupportEventSubscription $var - * @return $this - */ - public function setSupportEventSubscription($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\SupportEventSubscription::class); - $this->support_event_subscription = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php deleted file mode 100644 index 3ee310ad6372..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.support.v2.DeleteSupportEventSubscriptionRequest - */ -class DeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\DeleteSupportEventSubscriptionRequest - * - * @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 name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php deleted file mode 100644 index bf49626249e1..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.support.v2.EscalateCaseRequest - */ -class EscalateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case to be escalated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The escalation information to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; - */ - protected $escalation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the case to be escalated. - * @type \Google\Cloud\Support\V2\Escalation $escalation - * The escalation information to be sent with the escalation request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case to be escalated. - * - * 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 name of the case to be escalated. - * - * 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; - } - - /** - * The escalation information to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; - * @return \Google\Cloud\Support\V2\Escalation|null - */ - public function getEscalation() - { - return $this->escalation; - } - - public function hasEscalation() - { - return isset($this->escalation); - } - - public function clearEscalation() - { - unset($this->escalation); - } - - /** - * The escalation information to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; - * @param \Google\Cloud\Support\V2\Escalation $var - * @return $this - */ - public function setEscalation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Escalation::class); - $this->escalation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php deleted file mode 100644 index b91391678282..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.support.v2.Escalation - */ -class Escalation extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reason = 0; - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $justification = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $reason - * Required. The reason why the Case is being escalated. - * @type string $justification - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\Escalation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getReason() - { - return $this->reason; - } - - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\Escalation\Reason::class); - $this->reason = $var; - - return $this; - } - - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJustification() - { - return $this->justification; - } - - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJustification($var) - { - GPBUtil::checkString($var, True); - $this->justification = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php deleted file mode 100644 index eeb6557770a8..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.support.v2.Escalation.Reason - */ -class Reason -{ - /** - * The escalation reason is in an unknown state or has not been specified. - * - * Generated from protobuf enum REASON_UNSPECIFIED = 0; - */ - const REASON_UNSPECIFIED = 0; - /** - * The case is taking too long to resolve. - * - * Generated from protobuf enum RESOLUTION_TIME = 1; - */ - const RESOLUTION_TIME = 1; - /** - * The support agent does not have the expertise required to successfully - * resolve the issue. - * - * Generated from protobuf enum TECHNICAL_EXPERTISE = 2; - */ - const TECHNICAL_EXPERTISE = 2; - /** - * The issue is having a significant business impact. - * - * Generated from protobuf enum BUSINESS_IMPACT = 3; - */ - const BUSINESS_IMPACT = 3; - - private static $valueToName = [ - self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', - self::RESOLUTION_TIME => 'RESOLUTION_TIME', - self::TECHNICAL_EXPERTISE => 'TECHNICAL_EXPERTISE', - self::BUSINESS_IMPACT => 'BUSINESS_IMPACT', - ]; - - 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php deleted file mode 100644 index df615006a628..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2.GetAttachmentRequest - */ -class GetAttachmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the attachment to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the attachment to get. Please see - * {@see CaseAttachmentServiceClient::attachmentName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\GetAttachmentRequest - * - * @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 name of the attachment to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the attachment to get. - * - * 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 name of the attachment to get. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php deleted file mode 100644 index 3ea4719976be..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2.GetCaseRequest - */ -class GetCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of a case to be retrieved. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full name of a case to be retrieved. Please see - * {@see CaseServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\GetCaseRequest - * - * @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 full name of a case to be retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of a case to be retrieved. - * - * 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 full name of a case to be retrieved. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php deleted file mode 100644 index d2544235252a..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2.GetCommentRequest - */ -class GetCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the comment to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the comment to retrieve. Please see - * {@see CommentServiceClient::commentName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\GetCommentRequest - * - * @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 name of the comment to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the comment to retrieve. - * - * 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 name of the comment to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php deleted file mode 100644 index b11239ed6f1a..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.support.v2.GetSupportEventSubscriptionRequest - */ -class GetSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\GetSupportEventSubscriptionRequest - * - * @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 name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php deleted file mode 100644 index a7c951278243..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.support.v2.ListAttachmentsRequest - */ -class ListAttachmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case for which attachments should be listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the case for which attachments should be listed. Please see - * {@see CaseAttachmentServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\ListAttachmentsRequest - * - * @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 name of the case for which attachments should be listed. - * @type int $page_size - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case for which attachments should be listed. - * - * 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 name of the case for which attachments should be listed. - * - * 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; - } - - /** - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @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/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php deleted file mode 100644 index 9336b1b9d73d..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2.ListAttachmentsResponse - */ -class ListAttachmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of attachments associated with a case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; - */ - private $attachments; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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\Support\V2\Attachment[] $attachments - * The list of attachments associated with a case. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * The list of attachments associated with a case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; - * @return RepeatedField<\Google\Cloud\Support\V2\Attachment> - */ - public function getAttachments() - { - return $this->attachments; - } - - /** - * The list of attachments associated with a case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; - * @param \Google\Cloud\Support\V2\Attachment[] $var - * @return $this - */ - public function setAttachments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\Attachment::class); - $this->attachments = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php deleted file mode 100644 index fb33eba6e001..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.support.v2.ListCasesRequest - */ -class ListCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of a parent to list cases under. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of a parent to list cases under. Please see - * {@see CaseServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\ListCasesRequest - * - * @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 name of a parent to list cases under. - * @type string $filter - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * @type int $page_size - * The maximum number of cases fetched with each request. Defaults to 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of a parent to list cases under. - * - * 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 name of a parent to list cases under. - * - * 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; - } - - /** - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - * @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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php deleted file mode 100644 index 497f1d847c23..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.support.v2.ListCasesResponse - */ -class ListCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - */ - private $cases; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * - * 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\Support\V2\PBCase[] $cases - * The list of cases associated with the parent after any - * filters have been applied. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - * @return RepeatedField<\Google\Cloud\Support\V2\PBCase> - */ - public function getCases() - { - return $this->cases; - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - * @param \Google\Cloud\Support\V2\PBCase[] $var - * @return $this - */ - public function setCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\PBCase::class); - $this->cases = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php deleted file mode 100644 index cdbbfb140003..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.support.v2.ListCommentsRequest - */ -class ListCommentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case for which to list comments. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of comments to fetch. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the case for which to list comments. Please see - * {@see CommentServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\ListCommentsRequest - * - * @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 name of the case for which to list comments. - * @type int $page_size - * The maximum number of comments to fetch. Defaults to 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case for which to list comments. - * - * 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 name of the case for which to list comments. - * - * 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; - } - - /** - * The maximum number of comments to fetch. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of comments to fetch. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * - * Generated from protobuf field string page_token = 5; - * @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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php deleted file mode 100644 index a1e1e711abce..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2.ListCommentsResponse - */ -class ListCommentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of the comments associated with the case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; - */ - private $comments; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * - * 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\Support\V2\Comment[] $comments - * List of the comments associated with the case. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * List of the comments associated with the case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; - * @return RepeatedField<\Google\Cloud\Support\V2\Comment> - */ - public function getComments() - { - return $this->comments; - } - - /** - * List of the comments associated with the case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; - * @param \Google\Cloud\Support\V2\Comment[] $var - * @return $this - */ - public function setComments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\Comment::class); - $this->comments = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php deleted file mode 100644 index f4c0087d1a5a..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php +++ /dev/null @@ -1,274 +0,0 @@ -google.cloud.support.v2.ListSupportEventSubscriptionsRequest - */ -class ListSupportEventSubscriptionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * - * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $show_deleted = false; - /** - * Optional. The maximum number of support event subscriptions to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_id} - * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\ListSupportEventSubscriptionsRequest - * - * @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 fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_id} - * @type string $filter - * Optional. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * @type bool $show_deleted - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * @type int $page_size - * Optional. The maximum number of support event subscriptions to return. - * @type string $page_token - * Optional. A token identifying the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_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 fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_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. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * - * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * - * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - - /** - * Optional. The maximum number of support event subscriptions to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of support event subscriptions to return. - * - * 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 the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * - * 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 the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php deleted file mode 100644 index 5b05a2a149f1..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.support.v2.ListSupportEventSubscriptionsResponse - */ -class ListSupportEventSubscriptionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The support event subscriptions. - * - * Generated from protobuf field repeated .google.cloud.support.v2.SupportEventSubscription support_event_subscriptions = 1; - */ - private $support_event_subscriptions; - /** - * A token, which can be sent 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\Support\V2\SupportEventSubscription[] $support_event_subscriptions - * The support event subscriptions. - * @type string $next_page_token - * A token, which can be sent 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\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * The support event subscriptions. - * - * Generated from protobuf field repeated .google.cloud.support.v2.SupportEventSubscription support_event_subscriptions = 1; - * @return RepeatedField<\Google\Cloud\Support\V2\SupportEventSubscription> - */ - public function getSupportEventSubscriptions() - { - return $this->support_event_subscriptions; - } - - /** - * The support event subscriptions. - * - * Generated from protobuf field repeated .google.cloud.support.v2.SupportEventSubscription support_event_subscriptions = 1; - * @param \Google\Cloud\Support\V2\SupportEventSubscription[] $var - * @return $this - */ - public function setSupportEventSubscriptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\SupportEventSubscription::class); - $this->support_event_subscriptions = $arr; - - return $this; - } - - /** - * A token, which can be sent 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, which can be sent 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/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php deleted file mode 100644 index b52e863e405a..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php +++ /dev/null @@ -1,654 +0,0 @@ -google.cloud.support.v2.Case - */ -class PBCase extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name for the case. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; - */ - protected $classification = null; - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - */ - protected $time_zone = ''; - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - */ - private $subscriber_email_addresses; - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; - */ - protected $creator = null; - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - */ - protected $contact_email = ''; - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - */ - protected $escalated = false; - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - */ - protected $test_case = false; - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - */ - protected $language_code = ''; - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; - */ - protected $priority = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name for the case. - * @type string $display_name - * The short summary of the issue reported in this case. - * @type string $description - * A broad description of the issue. - * @type \Google\Cloud\Support\V2\CaseClassification $classification - * The issue classification applicable to this case. - * @type string $time_zone - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * @type string[] $subscriber_email_addresses - * The email addresses to receive updates on this case. - * @type int $state - * Output only. The current status of the support case. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time this case was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time this case was last updated. - * @type \Google\Cloud\Support\V2\Actor $creator - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * @type string $contact_email - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * @type bool $escalated - * Whether the case is currently escalated. - * @type bool $test_case - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * @type string $language_code - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * @type int $priority - * The priority of this case. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\PBCase::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name for the case. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name for the case. - * - * 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; - } - - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; - * @return \Google\Cloud\Support\V2\CaseClassification|null - */ - public function getClassification() - { - return $this->classification; - } - - public function hasClassification() - { - return isset($this->classification); - } - - public function clearClassification() - { - unset($this->classification); - } - - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; - * @param \Google\Cloud\Support\V2\CaseClassification $var - * @return $this - */ - public function setClassification($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\CaseClassification::class); - $this->classification = $var; - - return $this; - } - - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - * @return RepeatedField - */ - public function getSubscriberEmailAddresses() - { - return $this->subscriber_email_addresses; - } - - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - * @param string[] $var - * @return $this - */ - public function setSubscriberEmailAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->subscriber_email_addresses = $arr; - - return $this; - } - - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\PBCase\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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. The time this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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; - } - - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; - * @return \Google\Cloud\Support\V2\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; - * @param \Google\Cloud\Support\V2\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - * @return string - */ - public function getContactEmail() - { - return $this->contact_email; - } - - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - * @param string $var - * @return $this - */ - public function setContactEmail($var) - { - GPBUtil::checkString($var, True); - $this->contact_email = $var; - - return $this; - } - - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - * @return bool - */ - public function getEscalated() - { - return $this->escalated; - } - - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - * @param bool $var - * @return $this - */ - public function setEscalated($var) - { - GPBUtil::checkBool($var); - $this->escalated = $var; - - return $this; - } - - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - * @return bool - */ - public function getTestCase() - { - return $this->test_case; - } - - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - * @param bool $var - * @return $this - */ - public function setTestCase($var) - { - GPBUtil::checkBool($var); - $this->test_case = $var; - - return $this; - } - - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\PBCase\Priority::class); - $this->priority = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php deleted file mode 100644 index 617441f6d2b3..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.support.v2.Case.Priority - */ -class Priority -{ - /** - * Priority is undefined or has not been set yet. - * - * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; - */ - const PRIORITY_UNSPECIFIED = 0; - /** - * Extreme impact on a production service. Service is hard down. - * - * Generated from protobuf enum P0 = 1; - */ - const P0 = 1; - /** - * Critical impact on a production service. Service is currently unusable. - * - * Generated from protobuf enum P1 = 2; - */ - const P1 = 2; - /** - * Severe impact on a production service. Service is usable but greatly - * impaired. - * - * Generated from protobuf enum P2 = 3; - */ - const P2 = 3; - /** - * Medium impact on a production service. Service is available, but - * moderately impaired. - * - * Generated from protobuf enum P3 = 4; - */ - const P3 = 4; - /** - * General questions or minor issues. Production service is fully - * available. - * - * Generated from protobuf enum P4 = 5; - */ - const P4 = 5; - - private static $valueToName = [ - self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', - self::P0 => 'P0', - self::P1 => 'P1', - self::P2 => 'P2', - self::P3 => 'P3', - self::P4 => 'P4', - ]; - - 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/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php deleted file mode 100644 index 9a4a8304d949..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.support.v2.Case.State - */ -class State -{ - /** - * Case is in an unknown state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The case has been created but no one is assigned to work on it yet. - * - * Generated from protobuf enum NEW = 1; - */ - const PBNEW = 1; - /** - * The case is currently being handled by Google support. - * - * Generated from protobuf enum IN_PROGRESS_GOOGLE_SUPPORT = 2; - */ - const IN_PROGRESS_GOOGLE_SUPPORT = 2; - /** - * Google is waiting for a response. - * - * Generated from protobuf enum ACTION_REQUIRED = 3; - */ - const ACTION_REQUIRED = 3; - /** - * A solution has been offered for the case, but it isn't yet closed. - * - * Generated from protobuf enum SOLUTION_PROVIDED = 4; - */ - const SOLUTION_PROVIDED = 4; - /** - * The case has been resolved. - * - * Generated from protobuf enum CLOSED = 5; - */ - const CLOSED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PBNEW => 'NEW', - self::IN_PROGRESS_GOOGLE_SUPPORT => 'IN_PROGRESS_GOOGLE_SUPPORT', - self::ACTION_REQUIRED => 'ACTION_REQUIRED', - self::SOLUTION_PROVIDED => 'SOLUTION_PROVIDED', - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php deleted file mode 100644 index b2951a27d2b8..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.support.v2.SearchCaseClassificationsRequest - */ -class SearchCaseClassificationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * - * Generated from protobuf field string query = 1; - */ - protected $query = ''; - /** - * The maximum number of classifications fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * @type int $page_size - * The maximum number of classifications fetched with each request. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * - * Generated from protobuf field string query = 1; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * - * Generated from protobuf field string query = 1; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The maximum number of classifications fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of classifications fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php deleted file mode 100644 index 01ddd091da7e..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2.SearchCaseClassificationsResponse - */ -class SearchCaseClassificationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; - */ - private $case_classifications; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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\Support\V2\CaseClassification[] $case_classifications - * The classifications retrieved. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; - * @return RepeatedField<\Google\Cloud\Support\V2\CaseClassification> - */ - public function getCaseClassifications() - { - return $this->case_classifications; - } - - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; - * @param \Google\Cloud\Support\V2\CaseClassification[] $var - * @return $this - */ - public function setCaseClassifications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\CaseClassification::class); - $this->case_classifications = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php deleted file mode 100644 index 7fee30e6b0e2..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.support.v2.SearchCasesRequest - */ -class SearchCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the parent resource to search for cases under. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - /** - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - */ - protected $query = ''; - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the parent resource to search for cases under. - * @type string $query - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * @type int $page_size - * The maximum number of cases fetched with each request. The default page - * size is 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the parent resource to search for cases under. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the parent resource to search for cases under. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php deleted file mode 100644 index d8dbd382a842..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.support.v2.SearchCasesResponse - */ -class SearchCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - */ - private $cases; - /** - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * - * 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\Support\V2\PBCase[] $cases - * The list of cases associated with the parent after any - * filters have been applied. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - * @return RepeatedField<\Google\Cloud\Support\V2\PBCase> - */ - public function getCases() - { - return $this->cases; - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - * @param \Google\Cloud\Support\V2\PBCase[] $var - * @return $this - */ - public function setCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\PBCase::class); - $this->cases = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php deleted file mode 100644 index 7cd1a7511a20..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php +++ /dev/null @@ -1,353 +0,0 @@ -google.cloud.support.v2.SupportEventSubscription - */ -class SupportEventSubscription extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the support event subscription. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. The name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * - * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pub_sub_topic = ''; - /** - * Output only. The state of the subscription. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failure_reason = 0; - /** - * Output only. The time at which the subscription was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which the subscription was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The time at which the subscription was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. The time at which the subscription will be purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $purge_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the support event subscription. - * @type string $pub_sub_topic - * Required. The name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * @type int $state - * Output only. The state of the subscription. - * @type int $failure_reason - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the subscription was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the subscription was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The time at which the subscription was deleted. - * @type \Google\Protobuf\Timestamp $purge_time - * Output only. The time at which the subscription will be purged. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscription::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the support event subscription. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the support event subscription. - * - * 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 name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * - * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPubSubTopic() - { - return $this->pub_sub_topic; - } - - /** - * Required. The name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * - * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPubSubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pub_sub_topic = $var; - - return $this; - } - - /** - * Output only. The state of the subscription. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the subscription. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\SupportEventSubscription\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFailureReason() - { - return $this->failure_reason; - } - - /** - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFailureReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\SupportEventSubscription\FailureReason::class); - $this->failure_reason = $var; - - return $this; - } - - /** - * Output only. The time at which the subscription was created. - * - * 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. The time at which the subscription was created. - * - * 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. The time at which the subscription was last updated. - * - * 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. The time at which the subscription was last updated. - * - * 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. The time at which the subscription was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The time at which the subscription was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. The time at which the subscription will be purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPurgeTime() - { - return $this->purge_time; - } - - public function hasPurgeTime() - { - return isset($this->purge_time); - } - - public function clearPurgeTime() - { - unset($this->purge_time); - } - - /** - * Output only. The time at which the subscription will be purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPurgeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->purge_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php deleted file mode 100644 index d0e213d58cfa..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.support.v2.SupportEventSubscription.FailureReason - */ -class FailureReason -{ - /** - * Unspecified failure reason. - * - * Generated from protobuf enum FAILURE_REASON_UNSPECIFIED = 0; - */ - const FAILURE_REASON_UNSPECIFIED = 0; - /** - * The service account (i.e. - * cloud-support-apievents\@system.gserviceaccount.com) lacks the permission - * to publish to the customer's Pub/Sub topic. - * - * Generated from protobuf enum PERMISSION_DENIED = 1; - */ - const PERMISSION_DENIED = 1; - /** - * The specified Pub/Sub topic does not exist. - * - * Generated from protobuf enum TOPIC_NOT_FOUND = 2; - */ - const TOPIC_NOT_FOUND = 2; - /** - * Message failed to publish due to a system-side error. - * - * Generated from protobuf enum OTHER = 3; - */ - const OTHER = 3; - - private static $valueToName = [ - self::FAILURE_REASON_UNSPECIFIED => 'FAILURE_REASON_UNSPECIFIED', - self::PERMISSION_DENIED => 'PERMISSION_DENIED', - self::TOPIC_NOT_FOUND => 'TOPIC_NOT_FOUND', - self::OTHER => 'OTHER', - ]; - - 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/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php deleted file mode 100644 index a06e2d1706c0..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.support.v2.SupportEventSubscription.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Subscription is active and working. - * - * Generated from protobuf enum WORKING = 1; - */ - const WORKING = 1; - /** - * Subscription is failing. Notifications cannot be published for some - * reason. - * - * Generated from protobuf enum FAILING = 2; - */ - const FAILING = 2; - /** - * Subscription has been deleted and is pending purge. Notifications are not - * sent for deleted subscriptions. Deleted subscriptions are purged after - * their `purge_time` has passed. - * - * Generated from protobuf enum DELETED = 3; - */ - const DELETED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::WORKING => 'WORKING', - self::FAILING => 'FAILING', - 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/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php deleted file mode 100644 index 3277fa4eab91..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.support.v2.UndeleteSupportEventSubscriptionRequest - */ -class UndeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php deleted file mode 100644 index 7927f7822642..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.support.v2.UpdateCaseRequest - */ -class UpdateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The case to update. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $case = null; - /** - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Support\V2\PBCase $case Required. The case to update. - * @param \Google\Protobuf\FieldMask $updateMask A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * @return \Google\Cloud\Support\V2\UpdateCaseRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Support\V2\PBCase $case, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCase($case) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Support\V2\PBCase $case - * Required. The case to update. - * @type \Google\Protobuf\FieldMask $update_mask - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The case to update. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\PBCase|null - */ - public function getCase() - { - return $this->case; - } - - public function hasCase() - { - return isset($this->case); - } - - public function clearCase() - { - unset($this->case); - } - - /** - * Required. The case to update. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\PBCase $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\PBCase::class); - $this->case = $var; - - return $this; - } - - /** - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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); - } - - /** - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php deleted file mode 100644 index b6193ba06d07..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.support.v2.UpdateSupportEventSubscriptionRequest - */ -class UpdateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $support_event_subscription = null; - /** - * Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * @return \Google\Cloud\Support\V2\UpdateSupportEventSubscriptionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSupportEventSubscription($supportEventSubscription) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Support\V2\SupportEventSubscription $support_event_subscription - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\SupportEventSubscription|null - */ - public function getSupportEventSubscription() - { - return $this->support_event_subscription; - } - - public function hasSupportEventSubscription() - { - return isset($this->support_event_subscription); - } - - public function clearSupportEventSubscription() - { - unset($this->support_event_subscription); - } - - /** - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\SupportEventSubscription $var - * @return $this - */ - public function setSupportEventSubscription($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\SupportEventSubscription::class); - $this->support_event_subscription = $var; - - return $this; - } - - /** - * Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * 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. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * 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/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php deleted file mode 100644 index 046a8aedb81e..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php +++ /dev/null @@ -1,105 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Attachment $response */ - $response = $caseAttachmentServiceClient->getAttachment($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 = CaseAttachmentServiceClient::attachmentName( - '[ORGANIZATION]', - '[CASE]', - '[ATTACHMENT_ID]' - ); - - get_attachment_sample($formattedName); -} -// [END cloudsupport_v2_generated_CaseAttachmentService_GetAttachment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php deleted file mode 100644 index 2f5f6c15522a..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseAttachmentServiceClient->listAttachments($request); - - /** @var Attachment $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 = CaseAttachmentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - list_attachments_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CaseAttachmentService_ListAttachments_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php deleted file mode 100644 index abe7fa02e037..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->closeCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - close_case_sample($formattedName); -} -// [END cloudsupport_v2_generated_CaseService_CloseCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php deleted file mode 100644 index bfa24805b97a..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setCase($case); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->createCase($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 -{ - $formattedParent = CaseServiceClient::projectName('[PROJECT]'); - - create_case_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CaseService_CreateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php deleted file mode 100644 index ff978d1bbba7..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->escalateCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - escalate_case_sample($formattedName); -} -// [END cloudsupport_v2_generated_CaseService_EscalateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php deleted file mode 100644 index c74fae332e8e..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->getCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - get_case_sample($formattedName); -} -// [END cloudsupport_v2_generated_CaseService_GetCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php deleted file mode 100644 index 7889879da0e0..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseServiceClient->listCases($request); - - /** @var PBCase $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 = CaseServiceClient::projectName('[PROJECT]'); - - list_cases_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CaseService_ListCases_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php deleted file mode 100644 index 6531ad0432f3..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php +++ /dev/null @@ -1,71 +0,0 @@ - "`. For example, - * `"Technical Issue > Compute > Compute Engine"`. - * - * Classification IDs returned by this endpoint are valid for at least six - * months. When a classification is deactivated, this endpoint immediately - * stops returning it. After six months, `case.create` requests using the - * classification will fail. - * - * 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 search_case_classifications_sample(): void -{ - // Create a client. - $caseServiceClient = new CaseServiceClient(); - - // Prepare the request message. - $request = new SearchCaseClassificationsRequest(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseServiceClient->searchCaseClassifications($request); - - /** @var CaseClassification $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 cloudsupport_v2_generated_CaseService_SearchCaseClassifications_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php deleted file mode 100644 index 42e3e2f444e0..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php +++ /dev/null @@ -1,62 +0,0 @@ -searchCases($request); - - /** @var PBCase $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 cloudsupport_v2_generated_CaseService_SearchCases_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php deleted file mode 100644 index b723593f103a..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php +++ /dev/null @@ -1,59 +0,0 @@ -setCase($case); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->updateCase($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudsupport_v2_generated_CaseService_UpdateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php deleted file mode 100644 index 36bf38f2e93a..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent) - ->setComment($comment); - - // Call the API and handle any network failures. - try { - /** @var Comment $response */ - $response = $commentServiceClient->createComment($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 -{ - $formattedParent = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - create_comment_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CommentService_CreateComment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php deleted file mode 100644 index 10ebea221aa6..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php +++ /dev/null @@ -1,100 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Comment $response */ - $response = $commentServiceClient->getComment($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 = CommentServiceClient::commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); - - get_comment_sample($formattedName); -} -// [END cloudsupport_v2_generated_CommentService_GetComment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php deleted file mode 100644 index cbfe58d206e6..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $commentServiceClient->listComments($request); - - /** @var Comment $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 = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - list_comments_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CommentService_ListComments_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php deleted file mode 100644 index 16786c58af00..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php +++ /dev/null @@ -1,80 +0,0 @@ -setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->createSupportEventSubscription($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 -{ - $formattedParent = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); - $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; - - create_support_event_subscription_sample($formattedParent, $supportEventSubscriptionPubSubTopic); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_CreateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php deleted file mode 100644 index f7263d70ab14..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->deleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - delete_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_DeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php deleted file mode 100644 index e8bdfd53d627..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->getSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - get_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_GetSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php deleted file mode 100644 index 828bdacb0a68..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $supportEventSubscriptionServiceClient->listSupportEventSubscriptions($request); - - /** @var SupportEventSubscription $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 = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); - - list_support_event_subscriptions_sample($formattedParent); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_ListSupportEventSubscriptions_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php deleted file mode 100644 index 0153eb19d132..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->undeleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - undelete_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_UndeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php deleted file mode 100644 index f7084b7cc9b4..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php +++ /dev/null @@ -1,74 +0,0 @@ -setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new UpdateSupportEventSubscriptionRequest()) - ->setSupportEventSubscription($supportEventSubscription); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->updateSupportEventSubscription($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 -{ - $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; - - update_support_event_subscription_sample($supportEventSubscriptionPubSubTopic); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_UpdateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php deleted file mode 100644 index 8cdb4af45028..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php +++ /dev/null @@ -1,409 +0,0 @@ - getAttachmentAsync(GetAttachmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAttachmentsAsync(ListAttachmentsRequest $request, array $optionalArgs = []) - */ -final class CaseAttachmentServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2.CaseAttachmentService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/case_attachment_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/case_attachment_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/case_attachment_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/case_attachment_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a attachment - * resource. - * - * @param string $organization - * @param string $case - * @param string $attachmentId - * - * @return string The formatted attachment resource. - */ - public static function attachmentName(string $organization, string $case, string $attachmentId): string - { - return self::getPathTemplate('attachment')->render([ - 'organization' => $organization, - 'case' => $case, - 'attachment_id' => $attachmentId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case_attachment_id resource. - * - * @param string $organization - * @param string $case - * @param string $attachmentId - * - * @return string The formatted organization_case_attachment_id resource. - */ - public static function organizationCaseAttachmentIdName(string $organization, string $case, string $attachmentId): string - { - return self::getPathTemplate('organizationCaseAttachmentId')->render([ - 'organization' => $organization, - 'case' => $case, - 'attachment_id' => $attachmentId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_case_attachment_id resource. - * - * @param string $project - * @param string $case - * @param string $attachmentId - * - * @return string The formatted project_case_attachment_id resource. - */ - public static function projectCaseAttachmentIdName(string $project, string $case, string $attachmentId): string - { - return self::getPathTemplate('projectCaseAttachmentId')->render([ - 'project' => $project, - 'case' => $case, - 'attachment_id' => $attachmentId, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - attachment: organizations/{organization}/cases/{case}/attachments/{attachment_id} - * - case: organizations/{organization}/cases/{case} - * - organizationCase: organizations/{organization}/cases/{case} - * - organizationCaseAttachmentId: organizations/{organization}/cases/{case}/attachments/{attachment_id} - * - projectCase: projects/{project}/cases/{case} - * - projectCaseAttachmentId: projects/{project}/cases/{case}/attachments/{attachment_id} - * - * 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 'cloudsupport.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\Support\V2\CaseAttachmentServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CaseAttachmentServiceClient(['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); - } - - /** 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); - } - - /** - * Retrieve an attachment associated with a support case. - * - * EXAMPLES: - * - * cURL: - * - * ```shell - * attachment="projects/some-project/cases/23598314/attachments/0684M00000P3h1fQAB" - * curl \ - * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - * "https://cloudsupport.googleapis.com/v2/$attachment" - * ``` - * - * Python: - * - * ```python - * import googleapiclient.discovery - * - * api_version = "v2" - * supportApiService = googleapiclient.discovery.build( - * serviceName="cloudsupport", - * version=api_version, - * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - * ) - * request = ( - * supportApiService.cases() - * .attachments() - * .get(name="projects/some-project/cases/43595344/attachments/0684M00000P3h1fQAB") - * ) - * print(request.execute()) - * ``` - * - * The async variant is {@see CaseAttachmentServiceClient::getAttachmentAsync()} . - * - * @example samples/V2/CaseAttachmentServiceClient/get_attachment.php - * - * @param GetAttachmentRequest $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 Attachment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAttachment(GetAttachmentRequest $request, array $callOptions = []): Attachment - { - return $this->startApiCall('GetAttachment', $request, $callOptions)->wait(); - } - - /** - * List all the attachments associated with a support case. - * - * The async variant is {@see CaseAttachmentServiceClient::listAttachmentsAsync()} - * . - * - * @example samples/V2/CaseAttachmentServiceClient/list_attachments.php - * - * @param ListAttachmentsRequest $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 listAttachments(ListAttachmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAttachments', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php deleted file mode 100644 index e1f1a634d50d..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php +++ /dev/null @@ -1,542 +0,0 @@ - closeCaseAsync(CloseCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCaseAsync(CreateCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface escalateCaseAsync(EscalateCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCaseAsync(GetCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCasesAsync(ListCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchCaseClassificationsAsync(SearchCaseClassificationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchCasesAsync(SearchCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCaseAsync(UpdateCaseRequest $request, array $optionalArgs = []) - */ -final class CaseServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2.CaseService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/case_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/case_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/case_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/case_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - organization: organizations/{organization} - * - organizationCase: organizations/{organization}/cases/{case} - * - project: projects/{project} - * - projectCase: projects/{project}/cases/{case} - * - * 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 'cloudsupport.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\Support\V2\CaseServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CaseServiceClient(['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); - } - - /** 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); - } - - /** - * Close a case. - * - * The async variant is {@see CaseServiceClient::closeCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/close_case.php - * - * @param CloseCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function closeCase(CloseCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('CloseCase', $request, $callOptions)->wait(); - } - - /** - * Create a new case and associate it with a parent. - * - * It must have the following fields set: `display_name`, `description`, - * `classification`, and `priority`. If you're just testing the API and don't - * want to route your case to an agent, set `testCase=true`. - * - * The async variant is {@see CaseServiceClient::createCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/create_case.php - * - * @param CreateCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCase(CreateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('CreateCase', $request, $callOptions)->wait(); - } - - /** - * Escalate a case, starting the Google Cloud Support escalation management - * process. - * - * This operation is only available for some support services. Go to - * https://cloud.google.com/support and look for 'Technical support - * escalations' in the feature list to find out which ones let you - * do that. - * - * The async variant is {@see CaseServiceClient::escalateCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/escalate_case.php - * - * @param EscalateCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function escalateCase(EscalateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('EscalateCase', $request, $callOptions)->wait(); - } - - /** - * Retrieve a case. - * - * The async variant is {@see CaseServiceClient::getCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/get_case.php - * - * @param GetCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCase(GetCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('GetCase', $request, $callOptions)->wait(); - } - - /** - * Retrieve all cases under a parent, but not its children. - * - * For example, listing cases under an organization only returns the cases - * that are directly parented by that organization. To retrieve cases - * under an organization and its projects, use `cases.search`. - * - * The async variant is {@see CaseServiceClient::listCasesAsync()} . - * - * @example samples/V2/CaseServiceClient/list_cases.php - * - * @param ListCasesRequest $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 listCases(ListCasesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCases', $request, $callOptions); - } - - /** - * Retrieve valid classifications to use when creating a support case. - * - * Classifications are hierarchical. Each classification is a string - * containing all levels of the hierarchy separated by `" > "`. For example, - * `"Technical Issue > Compute > Compute Engine"`. - * - * Classification IDs returned by this endpoint are valid for at least six - * months. When a classification is deactivated, this endpoint immediately - * stops returning it. After six months, `case.create` requests using the - * classification will fail. - * - * The async variant is {@see CaseServiceClient::searchCaseClassificationsAsync()} - * . - * - * @example samples/V2/CaseServiceClient/search_case_classifications.php - * - * @param SearchCaseClassificationsRequest $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 searchCaseClassifications(SearchCaseClassificationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchCaseClassifications', $request, $callOptions); - } - - /** - * Search for cases using a query. - * - * The async variant is {@see CaseServiceClient::searchCasesAsync()} . - * - * @example samples/V2/CaseServiceClient/search_cases.php - * - * @param SearchCasesRequest $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 searchCases(SearchCasesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchCases', $request, $callOptions); - } - - /** - * Update a case. Only some fields can be updated. - * - * The async variant is {@see CaseServiceClient::updateCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/update_case.php - * - * @param UpdateCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCase(UpdateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('UpdateCase', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php deleted file mode 100644 index 123c261c9c96..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php +++ /dev/null @@ -1,437 +0,0 @@ - createCommentAsync(CreateCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCommentAsync(GetCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCommentsAsync(ListCommentsRequest $request, array $optionalArgs = []) - */ -final class CommentServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2.CommentService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/comment_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/comment_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/comment_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/comment_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a comment - * resource. - * - * @param string $organization - * @param string $case - * @param string $comment - * - * @return string The formatted comment resource. - */ - public static function commentName(string $organization, string $case, string $comment): string - { - return self::getPathTemplate('comment')->render([ - 'organization' => $organization, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case_comment resource. - * - * @param string $organization - * @param string $case - * @param string $comment - * - * @return string The formatted organization_case_comment resource. - */ - public static function organizationCaseCommentName(string $organization, string $case, string $comment): string - { - return self::getPathTemplate('organizationCaseComment')->render([ - 'organization' => $organization, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_case_comment resource. - * - * @param string $project - * @param string $case - * @param string $comment - * - * @return string The formatted project_case_comment resource. - */ - public static function projectCaseCommentName(string $project, string $case, string $comment): string - { - return self::getPathTemplate('projectCaseComment')->render([ - 'project' => $project, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - comment: organizations/{organization}/cases/{case}/comments/{comment} - * - organizationCase: organizations/{organization}/cases/{case} - * - organizationCaseComment: organizations/{organization}/cases/{case}/comments/{comment} - * - projectCase: projects/{project}/cases/{case} - * - projectCaseComment: projects/{project}/cases/{case}/comments/{comment} - * - * 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 'cloudsupport.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\Support\V2\CommentServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CommentServiceClient(['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); - } - - /** 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); - } - - /** - * Add a new comment to a case. - * - * The comment must have the following fields set: `body`. - * - * The async variant is {@see CommentServiceClient::createCommentAsync()} . - * - * @example samples/V2/CommentServiceClient/create_comment.php - * - * @param CreateCommentRequest $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 Comment - * - * @throws ApiException Thrown if the API call fails. - */ - public function createComment(CreateCommentRequest $request, array $callOptions = []): Comment - { - return $this->startApiCall('CreateComment', $request, $callOptions)->wait(); - } - - /** - * Retrieve a comment. - * - * EXAMPLES: - * - * cURL: - * - * ```shell - * comment="projects/some-project/cases/43595344/comments/234567890" - * curl \ - * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - * "https://cloudsupport.googleapis.com/v2/$comment" - * ``` - * - * Python: - * - * ```python - * import googleapiclient.discovery - * - * api_version = "v2" - * supportApiService = googleapiclient.discovery.build( - * serviceName="cloudsupport", - * version=api_version, - * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - * ) - * - * request = supportApiService.cases().comments().get( - * name="projects/some-project/cases/43595344/comments/234567890", - * ) - * print(request.execute()) - * ``` - * - * The async variant is {@see CommentServiceClient::getCommentAsync()} . - * - * @example samples/V2/CommentServiceClient/get_comment.php - * - * @param GetCommentRequest $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 Comment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getComment(GetCommentRequest $request, array $callOptions = []): Comment - { - return $this->startApiCall('GetComment', $request, $callOptions)->wait(); - } - - /** - * List all the comments associated with a case. - * - * The async variant is {@see CommentServiceClient::listCommentsAsync()} . - * - * @example samples/V2/CommentServiceClient/list_comments.php - * - * @param ListCommentsRequest $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 listComments(ListCommentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListComments', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php deleted file mode 100644 index 2d1e59412ff0..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php +++ /dev/null @@ -1,480 +0,0 @@ - createSupportEventSubscriptionAsync(CreateSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSupportEventSubscriptionAsync(DeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface expungeSupportEventSubscriptionAsync(ExpungeSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSupportEventSubscriptionAsync(GetSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSupportEventSubscriptionsAsync(ListSupportEventSubscriptionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeleteSupportEventSubscriptionAsync(UndeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSupportEventSubscriptionAsync(UpdateSupportEventSubscriptionRequest $request, array $optionalArgs = []) - */ -final class SupportEventSubscriptionServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2.SupportEventSubscriptionService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/support_event_subscription_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * support_event_subscription resource. - * - * @param string $organization - * @param string $supportEventSubscription - * - * @return string The formatted support_event_subscription resource. - */ - public static function supportEventSubscriptionName(string $organization, string $supportEventSubscription): string - { - return self::getPathTemplate('supportEventSubscription')->render([ - 'organization' => $organization, - 'support_event_subscription' => $supportEventSubscription, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - organization: organizations/{organization} - * - supportEventSubscription: organizations/{organization}/supportEventSubscriptions/{support_event_subscription} - * - * 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 'cloudsupport.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\Support\V2\SupportEventSubscriptionServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new SupportEventSubscriptionServiceClient(['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); - } - - /** 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); - } - - /** - * Creates a support event subscription for an organization. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::createSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php - * - * @param CreateSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSupportEventSubscription(CreateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('CreateSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Soft deletes a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::deleteSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php - * - * @param DeleteSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSupportEventSubscription(DeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('DeleteSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Expunges a support event subscription. - * - * EXAMPLES: - * - * cURL: - * - * ```shell - * support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" - * curl \ - * --request POST \ - * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - * "https://cloudsupport.googleapis.com/v2/$support_event_subscription:expunge" - * ``` - * - * Python: - * - * ```python - * import googleapiclient.discovery - * - * api_version = "v2" - * supportApiService = googleapiclient.discovery.build( - * serviceName="cloudsupport", - * version=api_version, - * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - * ) - * - * request = supportApiService.supportEventSubscriptions().expunge( - * name="organizations/123456789/supportEventSubscriptions/abcdef123456" - * ) - * print(request.execute()) - * ``` - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::expungeSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php - * - * @param ExpungeSupportEventSubscriptionRequest $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. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function expungeSupportEventSubscription(ExpungeSupportEventSubscriptionRequest $request, array $callOptions = []): void - { - $this->startApiCall('ExpungeSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Gets a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::getSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php - * - * @param GetSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSupportEventSubscription(GetSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('GetSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Lists support event subscriptions for an organization. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::listSupportEventSubscriptionsAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php - * - * @param ListSupportEventSubscriptionsRequest $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 listSupportEventSubscriptions(ListSupportEventSubscriptionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSupportEventSubscriptions', $request, $callOptions); - } - - /** - * Undeletes a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::undeleteSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php - * - * @param UndeleteSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - */ - public function undeleteSupportEventSubscription(UndeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('UndeleteSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Updates a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::updateSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php - * - * @param UpdateSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSupportEventSubscription(UpdateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('UpdateSupportEventSubscription', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json deleted file mode 100644 index a1a0b226e030..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.support.v2", - "libraryPackage": "Google\\Cloud\\Support\\V2", - "services": { - "CaseAttachmentService": { - "clients": { - "grpc": { - "libraryClient": "CaseAttachmentServiceGapicClient", - "rpcs": { - "GetAttachment": { - "methods": [ - "getAttachment" - ] - }, - "ListAttachments": { - "methods": [ - "listAttachments" - ] - } - } - } - } - }, - "CaseService": { - "clients": { - "grpc": { - "libraryClient": "CaseServiceGapicClient", - "rpcs": { - "CloseCase": { - "methods": [ - "closeCase" - ] - }, - "CreateCase": { - "methods": [ - "createCase" - ] - }, - "EscalateCase": { - "methods": [ - "escalateCase" - ] - }, - "GetCase": { - "methods": [ - "getCase" - ] - }, - "ListCases": { - "methods": [ - "listCases" - ] - }, - "SearchCaseClassifications": { - "methods": [ - "searchCaseClassifications" - ] - }, - "SearchCases": { - "methods": [ - "searchCases" - ] - }, - "UpdateCase": { - "methods": [ - "updateCase" - ] - } - } - } - } - }, - "CommentService": { - "clients": { - "grpc": { - "libraryClient": "CommentServiceGapicClient", - "rpcs": { - "CreateComment": { - "methods": [ - "createComment" - ] - }, - "GetComment": { - "methods": [ - "getComment" - ] - }, - "ListComments": { - "methods": [ - "listComments" - ] - } - } - } - } - }, - "SupportEventSubscriptionService": { - "clients": { - "grpc": { - "libraryClient": "SupportEventSubscriptionServiceGapicClient", - "rpcs": { - "CreateSupportEventSubscription": { - "methods": [ - "createSupportEventSubscription" - ] - }, - "DeleteSupportEventSubscription": { - "methods": [ - "deleteSupportEventSubscription" - ] - }, - "ExpungeSupportEventSubscription": { - "methods": [ - "expungeSupportEventSubscription" - ] - }, - "GetSupportEventSubscription": { - "methods": [ - "getSupportEventSubscription" - ] - }, - "ListSupportEventSubscriptions": { - "methods": [ - "listSupportEventSubscriptions" - ] - }, - "UndeleteSupportEventSubscription": { - "methods": [ - "undeleteSupportEventSubscription" - ] - }, - "UpdateSupportEventSubscription": { - "methods": [ - "updateSupportEventSubscription" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json deleted file mode 100644 index 86644d843261..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2.CaseAttachmentService": { - "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": { - "GetAttachment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListAttachments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php deleted file mode 100644 index d09c50e12e40..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php +++ /dev/null @@ -1,68 +0,0 @@ - [ - 'google.cloud.support.v2.CaseAttachmentService' => [ - 'GetAttachment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\Attachment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAttachments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAttachments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\ListAttachmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'attachment' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', - 'case' => 'organizations/{organization}/cases/{case}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'organizationCaseAttachmentId' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', - 'projectCase' => 'projects/{project}/cases/{case}', - 'projectCaseAttachmentId' => 'projects/{project}/cases/{case}/attachments/{attachment_id}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php deleted file mode 100644 index e0337097818c..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php +++ /dev/null @@ -1,57 +0,0 @@ - [ - 'google.cloud.support.v2.CaseAttachmentService' => [ - 'GetAttachment' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/cases/*/attachments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAttachments' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/attachments', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/attachments', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json deleted file mode 100644 index 7fff474416b4..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2.CaseService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CloseCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "EscalateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetCase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchCaseClassifications": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php deleted file mode 100644 index 51f3317d6a1c..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php +++ /dev/null @@ -1,148 +0,0 @@ - [ - 'google.cloud.support.v2.CaseService' => [ - 'CloseCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'EscalateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCases', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\ListCasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SearchCaseClassifications' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCaseClassifications', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SearchCaseClassificationsResponse', - ], - 'SearchCases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCases', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SearchCasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'case.name', - 'fieldAccessors' => [ - 'getCase', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'organization' => 'organizations/{organization}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'project' => 'projects/{project}', - 'projectCase' => 'projects/{project}/cases/{case}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php deleted file mode 100644 index f9f9374d9247..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php +++ /dev/null @@ -1,161 +0,0 @@ - [ - 'google.cloud.support.v2.CaseService' => [ - 'CloseCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/cases/*}:close', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/cases/*}:close', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/cases', - 'body' => 'case', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*}/cases', - 'body' => 'case', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'EscalateCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/cases/*}:escalate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/cases/*}:escalate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCase' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/cases/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/cases/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCases' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/cases', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/cases', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SearchCaseClassifications' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/caseClassifications:search', - ], - 'SearchCases' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/cases:search', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/cases:search', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCase' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{case.name=projects/*/cases/*}', - 'body' => 'case', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{case.name=organizations/*/cases/*}', - 'body' => 'case', - ], - ], - 'placeholders' => [ - 'case.name' => [ - 'getters' => [ - 'getCase', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json deleted file mode 100644 index 8dba9a653701..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2.CommentService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListComments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php deleted file mode 100644 index 1157c2b2f18c..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php +++ /dev/null @@ -1,80 +0,0 @@ - [ - 'google.cloud.support.v2.CommentService' => [ - 'CreateComment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\Comment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetComment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\Comment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListComments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getComments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\ListCommentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'comment' => 'organizations/{organization}/cases/{case}/comments/{comment}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'organizationCaseComment' => 'organizations/{organization}/cases/{case}/comments/{comment}', - 'projectCase' => 'projects/{project}/cases/{case}', - 'projectCaseComment' => 'projects/{project}/cases/{case}/comments/{comment}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php deleted file mode 100644 index 80f01b235112..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php +++ /dev/null @@ -1,76 +0,0 @@ - [ - 'google.cloud.support.v2.CommentService' => [ - 'CreateComment' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/comments', - 'body' => 'comment', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/comments', - 'body' => 'comment', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetComment' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/cases/*/comments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListComments' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/comments', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/comments', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json deleted file mode 100644 index 207f6e81330a..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2.SupportEventSubscriptionService": { - "retry_codes": { - "no_retry_codes": [] - }, - "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 - } - }, - "methods": { - "CreateSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ExpungeSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListSupportEventSubscriptions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UndeleteSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php deleted file mode 100644 index 8524c72bce3c..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php +++ /dev/null @@ -1,125 +0,0 @@ - [ - 'google.cloud.support.v2.SupportEventSubscriptionService' => [ - 'CreateSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExpungeSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListSupportEventSubscriptions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSupportEventSubscriptions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\ListSupportEventSubscriptionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UndeleteSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'support_event_subscription.name', - 'fieldAccessors' => [ - 'getSupportEventSubscription', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'organization' => 'organizations/{organization}', - 'supportEventSubscription' => 'organizations/{organization}/supportEventSubscriptions/{support_event_subscription}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php deleted file mode 100644 index d47c677179a1..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php +++ /dev/null @@ -1,111 +0,0 @@ - [ - 'google.cloud.support.v2.SupportEventSubscriptionService' => [ - 'CreateSupportEventSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*}/supportEventSubscriptions', - 'body' => 'support_event_subscription', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSupportEventSubscription' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExpungeSupportEventSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}:expunge', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSupportEventSubscription' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSupportEventSubscriptions' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/supportEventSubscriptions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UndeleteSupportEventSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}:undelete', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSupportEventSubscription' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}', - 'body' => 'support_event_subscription', - 'placeholders' => [ - 'support_event_subscription.name' => [ - 'getters' => [ - 'getSupportEventSubscription', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php deleted file mode 100644 index 601ac8d587e1..000000000000 --- a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php +++ /dev/null @@ -1,241 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CaseAttachmentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CaseAttachmentServiceClient($options); - } - - /** @test */ - public function getAttachmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $filename = 'filename-734768633'; - $mimeType = 'mimeType-196041627'; - $sizeBytes = 1796325715; - $expectedResponse = new Attachment(); - $expectedResponse->setName($name2); - $expectedResponse->setFilename($filename); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); - $request = (new GetAttachmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttachment($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.support.v2.CaseAttachmentService/GetAttachment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachmentExceptionTest() - { - $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->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); - $request = (new GetAttachmentRequest()) - ->setName($formattedName); - try { - $gapicClient->getAttachment($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 listAttachmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $attachmentsElement = new Attachment(); - $attachments = [ - $attachmentsElement, - ]; - $expectedResponse = new ListAttachmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAttachments($attachments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListAttachmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAttachments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAttachments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseAttachmentService/ListAttachments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAttachmentsExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListAttachmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAttachments($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 getAttachmentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $filename = 'filename-734768633'; - $mimeType = 'mimeType-196041627'; - $sizeBytes = 1796325715; - $expectedResponse = new Attachment(); - $expectedResponse->setName($name2); - $expectedResponse->setFilename($filename); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); - $request = (new GetAttachmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttachmentAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseAttachmentService/GetAttachment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php deleted file mode 100644 index e3977a3af5ad..000000000000 --- a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php +++ /dev/null @@ -1,712 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CaseServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CaseServiceClient($options); - } - - /** @test */ - public function closeCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->closeCase($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.support.v2.CaseService/CloseCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function closeCaseExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->closeCase($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 createCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $case = new PBCase(); - $request = (new CreateCaseRequest()) - ->setParent($formattedParent) - ->setCase($case); - $response = $gapicClient->createCase($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.support.v2.CaseService/CreateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCase(); - $this->assertProtobufEquals($case, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCaseExceptionTest() - { - $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->projectName('[PROJECT]'); - $case = new PBCase(); - $request = (new CreateCaseRequest()) - ->setParent($formattedParent) - ->setCase($case); - try { - $gapicClient->createCase($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 escalateCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new EscalateCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->escalateCase($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.support.v2.CaseService/EscalateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function escalateCaseExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new EscalateCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->escalateCase($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 getCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new GetCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->getCase($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.support.v2.CaseService/GetCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCaseExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new GetCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->getCase($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 listCasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $casesElement = new PBCase(); - $cases = [ - $casesElement, - ]; - $expectedResponse = new ListCasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCases($cases); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListCasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCases($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseService/ListCases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCasesExceptionTest() - { - $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->projectName('[PROJECT]'); - $request = (new ListCasesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCases($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 searchCaseClassificationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $caseClassificationsElement = new CaseClassification(); - $caseClassifications = [ - $caseClassificationsElement, - ]; - $expectedResponse = new SearchCaseClassificationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCaseClassifications($caseClassifications); - $transport->addResponse($expectedResponse); - $request = new SearchCaseClassificationsRequest(); - $response = $gapicClient->searchCaseClassifications($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCaseClassifications()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseService/SearchCaseClassifications', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCaseClassificationsExceptionTest() - { - $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 SearchCaseClassificationsRequest(); - try { - $gapicClient->searchCaseClassifications($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 searchCasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $casesElement = new PBCase(); - $cases = [ - $casesElement, - ]; - $expectedResponse = new SearchCasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCases($cases); - $transport->addResponse($expectedResponse); - $request = new SearchCasesRequest(); - $response = $gapicClient->searchCases($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseService/SearchCases', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCasesExceptionTest() - { - $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 SearchCasesRequest(); - try { - $gapicClient->searchCases($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 updateCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $case = new PBCase(); - $request = (new UpdateCaseRequest()) - ->setCase($case); - $response = $gapicClient->updateCase($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.support.v2.CaseService/UpdateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getCase(); - $this->assertProtobufEquals($case, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCaseExceptionTest() - { - $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 - $case = new PBCase(); - $request = (new UpdateCaseRequest()) - ->setCase($case); - try { - $gapicClient->updateCase($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 closeCaseAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->closeCaseAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseService/CloseCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php deleted file mode 100644 index 0982658b529d..000000000000 --- a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php +++ /dev/null @@ -1,316 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CommentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CommentServiceClient($options); - } - - /** @test */ - public function createCommentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - $response = $gapicClient->createComment($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.support.v2.CommentService/CreateComment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getComment(); - $this->assertProtobufEquals($comment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCommentExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - try { - $gapicClient->createComment($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 getCommentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name2); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); - $request = (new GetCommentRequest()) - ->setName($formattedName); - $response = $gapicClient->getComment($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.support.v2.CommentService/GetComment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCommentExceptionTest() - { - $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->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); - $request = (new GetCommentRequest()) - ->setName($formattedName); - try { - $gapicClient->getComment($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 listCommentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $commentsElement = new Comment(); - $comments = [ - $commentsElement, - ]; - $expectedResponse = new ListCommentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setComments($comments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListCommentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listComments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getComments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CommentService/ListComments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCommentsExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListCommentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listComments($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 createCommentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - $response = $gapicClient->createCommentAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CommentService/CreateComment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getComment(); - $this->assertProtobufEquals($comment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php deleted file mode 100644 index 90d1f77613e5..000000000000 --- a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php +++ /dev/null @@ -1,584 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SupportEventSubscriptionServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SupportEventSubscriptionServiceClient($options); - } - - /** @test */ - public function createSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - $response = $gapicClient->createSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSupportEventSubscription(); - $this->assertProtobufEquals($supportEventSubscription, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSupportEventSubscriptionExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - try { - $gapicClient->createSupportEventSubscription($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 deleteSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name2); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new DeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/DeleteSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new DeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSupportEventSubscription($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 expungeSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new ExpungeSupportEventSubscriptionRequest()) - ->setName($formattedName); - $gapicClient->expungeSupportEventSubscription($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.SupportEventSubscriptionService/ExpungeSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function expungeSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new ExpungeSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->expungeSupportEventSubscription($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 getSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name2); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new GetSupportEventSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->getSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/GetSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new GetSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->getSupportEventSubscription($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 listSupportEventSubscriptionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $supportEventSubscriptionsElement = new SupportEventSubscription(); - $supportEventSubscriptions = [ - $supportEventSubscriptionsElement, - ]; - $expectedResponse = new ListSupportEventSubscriptionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSupportEventSubscriptions($supportEventSubscriptions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $request = (new ListSupportEventSubscriptionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSupportEventSubscriptions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSupportEventSubscriptions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.SupportEventSubscriptionService/ListSupportEventSubscriptions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSupportEventSubscriptionsExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $request = (new ListSupportEventSubscriptionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSupportEventSubscriptions($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 undeleteSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name2); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new UndeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->undeleteSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/UndeleteSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function undeleteSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new UndeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->undeleteSupportEventSubscription($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 updateSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new UpdateSupportEventSubscriptionRequest()) - ->setSupportEventSubscription($supportEventSubscription); - $response = $gapicClient->updateSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/UpdateSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getSupportEventSubscription(); - $this->assertProtobufEquals($supportEventSubscription, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSupportEventSubscriptionExceptionTest() - { - $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 - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new UpdateSupportEventSubscriptionRequest()) - ->setSupportEventSubscription($supportEventSubscription); - try { - $gapicClient->updateSupportEventSubscription($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 createSupportEventSubscriptionAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - $response = $gapicClient->createSupportEventSubscriptionAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSupportEventSubscription(); - $this->assertProtobufEquals($supportEventSubscription, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php deleted file mode 100644 index 1aa4b2dcd381..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xFE\x02\x0A'google/cloud/support/v2beta/actor.proto\x12\x1Bgoogle.cloud.support.v2beta\"d\x0A\x05Actor\x12\x14\x0A\x0Cdisplay_name\x18\x01 \x01(\x09\x12\x11\x0A\x05email\x18\x02 \x01(\x09B\x02\x18\x01\x12\x1B\x0A\x0Egoogle_support\x18\x04 \x01(\x08B\x03\xE0A\x03\x12\x15\x0A\x08username\x18\x05 \x01(\x09B\x03\xE0A\x03B\xC7\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0AActorProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php deleted file mode 100644 index 4a62f7824389..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x92\x06\x0A,google/cloud/support/v2beta/attachment.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x88\x03\x0A\x0AAttachment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x128\x0A\x07creator\x18\x03 \x01(\x0B2\".google.cloud.support.v2beta.ActorB\x03\xE0A\x03\x12\x10\x0A\x08filename\x18\x04 \x01(\x09\x12\x16\x0A\x09mime_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Asize_bytes\x18\x06 \x01(\x03B\x03\xE0A\x03:\xB0\x01\xEAA\xAC\x01\x0A&cloudsupport.googleapis.com/Attachment\x12Eorganizations/{organization}/cases/{case}/attachments/{attachment_id}\x12;projects/{project}/cases/{case}/attachments/{attachment_id}B\xCC\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0FAttachmentProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php deleted file mode 100644 index 4ff8c684ca06..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x82\x0A\x0A4google/cloud/support/v2beta/attachment_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/support/v2beta/attachment.proto\"y\x0A\x16ListAttachmentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"T\x0A\x14GetAttachmentRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&cloudsupport.googleapis.com/Attachment\"p\x0A\x17ListAttachmentsResponse\x12<\x0A\x0Battachments\x18\x01 \x03(\x0B2'.google.cloud.support.v2beta.Attachment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\x88\x04\x0A\x15CaseAttachmentService\x12\xF6\x01\x0A\x0FListAttachments\x123.google.cloud.support.v2beta.ListAttachmentsRequest\x1A4.google.cloud.support.v2beta.ListAttachmentsResponse\"x\xDAA\x06parent\x82\xD3\xE4\x93\x02i\x12//v2beta/{parent=projects/*/cases/*}/attachmentsZ6\x124/v2beta/{parent=organizations/*/cases/*}/attachments\x12\xA4\x01\x0A\x0DGetAttachment\x121.google.cloud.support.v2beta.GetAttachmentRequest\x1A'.google.cloud.support.v2beta.Attachment\"7\xDAA\x04name\x82\xD3\xE4\x93\x02*\x12(/v2beta/{name=*/*/cases/*/attachments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xD3\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x16AttachmentServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php deleted file mode 100644 index d96b709d8545..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x84\x1C\x0A.google/cloud/support/v2beta/case_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A&google/cloud/support/v2beta/case.proto\x1A,google/cloud/support/v2beta/escalation.proto\x1A google/protobuf/field_mask.proto\"H\x0A\x0EGetCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"\x83\x01\x0A\x11CreateCaseRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x124\x0A\x04case\x18\x02 \x01(\x0B2!.google.cloud.support.v2beta.CaseB\x03\xE0A\x02\"\xD9\x01\x0A\x10ListCasesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\x12C\x0A\x0Cproduct_line\x18\x08 \x01(\x0E2(.google.cloud.support.v2beta.ProductLineH\x00\x88\x01\x01B\x0F\x0A\x0D_product_line\"^\x0A\x11ListCasesResponse\x120\x0A\x05cases\x18\x01 \x03(\x0B2!.google.cloud.support.v2beta.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"Z\x0A\x12SearchCasesRequest\x12\x0E\x0A\x06parent\x18\x04 \x01(\x09\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"`\x0A\x13SearchCasesResponse\x120\x0A\x05cases\x18\x01 \x03(\x0B2!.google.cloud.support.v2beta.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x8A\x01\x0A\x13EscalateCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12;\x0A\x0Aescalation\x18\x02 \x01(\x0B2'.google.cloud.support.v2beta.Escalation\"z\x0A\x11UpdateCaseRequest\x124\x0A\x04case\x18\x01 \x01(\x0B2!.google.cloud.support.v2beta.CaseB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"J\x0A\x10CloseCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"\x94\x01\x0A SearchCaseClassificationsRequest\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12:\x0A\x07product\x18\x07 \x01(\x0B2\$.google.cloud.support.v2beta.ProductB\x03\xE0A\x01\"\x8B\x01\x0A!SearchCaseClassificationsResponse\x12M\x0A\x14case_classifications\x18\x01 \x03(\x0B2/.google.cloud.support.v2beta.CaseClassification\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xCB\x0D\x0A\x0BCaseService\x12\xB5\x01\x0A\x07GetCase\x12+.google.cloud.support.v2beta.GetCaseRequest\x1A!.google.cloud.support.v2beta.Case\"Z\xDAA\x04name\x82\xD3\xE4\x93\x02M\x12!/v2beta/{name=projects/*/cases/*}Z(\x12&/v2beta/{name=organizations/*/cases/*}\x12\xC8\x01\x0A\x09ListCases\x12-.google.cloud.support.v2beta.ListCasesRequest\x1A..google.cloud.support.v2beta.ListCasesResponse\"\\\xDAA\x06parent\x82\xD3\xE4\x93\x02M\x12!/v2beta/{parent=projects/*}/casesZ(\x12&/v2beta/{parent=organizations/*}/cases\x12\xD3\x01\x0A\x0BSearchCases\x12/.google.cloud.support.v2beta.SearchCasesRequest\x1A0.google.cloud.support.v2beta.SearchCasesResponse\"a\x82\xD3\xE4\x93\x02[\x12(/v2beta/{parent=projects/*}/cases:searchZ/\x12-/v2beta/{parent=organizations/*}/cases:search\x12\xCE\x01\x0A\x0ACreateCase\x12..google.cloud.support.v2beta.CreateCaseRequest\x1A!.google.cloud.support.v2beta.Case\"m\xDAA\x0Bparent,case\x82\xD3\xE4\x93\x02Y\"!/v2beta/{parent=projects/*}/cases:\x04caseZ.\"&/v2beta/{parent=organizations/*}/cases:\x04case\x12\xDD\x01\x0A\x0AUpdateCase\x12..google.cloud.support.v2beta.UpdateCaseRequest\x1A!.google.cloud.support.v2beta.Case\"|\xDAA\x10case,update_mask\x82\xD3\xE4\x93\x02c2&/v2beta/{case.name=projects/*/cases/*}:\x04caseZ32+/v2beta/{case.name=organizations/*/cases/*}:\x04case\x12\xD0\x01\x0A\x0CEscalateCase\x120.google.cloud.support.v2beta.EscalateCaseRequest\x1A!.google.cloud.support.v2beta.Case\"k\x82\xD3\xE4\x93\x02e\"*/v2beta/{name=projects/*/cases/*}:escalate:\x01*Z4\"//v2beta/{name=organizations/*/cases/*}:escalate:\x01*\x12\xC4\x01\x0A\x09CloseCase\x12-.google.cloud.support.v2beta.CloseCaseRequest\x1A!.google.cloud.support.v2beta.Case\"e\x82\xD3\xE4\x93\x02_\"'/v2beta/{name=projects/*/cases/*}:close:\x01*Z1\",/v2beta/{name=organizations/*/cases/*}:close:\x01*\x12\xC6\x01\x0A\x19SearchCaseClassifications\x12=.google.cloud.support.v2beta.SearchCaseClassificationsRequest\x1A>.google.cloud.support.v2beta.SearchCaseClassificationsResponse\"*\x82\xD3\xE4\x93\x02\$\x12\"/v2beta/caseClassifications:search\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x10CaseServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php deleted file mode 100644 index 04bdbfb5d675..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xDF\x05\x0A)google/cloud/support/v2beta/comment.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDB\x02\x0A\x07Comment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x128\x0A\x07creator\x18\x03 \x01(\x0B2\".google.cloud.support.v2beta.ActorB\x03\xE0A\x03\x12\x0C\x0A\x04body\x18\x04 \x01(\x09\x12\x1E\x0A\x0Fplain_text_body\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03:\x9B\x01\xEAA\x97\x01\x0A#cloudsupport.googleapis.com/Comment\x12internalAddGeneratedFile( - "\x0A\xCE\x0C\x0A1google/cloud/support/v2beta/comment_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/support/v2beta/comment.proto\"v\x0A\x13ListCommentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\"g\x0A\x14ListCommentsResponse\x126\x0A\x08comments\x18\x01 \x03(\x0B2\$.google.cloud.support.v2beta.Comment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x8C\x01\x0A\x14CreateCommentRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12:\x0A\x07comment\x18\x02 \x01(\x0B2\$.google.cloud.support.v2beta.CommentB\x03\xE0A\x02\"N\x0A\x11GetCommentRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#cloudsupport.googleapis.com/Comment2\xE0\x05\x0A\x0ECommentService\x12\xE7\x01\x0A\x0CListComments\x120.google.cloud.support.v2beta.ListCommentsRequest\x1A1.google.cloud.support.v2beta.ListCommentsResponse\"r\xDAA\x06parent\x82\xD3\xE4\x93\x02c\x12,/v2beta/{parent=projects/*/cases/*}/commentsZ3\x121/v2beta/{parent=organizations/*/cases/*}/comments\x12\xF7\x01\x0A\x0DCreateComment\x121.google.cloud.support.v2beta.CreateCommentRequest\x1A\$.google.cloud.support.v2beta.Comment\"\x8C\x01\xDAA\x0Eparent,comment\x82\xD3\xE4\x93\x02u\",/v2beta/{parent=projects/*/cases/*}/comments:\x07commentZ<\"1/v2beta/{parent=organizations/*/cases/*}/comments:\x07comment\x12\x98\x01\x0A\x0AGetComment\x12..google.cloud.support.v2beta.GetCommentRequest\x1A\$.google.cloud.support.v2beta.Comment\"4\xDAA\x04name\x82\xD3\xE4\x93\x02'\x12%/v2beta/{name=*/*/cases/*/comments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xD0\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x13CommentServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php deleted file mode 100644 index 9732640975d1..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBF\x02\x0A)google/cloud/support/v2beta/content.proto\x12\x1Bgoogle.cloud.support.v2beta\"!\x0A\x0BTextContent\x12\x12\x0A\x0Aplain_text\x18\x01 \x01(\x09B\xC9\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0CContentProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php deleted file mode 100644 index 532f5c66b638..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC3\x07\x0A/google/cloud/support/v2beta/email_message.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A)google/cloud/support/v2beta/content.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x89\x04\x0A\x0CEmailMessage\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\x126\x0A\x05actor\x18\x03 \x01(\x0B2\".google.cloud.support.v2beta.ActorB\x03\xE0A\x03\x12\x14\x0A\x07subject\x18\x04 \x01(\x09B\x03\xE0A\x03\x12&\x0A\x19recipient_email_addresses\x18\x05 \x03(\x09B\x03\xE0A\x03\x12\x1F\x0A\x12cc_email_addresses\x18\x06 \x03(\x09B\x03\xE0A\x03\x12C\x0A\x0Cbody_content\x18\x08 \x01(\x0B2(.google.cloud.support.v2beta.TextContentB\x03\xE0A\x03:\xD3\x01\xEAA\xCF\x01\x0A(cloudsupport.googleapis.com/EmailMessage\x12=projects/{project}/cases/{case}/emailMessages/{email_message}\x12Gorganizations/{organization}/cases/{case}/emailMessages/{email_message}*\x0DemailMessages2\x0CemailMessageB\xCE\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x11EmailMessageProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php deleted file mode 100644 index 4f02ac33a05a..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xF7\x03\x0A,google/cloud/support/v2beta/escalation.proto\x12\x1Bgoogle.cloud.support.v2beta\"\xD2\x01\x0A\x0AEscalation\x12C\x0A\x06reason\x18\x04 \x01(\x0E2..google.cloud.support.v2beta.Escalation.ReasonB\x03\xE0A\x02\x12\x1A\x0A\x0Djustification\x18\x05 \x01(\x09B\x03\xE0A\x02\"c\x0A\x06Reason\x12\x16\x0A\x12REASON_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FRESOLUTION_TIME\x10\x01\x12\x17\x0A\x13TECHNICAL_EXPERTISE\x10\x02\x12\x13\x0A\x0FBUSINESS_IMPACT\x10\x03B\xCC\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0FEscalationProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php deleted file mode 100644 index ba6174c9de88..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xB3\x06\x0A+google/cloud/support/v2beta/feed_item.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A,google/cloud/support/v2beta/attachment.proto\x1A)google/cloud/support/v2beta/comment.proto\x1A/google/cloud/support/v2beta/email_message.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE6\x02\x0A\x08FeedItem\x12<\x0A\x07comment\x18d \x01(\x0B2\$.google.cloud.support.v2beta.CommentB\x03\xE0A\x03H\x00\x12B\x0A\x0Aattachment\x18e \x01(\x0B2'.google.cloud.support.v2beta.AttachmentB\x03\xE0A\x03H\x00\x12G\x0A\x0Demail_message\x18f \x01(\x0B2).google.cloud.support.v2beta.EmailMessageB\x03\xE0A\x03H\x00\x12J\x0A\x12deleted_attachment\x18g \x01(\x0B2'.google.cloud.support.v2beta.AttachmentB\x03\xE0A\x03H\x00\x123\x0A\x0Aevent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03B\x0E\x0A\x0Cevent_objectB\xCA\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0DFeedItemProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php deleted file mode 100644 index c8ed909c6857..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xE4\x07\x0A.google/cloud/support/v2beta/feed_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A+google/cloud/support/v2beta/feed_item.proto\"\x93\x01\x0A\x0FShowFeedRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x15\x0A\x08order_by\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x04 \x01(\x09B\x03\xE0A\x01\"f\x0A\x10ShowFeedResponse\x129\x0A\x0Afeed_items\x18\x01 \x03(\x0B2%.google.cloud.support.v2beta.FeedItem\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xBC\x02\x0A\x0BFeedService\x12\xDB\x01\x0A\x08ShowFeed\x12,.google.cloud.support.v2beta.ShowFeedRequest\x1A-.google.cloud.support.v2beta.ShowFeedResponse\"r\xDAA\x06parent\x82\xD3\xE4\x93\x02c\x12,/v2beta/{parent=projects/*/cases/*}:showFeedZ3\x121/v2beta/{parent=organizations/*/cases/*}:showFeed\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x10FeedServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php deleted file mode 100644 index a56bd0b1fbf4..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xFE\x0B\x0A&google/cloud/support/v2beta/case.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xF6\x06\x0A\x04Case\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x12G\x0A\x0Eclassification\x18\x04 \x01(\x0B2/.google.cloud.support.v2beta.CaseClassification\x12\x11\x0A\x09time_zone\x18\x08 \x01(\x09\x12\"\x0A\x1Asubscriber_email_addresses\x18\x09 \x03(\x09\x12;\x0A\x05state\x18\x0C \x01(\x0E2'.google.cloud.support.v2beta.Case.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x0D \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0E \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x123\x0A\x07creator\x18\x0F \x01(\x0B2\".google.cloud.support.v2beta.Actor\x12\x15\x0A\x0Dcontact_email\x18# \x01(\x09\x12\x11\x0A\x09escalated\x18\x11 \x01(\x08\x12\x11\x0A\x09test_case\x18\x13 \x01(\x08\x12\x15\x0A\x0Dlanguage_code\x18\x17 \x01(\x09\x12<\x0A\x08priority\x18 \x01(\x0E2*.google.cloud.support.v2beta.Case.Priority\"\x7F\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03NEW\x10\x01\x12\x1E\x0A\x1AIN_PROGRESS_GOOGLE_SUPPORT\x10\x02\x12\x13\x0A\x0FACTION_REQUIRED\x10\x03\x12\x15\x0A\x11SOLUTION_PROVIDED\x10\x04\x12\x0A\x0A\x06CLOSED\x10\x05\"L\x0A\x08Priority\x12\x18\x0A\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02P0\x10\x01\x12\x06\x0A\x02P1\x10\x02\x12\x06\x0A\x02P2\x10\x03\x12\x06\x0A\x02P3\x10\x04\x12\x06\x0A\x02P4\x10\x05:q\xEAAn\x0A cloudsupport.googleapis.com/Case\x12)organizations/{organization}/cases/{case}\x12\x1Fprojects/{project}/cases/{case}\"m\x0A\x12CaseClassification\x12\x0A\x0A\x02id\x18\x03 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x04 \x01(\x09\x125\x0A\x07product\x18\x0A \x01(\x0B2\$.google.cloud.support.v2beta.Product\"I\x0A\x07Product\x12>\x0A\x0Cproduct_line\x18\x01 \x01(\x0E2(.google.cloud.support.v2beta.ProductLine*N\x0A\x0BProductLine\x12\x1C\x0A\x18PRODUCT_LINE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CGOOGLE_CLOUD\x10\x01\x12\x0F\x0A\x0BGOOGLE_MAPS\x10\x02B\xC6\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x09CaseProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php deleted file mode 100644 index 998bb4bd4afc..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC8\x09\x0AinternalAddGeneratedFile( - "\x0A\xB7\x19\x0ADgoogle/cloud/support/v2beta/support_event_subscription_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1Agoogle.cloud.support.v2beta.Actor - */ -class Actor extends \Google\Protobuf\Internal\Message -{ - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * - * Generated from protobuf field string email = 2 [deprecated = true]; - * @deprecated - */ - protected $email = ''; - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_support = false; - /** - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * - * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $username = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * @type string $email - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * @type bool $google_support - * Output only. Whether the actor is a Google support actor. - * @type string $username - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\Actor::initOnce(); - parent::__construct($data); - } - - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * - * Generated from protobuf field string email = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getEmail() - { - if ($this->email !== '') { - @trigger_error('email is deprecated.', E_USER_DEPRECATED); - } - return $this->email; - } - - /** - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * - * Generated from protobuf field string email = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEmail($var) - { - @trigger_error('email is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getGoogleSupport() - { - return $this->google_support; - } - - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setGoogleSupport($var) - { - GPBUtil::checkBool($var); - $this->google_support = $var; - - return $this; - } - - /** - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * - * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * - * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php deleted file mode 100644 index 59369f69aad9..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.support.v2beta.Attachment - */ -class Attachment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The time at which the attachment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = null; - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - */ - protected $filename = ''; - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $mime_type = ''; - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. The resource name of the attachment. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the attachment was created. - * @type \Google\Cloud\Support\V2beta\Actor $creator - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * @type string $filename - * The filename of the attachment (e.g. `"graph.jpg"`). - * @type string $mime_type - * Output only. The MIME type of the attachment (e.g. text/plain). - * @type int|string $size_bytes - * Output only. The size of the attachment in bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\Attachment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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. The time at which the attachment was created. - * - * 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. The time at which the attachment was created. - * - * 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. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - * @return string - */ - public function getFilename() - { - return $this->filename; - } - - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - * @param string $var - * @return $this - */ - public function setFilename($var) - { - GPBUtil::checkString($var, True); - $this->filename = $var; - - return $this; - } - - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php deleted file mode 100644 index 804aaa392f49..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.support.v2beta.CaseClassification - */ -class CaseClassification extends \Google\Protobuf\Internal\Message -{ - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * - * Generated from protobuf field string id = 3; - */ - protected $id = ''; - /** - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - /** - * The full product the classification corresponds to. - * - * Generated from protobuf field .google.cloud.support.v2beta.Product product = 10; - */ - protected $product = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * @type string $display_name - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * @type \Google\Cloud\Support\V2beta\Product $product - * The full product the classification corresponds to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\PBCase::initOnce(); - parent::__construct($data); - } - - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * - * Generated from protobuf field string id = 3; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * - * Generated from protobuf field string id = 3; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The full product the classification corresponds to. - * - * Generated from protobuf field .google.cloud.support.v2beta.Product product = 10; - * @return \Google\Cloud\Support\V2beta\Product|null - */ - public function getProduct() - { - return $this->product; - } - - public function hasProduct() - { - return isset($this->product); - } - - public function clearProduct() - { - unset($this->product); - } - - /** - * The full product the classification corresponds to. - * - * Generated from protobuf field .google.cloud.support.v2beta.Product product = 10; - * @param \Google\Cloud\Support\V2beta\Product $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Product::class); - $this->product = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php deleted file mode 100644 index 09abfd6689fb..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.support.v2beta.CloseCaseRequest - */ -class CloseCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case to close. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the case to close. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case to close. - * - * 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 name of the case to close. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php deleted file mode 100644 index 12b50d25f5a2..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.support.v2beta.Comment - */ -class Comment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. The resource name of the comment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The time when the comment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The user or Google Support agent who created the comment. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = null; - /** - * The full comment body. - * Maximum of 12800 characters. - * - * Generated from protobuf field string body = 4; - */ - protected $body = ''; - /** - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * - * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - protected $plain_text_body = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. The resource name of the comment. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the comment was created. - * @type \Google\Cloud\Support\V2beta\Actor $creator - * Output only. The user or Google Support agent who created the comment. - * @type string $body - * The full comment body. - * Maximum of 12800 characters. - * @type string $plain_text_body - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\Comment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. The resource name of the comment. - * - * 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. The resource name of the comment. - * - * 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; - } - - /** - * Output only. The time when the comment was created. - * - * 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. The time when the comment was created. - * - * 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. The user or Google Support agent who created the comment. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * Output only. The user or Google Support agent who created the comment. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * The full comment body. - * Maximum of 12800 characters. - * - * Generated from protobuf field string body = 4; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * The full comment body. - * Maximum of 12800 characters. - * - * Generated from protobuf field string body = 4; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - - /** - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * - * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - * @deprecated - */ - public function getPlainTextBody() - { - if ($this->plain_text_body !== '') { - @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); - } - return $this->plain_text_body; - } - - /** - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * - * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - * @deprecated - */ - public function setPlainTextBody($var) - { - @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->plain_text_body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php deleted file mode 100644 index 3e6af8730079..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.support.v2beta.CreateCaseRequest - */ -class CreateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent under which the case should be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The case to be created. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $case = null; - - /** - * @param string $parent Required. The name of the parent under which the case should be created. Please see - * {@see CaseServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\Support\V2beta\PBCase $case Required. The case to be created. - * - * @return \Google\Cloud\Support\V2beta\CreateCaseRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2beta\PBCase $case): self - { - return (new self()) - ->setParent($parent) - ->setCase($case); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent under which the case should be created. - * @type \Google\Cloud\Support\V2beta\PBCase $case - * Required. The case to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent under which the case should be created. - * - * 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 name of the parent under which the case should be created. - * - * 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 case to be created. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2beta\PBCase|null - */ - public function getCase() - { - return $this->case; - } - - public function hasCase() - { - return isset($this->case); - } - - public function clearCase() - { - unset($this->case); - } - - /** - * Required. The case to be created. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2beta\PBCase $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\PBCase::class); - $this->case = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php deleted file mode 100644 index 73722d599bcd..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.support.v2beta.CreateCommentRequest - */ -class CreateCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case to which the comment should be added. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The comment to be added. - * - * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $comment = null; - - /** - * @param string $parent Required. The name of the case to which the comment should be added. Please see - * {@see CommentServiceClient::caseName()} for help formatting this field. - * @param \Google\Cloud\Support\V2beta\Comment $comment Required. The comment to be added. - * - * @return \Google\Cloud\Support\V2beta\CreateCommentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2beta\Comment $comment): self - { - return (new self()) - ->setParent($parent) - ->setComment($comment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the case to which the comment should be added. - * @type \Google\Cloud\Support\V2beta\Comment $comment - * Required. The comment to be added. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case to which the comment should be added. - * - * 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 name of the case to which the comment should be added. - * - * 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 comment to be added. - * - * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2beta\Comment|null - */ - public function getComment() - { - return $this->comment; - } - - public function hasComment() - { - return isset($this->comment); - } - - public function clearComment() - { - unset($this->comment); - } - - /** - * Required. The comment to be added. - * - * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2beta\Comment $var - * @return $this - */ - public function setComment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Comment::class); - $this->comment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php deleted file mode 100644 index 406c06c8dd58..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.support.v2beta.CreateSupportEventSubscriptionRequest - */ -class CreateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Pub/Sub configuration to create. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $support_event_subscription = null; - - /** - * @param string $parent Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_id} - * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. - * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription Required. The Pub/Sub configuration to create. - * - * @return \Google\Cloud\Support\V2beta\CreateSupportEventSubscriptionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription): self - { - return (new self()) - ->setParent($parent) - ->setSupportEventSubscription($supportEventSubscription); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_id} - * @type \Google\Cloud\Support\V2beta\SupportEventSubscription $support_event_subscription - * Required. The Pub/Sub configuration to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_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 parent resource name where the support event subscription - * will be created. Format: organizations/{organization_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 Pub/Sub configuration to create. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2beta\SupportEventSubscription|null - */ - public function getSupportEventSubscription() - { - return $this->support_event_subscription; - } - - public function hasSupportEventSubscription() - { - return isset($this->support_event_subscription); - } - - public function clearSupportEventSubscription() - { - unset($this->support_event_subscription); - } - - /** - * Required. The Pub/Sub configuration to create. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $var - * @return $this - */ - public function setSupportEventSubscription($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\SupportEventSubscription::class); - $this->support_event_subscription = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php deleted file mode 100644 index 749156d44fd3..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.support.v2beta.DeleteSupportEventSubscriptionRequest - */ -class DeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\DeleteSupportEventSubscriptionRequest - * - * @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 name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php deleted file mode 100644 index fd71d8833511..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.support.v2beta.EmailMessage - */ -class EmailMessage extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Resource name for the email message. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Time when this email message object was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The user or Google Support agent that created this email - * message. This is inferred from the headers on the email message. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor actor = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $actor = null; - /** - * Output only. Subject of the email. - * - * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $subject = ''; - /** - * Output only. Email addresses the email was sent to. - * - * Generated from protobuf field repeated string recipient_email_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $recipient_email_addresses; - /** - * Output only. Email addresses CCed on the email. - * - * Generated from protobuf field repeated string cc_email_addresses = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $cc_email_addresses; - /** - * Output only. The full email message body. A best-effort attempt is made to - * remove extraneous reply threads. - * - * Generated from protobuf field .google.cloud.support.v2beta.TextContent body_content = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $body_content = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Resource name for the email message. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when this email message object was created. - * @type \Google\Cloud\Support\V2beta\Actor $actor - * Output only. The user or Google Support agent that created this email - * message. This is inferred from the headers on the email message. - * @type string $subject - * Output only. Subject of the email. - * @type string[] $recipient_email_addresses - * Output only. Email addresses the email was sent to. - * @type string[] $cc_email_addresses - * Output only. Email addresses CCed on the email. - * @type \Google\Cloud\Support\V2beta\TextContent $body_content - * Output only. The full email message body. A best-effort attempt is made to - * remove extraneous reply threads. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\EmailMessage::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Resource name for the email message. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Resource name for the email message. - * - * 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. Time when this email message object was created. - * - * 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. Time when this email message object was created. - * - * 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. The user or Google Support agent that created this email - * message. This is inferred from the headers on the email message. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor actor = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\Actor|null - */ - public function getActor() - { - return $this->actor; - } - - public function hasActor() - { - return isset($this->actor); - } - - public function clearActor() - { - unset($this->actor); - } - - /** - * Output only. The user or Google Support agent that created this email - * message. This is inferred from the headers on the email message. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor actor = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\Actor $var - * @return $this - */ - public function setActor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); - $this->actor = $var; - - return $this; - } - - /** - * Output only. Subject of the email. - * - * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Output only. Subject of the email. - * - * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSubject($var) - { - GPBUtil::checkString($var, True); - $this->subject = $var; - - return $this; - } - - /** - * Output only. Email addresses the email was sent to. - * - * Generated from protobuf field repeated string recipient_email_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField - */ - public function getRecipientEmailAddresses() - { - return $this->recipient_email_addresses; - } - - /** - * Output only. Email addresses the email was sent to. - * - * Generated from protobuf field repeated string recipient_email_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string[] $var - * @return $this - */ - public function setRecipientEmailAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->recipient_email_addresses = $arr; - - return $this; - } - - /** - * Output only. Email addresses CCed on the email. - * - * Generated from protobuf field repeated string cc_email_addresses = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField - */ - public function getCcEmailAddresses() - { - return $this->cc_email_addresses; - } - - /** - * Output only. Email addresses CCed on the email. - * - * Generated from protobuf field repeated string cc_email_addresses = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string[] $var - * @return $this - */ - public function setCcEmailAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->cc_email_addresses = $arr; - - return $this; - } - - /** - * Output only. The full email message body. A best-effort attempt is made to - * remove extraneous reply threads. - * - * Generated from protobuf field .google.cloud.support.v2beta.TextContent body_content = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\TextContent|null - */ - public function getBodyContent() - { - return $this->body_content; - } - - public function hasBodyContent() - { - return isset($this->body_content); - } - - public function clearBodyContent() - { - unset($this->body_content); - } - - /** - * Output only. The full email message body. A best-effort attempt is made to - * remove extraneous reply threads. - * - * Generated from protobuf field .google.cloud.support.v2beta.TextContent body_content = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\TextContent $var - * @return $this - */ - public function setBodyContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\TextContent::class); - $this->body_content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php deleted file mode 100644 index 59acffdb5c87..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.support.v2beta.EscalateCaseRequest - */ -class EscalateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case to be escalated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The escalation information to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2beta.Escalation escalation = 2; - */ - protected $escalation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the case to be escalated. - * @type \Google\Cloud\Support\V2beta\Escalation $escalation - * The escalation information to be sent with the escalation request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case to be escalated. - * - * 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 name of the case to be escalated. - * - * 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; - } - - /** - * The escalation information to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2beta.Escalation escalation = 2; - * @return \Google\Cloud\Support\V2beta\Escalation|null - */ - public function getEscalation() - { - return $this->escalation; - } - - public function hasEscalation() - { - return isset($this->escalation); - } - - public function clearEscalation() - { - unset($this->escalation); - } - - /** - * The escalation information to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2beta.Escalation escalation = 2; - * @param \Google\Cloud\Support\V2beta\Escalation $var - * @return $this - */ - public function setEscalation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Escalation::class); - $this->escalation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php deleted file mode 100644 index 86610b1235f5..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.support.v2beta.Escalation - */ -class Escalation extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2beta.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reason = 0; - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $justification = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $reason - * Required. The reason why the Case is being escalated. - * @type string $justification - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\Escalation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2beta.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getReason() - { - return $this->reason; - } - - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2beta.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\Escalation\Reason::class); - $this->reason = $var; - - return $this; - } - - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJustification() - { - return $this->justification; - } - - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJustification($var) - { - GPBUtil::checkString($var, True); - $this->justification = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php deleted file mode 100644 index bd3d6fc6a7fe..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.support.v2beta.Escalation.Reason - */ -class Reason -{ - /** - * The escalation reason is in an unknown state or has not been specified. - * - * Generated from protobuf enum REASON_UNSPECIFIED = 0; - */ - const REASON_UNSPECIFIED = 0; - /** - * The case is taking too long to resolve. - * - * Generated from protobuf enum RESOLUTION_TIME = 1; - */ - const RESOLUTION_TIME = 1; - /** - * The support agent does not have the expertise required to successfully - * resolve the issue. - * - * Generated from protobuf enum TECHNICAL_EXPERTISE = 2; - */ - const TECHNICAL_EXPERTISE = 2; - /** - * The issue is having a significant business impact. - * - * Generated from protobuf enum BUSINESS_IMPACT = 3; - */ - const BUSINESS_IMPACT = 3; - - private static $valueToName = [ - self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', - self::RESOLUTION_TIME => 'RESOLUTION_TIME', - self::TECHNICAL_EXPERTISE => 'TECHNICAL_EXPERTISE', - self::BUSINESS_IMPACT => 'BUSINESS_IMPACT', - ]; - - 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php deleted file mode 100644 index 1e8aef659d41..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.support.v2beta.FeedItem - */ -class FeedItem extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Time corresponding to the event of this item. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $event_time = null; - protected $event_object; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Support\V2beta\Comment $comment - * Output only. A comment added to the case. - * @type \Google\Cloud\Support\V2beta\Attachment $attachment - * Output only. An attachment attached to the case. - * @type \Google\Cloud\Support\V2beta\EmailMessage $email_message - * Output only. An email message received in reply to the case. - * @type \Google\Cloud\Support\V2beta\Attachment $deleted_attachment - * Output only. A deleted attachment that used to be associated with the - * support case. - * @type \Google\Protobuf\Timestamp $event_time - * Output only. Time corresponding to the event of this item. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\FeedItem::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A comment added to the case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\Comment|null - */ - public function getComment() - { - return $this->readOneof(100); - } - - public function hasComment() - { - return $this->hasOneof(100); - } - - /** - * Output only. A comment added to the case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\Comment $var - * @return $this - */ - public function setComment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Comment::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Output only. An attachment attached to the case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Attachment attachment = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\Attachment|null - */ - public function getAttachment() - { - return $this->readOneof(101); - } - - public function hasAttachment() - { - return $this->hasOneof(101); - } - - /** - * Output only. An attachment attached to the case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Attachment attachment = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\Attachment $var - * @return $this - */ - public function setAttachment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Attachment::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Output only. An email message received in reply to the case. - * - * Generated from protobuf field .google.cloud.support.v2beta.EmailMessage email_message = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\EmailMessage|null - */ - public function getEmailMessage() - { - return $this->readOneof(102); - } - - public function hasEmailMessage() - { - return $this->hasOneof(102); - } - - /** - * Output only. An email message received in reply to the case. - * - * Generated from protobuf field .google.cloud.support.v2beta.EmailMessage email_message = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\EmailMessage $var - * @return $this - */ - public function setEmailMessage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\EmailMessage::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * Output only. A deleted attachment that used to be associated with the - * support case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Attachment deleted_attachment = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\Attachment|null - */ - public function getDeletedAttachment() - { - return $this->readOneof(103); - } - - public function hasDeletedAttachment() - { - return $this->hasOneof(103); - } - - /** - * Output only. A deleted attachment that used to be associated with the - * support case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Attachment deleted_attachment = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\Attachment $var - * @return $this - */ - public function setDeletedAttachment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Attachment::class); - $this->writeOneof(103, $var); - - return $this; - } - - /** - * Output only. Time corresponding to the event of this item. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * Output only. Time corresponding to the event of this item. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getEventObject() - { - return $this->whichOneof("event_object"); - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php deleted file mode 100644 index 579ba88a3902..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2beta.GetAttachmentRequest - */ -class GetAttachmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the attachment to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the attachment to get. Please see - * {@see CaseAttachmentServiceClient::attachmentName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\GetAttachmentRequest - * - * @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 name of the attachment to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the attachment to get. - * - * 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 name of the attachment to get. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php deleted file mode 100644 index ff14ec737b03..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2beta.GetCaseRequest - */ -class GetCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of a case to be retrieved. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full name of a case to be retrieved. Please see - * {@see CaseServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\GetCaseRequest - * - * @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 full name of a case to be retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of a case to be retrieved. - * - * 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 full name of a case to be retrieved. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php deleted file mode 100644 index 32f4fe3c943f..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2beta.GetCommentRequest - */ -class GetCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the comment to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the comment to retrieve. Please see - * {@see CommentServiceClient::commentName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\GetCommentRequest - * - * @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 name of the comment to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the comment to retrieve. - * - * 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 name of the comment to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php deleted file mode 100644 index ce6febd2d464..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.support.v2beta.GetSupportEventSubscriptionRequest - */ -class GetSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\GetSupportEventSubscriptionRequest - * - * @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 name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php deleted file mode 100644 index 22e0f596a164..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.support.v2beta.ListAttachmentsRequest - */ -class ListAttachmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case for which attachments should be listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the case for which attachments should be listed. Please see - * {@see CaseAttachmentServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\ListAttachmentsRequest - * - * @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 name of the case for which attachments should be listed. - * @type int $page_size - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case for which attachments should be listed. - * - * 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 name of the case for which attachments should be listed. - * - * 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; - } - - /** - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php deleted file mode 100644 index 8260ee7d199d..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2beta.ListAttachmentsResponse - */ -class ListAttachmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of attachments associated with a case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Attachment attachments = 1; - */ - private $attachments; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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\Support\V2beta\Attachment[] $attachments - * The list of attachments associated with a case. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * The list of attachments associated with a case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Attachment attachments = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\Attachment> - */ - public function getAttachments() - { - return $this->attachments; - } - - /** - * The list of attachments associated with a case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Attachment attachments = 1; - * @param \Google\Cloud\Support\V2beta\Attachment[] $var - * @return $this - */ - public function setAttachments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\Attachment::class); - $this->attachments = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php deleted file mode 100644 index 7623afe88571..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.support.v2beta.ListCasesRequest - */ -class ListCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of a parent to list cases under. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - /** - * The product line to request cases for. If unspecified, only - * Google Cloud cases will be returned. - * - * Generated from protobuf field optional .google.cloud.support.v2beta.ProductLine product_line = 8; - */ - protected $product_line = null; - - /** - * @param string $parent Required. The name of a parent to list cases under. Please see - * {@see CaseServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\ListCasesRequest - * - * @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 name of a parent to list cases under. - * @type string $filter - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * @type int $page_size - * The maximum number of cases fetched with each request. Defaults to 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * @type int $product_line - * The product line to request cases for. If unspecified, only - * Google Cloud cases will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of a parent to list cases under. - * - * 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 name of a parent to list cases under. - * - * 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; - } - - /** - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The product line to request cases for. If unspecified, only - * Google Cloud cases will be returned. - * - * Generated from protobuf field optional .google.cloud.support.v2beta.ProductLine product_line = 8; - * @return int - */ - public function getProductLine() - { - return isset($this->product_line) ? $this->product_line : 0; - } - - public function hasProductLine() - { - return isset($this->product_line); - } - - public function clearProductLine() - { - unset($this->product_line); - } - - /** - * The product line to request cases for. If unspecified, only - * Google Cloud cases will be returned. - * - * Generated from protobuf field optional .google.cloud.support.v2beta.ProductLine product_line = 8; - * @param int $var - * @return $this - */ - public function setProductLine($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\ProductLine::class); - $this->product_line = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php deleted file mode 100644 index 217fcabeaf16..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.support.v2beta.ListCasesResponse - */ -class ListCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; - */ - private $cases; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * - * 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\Support\V2beta\PBCase[] $cases - * The list of cases associated with the parent after any - * filters have been applied. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\PBCase> - */ - public function getCases() - { - return $this->cases; - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; - * @param \Google\Cloud\Support\V2beta\PBCase[] $var - * @return $this - */ - public function setCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\PBCase::class); - $this->cases = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php deleted file mode 100644 index 1fee69ba5c52..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.support.v2beta.ListCommentsRequest - */ -class ListCommentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case for which to list comments. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of comments to fetch. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the case for which to list comments. Please see - * {@see CommentServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\ListCommentsRequest - * - * @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 name of the case for which to list comments. - * @type int $page_size - * The maximum number of comments to fetch. Defaults to 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case for which to list comments. - * - * 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 name of the case for which to list comments. - * - * 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; - } - - /** - * The maximum number of comments to fetch. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of comments to fetch. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * - * Generated from protobuf field string page_token = 5; - * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php deleted file mode 100644 index 98b78c99579e..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2beta.ListCommentsResponse - */ -class ListCommentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of the comments associated with the case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Comment comments = 1; - */ - private $comments; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * - * 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\Support\V2beta\Comment[] $comments - * List of the comments associated with the case. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * List of the comments associated with the case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Comment comments = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\Comment> - */ - public function getComments() - { - return $this->comments; - } - - /** - * List of the comments associated with the case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Comment comments = 1; - * @param \Google\Cloud\Support\V2beta\Comment[] $var - * @return $this - */ - public function setComments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\Comment::class); - $this->comments = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php deleted file mode 100644 index 975a70aa91fc..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php +++ /dev/null @@ -1,274 +0,0 @@ -google.cloud.support.v2beta.ListSupportEventSubscriptionsRequest - */ -class ListSupportEventSubscriptionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * - * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $show_deleted = false; - /** - * Optional. The maximum number of support event subscriptions to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_id} - * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\ListSupportEventSubscriptionsRequest - * - * @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 fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_id} - * @type string $filter - * Optional. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * @type bool $show_deleted - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * @type int $page_size - * Optional. The maximum number of support event subscriptions to return. - * @type string $page_token - * Optional. A token identifying the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_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 fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_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. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * - * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * - * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - - /** - * Optional. The maximum number of support event subscriptions to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of support event subscriptions to return. - * - * 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 the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * - * 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 the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php deleted file mode 100644 index 399066f36b1d..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.support.v2beta.ListSupportEventSubscriptionsResponse - */ -class ListSupportEventSubscriptionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The support event subscriptions. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.SupportEventSubscription support_event_subscriptions = 1; - */ - private $support_event_subscriptions; - /** - * A token, which can be sent 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\Support\V2beta\SupportEventSubscription[] $support_event_subscriptions - * The support event subscriptions. - * @type string $next_page_token - * A token, which can be sent 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\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * The support event subscriptions. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.SupportEventSubscription support_event_subscriptions = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\SupportEventSubscription> - */ - public function getSupportEventSubscriptions() - { - return $this->support_event_subscriptions; - } - - /** - * The support event subscriptions. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.SupportEventSubscription support_event_subscriptions = 1; - * @param \Google\Cloud\Support\V2beta\SupportEventSubscription[] $var - * @return $this - */ - public function setSupportEventSubscriptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\SupportEventSubscription::class); - $this->support_event_subscriptions = $arr; - - return $this; - } - - /** - * A token, which can be sent 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, which can be sent 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php deleted file mode 100644 index fad5de1eb73e..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php +++ /dev/null @@ -1,654 +0,0 @@ -google.cloud.support.v2beta.Case - */ -class PBCase extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name for the case. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2beta.CaseClassification classification = 4; - */ - protected $classification = null; - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - */ - protected $time_zone = ''; - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - */ - private $subscriber_email_addresses; - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 15; - */ - protected $creator = null; - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - */ - protected $contact_email = ''; - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - */ - protected $escalated = false; - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - */ - protected $test_case = false; - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - */ - protected $language_code = ''; - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case.Priority priority = 32; - */ - protected $priority = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name for the case. - * @type string $display_name - * The short summary of the issue reported in this case. - * @type string $description - * A broad description of the issue. - * @type \Google\Cloud\Support\V2beta\CaseClassification $classification - * The issue classification applicable to this case. - * @type string $time_zone - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * @type string[] $subscriber_email_addresses - * The email addresses to receive updates on this case. - * @type int $state - * Output only. The current status of the support case. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time this case was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time this case was last updated. - * @type \Google\Cloud\Support\V2beta\Actor $creator - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * @type string $contact_email - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * @type bool $escalated - * Whether the case is currently escalated. - * @type bool $test_case - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * @type string $language_code - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * @type int $priority - * The priority of this case. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\PBCase::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name for the case. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name for the case. - * - * 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; - } - - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2beta.CaseClassification classification = 4; - * @return \Google\Cloud\Support\V2beta\CaseClassification|null - */ - public function getClassification() - { - return $this->classification; - } - - public function hasClassification() - { - return isset($this->classification); - } - - public function clearClassification() - { - unset($this->classification); - } - - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2beta.CaseClassification classification = 4; - * @param \Google\Cloud\Support\V2beta\CaseClassification $var - * @return $this - */ - public function setClassification($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\CaseClassification::class); - $this->classification = $var; - - return $this; - } - - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - * @return RepeatedField - */ - public function getSubscriberEmailAddresses() - { - return $this->subscriber_email_addresses; - } - - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - * @param string[] $var - * @return $this - */ - public function setSubscriberEmailAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->subscriber_email_addresses = $arr; - - return $this; - } - - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\PBCase\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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. The time this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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; - } - - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 15; - * @return \Google\Cloud\Support\V2beta\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 15; - * @param \Google\Cloud\Support\V2beta\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - * @return string - */ - public function getContactEmail() - { - return $this->contact_email; - } - - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - * @param string $var - * @return $this - */ - public function setContactEmail($var) - { - GPBUtil::checkString($var, True); - $this->contact_email = $var; - - return $this; - } - - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - * @return bool - */ - public function getEscalated() - { - return $this->escalated; - } - - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - * @param bool $var - * @return $this - */ - public function setEscalated($var) - { - GPBUtil::checkBool($var); - $this->escalated = $var; - - return $this; - } - - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - * @return bool - */ - public function getTestCase() - { - return $this->test_case; - } - - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - * @param bool $var - * @return $this - */ - public function setTestCase($var) - { - GPBUtil::checkBool($var); - $this->test_case = $var; - - return $this; - } - - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case.Priority priority = 32; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case.Priority priority = 32; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\PBCase\Priority::class); - $this->priority = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php deleted file mode 100644 index 051cdb63b60c..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.support.v2beta.Case.Priority - */ -class Priority -{ - /** - * Priority is undefined or has not been set yet. - * - * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; - */ - const PRIORITY_UNSPECIFIED = 0; - /** - * Extreme impact on a production service. Service is hard down. - * - * Generated from protobuf enum P0 = 1; - */ - const P0 = 1; - /** - * Critical impact on a production service. Service is currently unusable. - * - * Generated from protobuf enum P1 = 2; - */ - const P1 = 2; - /** - * Severe impact on a production service. Service is usable but greatly - * impaired. - * - * Generated from protobuf enum P2 = 3; - */ - const P2 = 3; - /** - * Medium impact on a production service. Service is available, but - * moderately impaired. - * - * Generated from protobuf enum P3 = 4; - */ - const P3 = 4; - /** - * General questions or minor issues. Production service is fully - * available. - * - * Generated from protobuf enum P4 = 5; - */ - const P4 = 5; - - private static $valueToName = [ - self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', - self::P0 => 'P0', - self::P1 => 'P1', - self::P2 => 'P2', - self::P3 => 'P3', - self::P4 => 'P4', - ]; - - 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php deleted file mode 100644 index 29f64a2bed5c..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.support.v2beta.Case.State - */ -class State -{ - /** - * Case is in an unknown state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The case has been created but no one is assigned to work on it yet. - * - * Generated from protobuf enum NEW = 1; - */ - const PBNEW = 1; - /** - * The case is currently being handled by Google support. - * - * Generated from protobuf enum IN_PROGRESS_GOOGLE_SUPPORT = 2; - */ - const IN_PROGRESS_GOOGLE_SUPPORT = 2; - /** - * Google is waiting for a response. - * - * Generated from protobuf enum ACTION_REQUIRED = 3; - */ - const ACTION_REQUIRED = 3; - /** - * A solution has been offered for the case, but it isn't yet closed. - * - * Generated from protobuf enum SOLUTION_PROVIDED = 4; - */ - const SOLUTION_PROVIDED = 4; - /** - * The case has been resolved. - * - * Generated from protobuf enum CLOSED = 5; - */ - const CLOSED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PBNEW => 'NEW', - self::IN_PROGRESS_GOOGLE_SUPPORT => 'IN_PROGRESS_GOOGLE_SUPPORT', - self::ACTION_REQUIRED => 'ACTION_REQUIRED', - self::SOLUTION_PROVIDED => 'SOLUTION_PROVIDED', - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php deleted file mode 100644 index c3544621a2df..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.support.v2beta.Product - */ -class Product extends \Google\Protobuf\Internal\Message -{ - /** - * The product line of the Product. - * - * Generated from protobuf field .google.cloud.support.v2beta.ProductLine product_line = 1; - */ - protected $product_line = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $product_line - * The product line of the Product. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\PBCase::initOnce(); - parent::__construct($data); - } - - /** - * The product line of the Product. - * - * Generated from protobuf field .google.cloud.support.v2beta.ProductLine product_line = 1; - * @return int - */ - public function getProductLine() - { - return $this->product_line; - } - - /** - * The product line of the Product. - * - * Generated from protobuf field .google.cloud.support.v2beta.ProductLine product_line = 1; - * @param int $var - * @return $this - */ - public function setProductLine($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\ProductLine::class); - $this->product_line = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php deleted file mode 100644 index 9df6d79ba10a..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.support.v2beta.ProductLine - */ -class ProductLine -{ - /** - * Unknown product type. - * - * Generated from protobuf enum PRODUCT_LINE_UNSPECIFIED = 0; - */ - const PRODUCT_LINE_UNSPECIFIED = 0; - /** - * Google Cloud - * - * Generated from protobuf enum GOOGLE_CLOUD = 1; - */ - const GOOGLE_CLOUD = 1; - /** - * Google Maps - * - * Generated from protobuf enum GOOGLE_MAPS = 2; - */ - const GOOGLE_MAPS = 2; - - private static $valueToName = [ - self::PRODUCT_LINE_UNSPECIFIED => 'PRODUCT_LINE_UNSPECIFIED', - self::GOOGLE_CLOUD => 'GOOGLE_CLOUD', - self::GOOGLE_MAPS => 'GOOGLE_MAPS', - ]; - - 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php deleted file mode 100644 index 8bfcfda2cd22..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.support.v2beta.SearchCaseClassificationsRequest - */ -class SearchCaseClassificationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * - * Generated from protobuf field string query = 1; - */ - protected $query = ''; - /** - * The maximum number of classifications fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Optional. The product to return case classifications for. - * - * Generated from protobuf field .google.cloud.support.v2beta.Product product = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $product = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * @type int $page_size - * The maximum number of classifications fetched with each request. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * @type \Google\Cloud\Support\V2beta\Product $product - * Optional. The product to return case classifications for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * - * Generated from protobuf field string query = 1; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * - * Generated from protobuf field string query = 1; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The maximum number of classifications fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of classifications fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The product to return case classifications for. - * - * Generated from protobuf field .google.cloud.support.v2beta.Product product = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Support\V2beta\Product|null - */ - public function getProduct() - { - return $this->product; - } - - public function hasProduct() - { - return isset($this->product); - } - - public function clearProduct() - { - unset($this->product); - } - - /** - * Optional. The product to return case classifications for. - * - * Generated from protobuf field .google.cloud.support.v2beta.Product product = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Support\V2beta\Product $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Product::class); - $this->product = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php deleted file mode 100644 index 71c9b17fddd7..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2beta.SearchCaseClassificationsResponse - */ -class SearchCaseClassificationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.CaseClassification case_classifications = 1; - */ - private $case_classifications; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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\Support\V2beta\CaseClassification[] $case_classifications - * The classifications retrieved. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.CaseClassification case_classifications = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\CaseClassification> - */ - public function getCaseClassifications() - { - return $this->case_classifications; - } - - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.CaseClassification case_classifications = 1; - * @param \Google\Cloud\Support\V2beta\CaseClassification[] $var - * @return $this - */ - public function setCaseClassifications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\CaseClassification::class); - $this->case_classifications = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php deleted file mode 100644 index cfc445fa224a..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.support.v2beta.SearchCasesRequest - */ -class SearchCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the parent resource to search for cases under. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - /** - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - */ - protected $query = ''; - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the parent resource to search for cases under. - * @type string $query - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * @type int $page_size - * The maximum number of cases fetched with each request. The default page - * size is 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the parent resource to search for cases under. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the parent resource to search for cases under. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php deleted file mode 100644 index ee2c8f233996..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.support.v2beta.SearchCasesResponse - */ -class SearchCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; - */ - private $cases; - /** - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * - * 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\Support\V2beta\PBCase[] $cases - * The list of cases associated with the parent after any - * filters have been applied. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\PBCase> - */ - public function getCases() - { - return $this->cases; - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; - * @param \Google\Cloud\Support\V2beta\PBCase[] $var - * @return $this - */ - public function setCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\PBCase::class); - $this->cases = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php deleted file mode 100644 index f499a100b720..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php +++ /dev/null @@ -1,208 +0,0 @@ -google.cloud.support.v2beta.ShowFeedRequest - */ -class ShowFeedRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the case for which feed items should be - * listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Field to order feed items by, followed by `asc` or `desc` - * postfix. The only valid field is - * `creation_time`. This list is case-insensitive, default sorting order is - * ascending, and the redundant space characters are insignificant. - * Example: `creation_time desc` - * - * Generated from protobuf field string order_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. The maximum number of feed items fetched with each request. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying the page of results to return. If - * unspecified, it retrieves the first page. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the case for which feed items should be - * listed. Please see - * {@see FeedServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\ShowFeedRequest - * - * @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 resource name of the case for which feed items should be - * listed. - * @type string $order_by - * Optional. Field to order feed items by, followed by `asc` or `desc` - * postfix. The only valid field is - * `creation_time`. This list is case-insensitive, default sorting order is - * ascending, and the redundant space characters are insignificant. - * Example: `creation_time desc` - * @type int $page_size - * Optional. The maximum number of feed items fetched with each request. - * @type string $page_token - * Optional. A token identifying the page of results to return. If - * unspecified, it retrieves the first page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\FeedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the case for which feed items should be - * listed. - * - * 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 resource name of the case for which feed items should be - * listed. - * - * 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. Field to order feed items by, followed by `asc` or `desc` - * postfix. The only valid field is - * `creation_time`. This list is case-insensitive, default sorting order is - * ascending, and the redundant space characters are insignificant. - * Example: `creation_time desc` - * - * Generated from protobuf field string order_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Field to order feed items by, followed by `asc` or `desc` - * postfix. The only valid field is - * `creation_time`. This list is case-insensitive, default sorting order is - * ascending, and the redundant space characters are insignificant. - * Example: `creation_time desc` - * - * Generated from protobuf field string order_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. The maximum number of feed items fetched with each request. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of feed items fetched with each request. - * - * Generated from protobuf field int32 page_size = 3 [(.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 the page of results to return. If - * unspecified, it retrieves the first page. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying the page of results to return. If - * unspecified, it retrieves the first page. - * - * Generated from protobuf field string page_token = 4 [(.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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php deleted file mode 100644 index a8c8646a2c51..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2beta.ShowFeedResponse - */ -class ShowFeedResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of feed items associated with the given Case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.FeedItem feed_items = 1; - */ - private $feed_items; - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `ShowFeedRequests`. - * If unspecified, there are no more results to retrieve. - * - * 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\Support\V2beta\FeedItem[] $feed_items - * The list of feed items associated with the given Case. - * @type string $next_page_token - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `ShowFeedRequests`. - * If unspecified, there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\FeedService::initOnce(); - parent::__construct($data); - } - - /** - * The list of feed items associated with the given Case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.FeedItem feed_items = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\FeedItem> - */ - public function getFeedItems() - { - return $this->feed_items; - } - - /** - * The list of feed items associated with the given Case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.FeedItem feed_items = 1; - * @param \Google\Cloud\Support\V2beta\FeedItem[] $var - * @return $this - */ - public function setFeedItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\FeedItem::class); - $this->feed_items = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `ShowFeedRequests`. - * If unspecified, there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `ShowFeedRequests`. - * If unspecified, there are no more results to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php deleted file mode 100644 index 00735a9a48d8..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php +++ /dev/null @@ -1,353 +0,0 @@ -google.cloud.support.v2beta.SupportEventSubscription - */ -class SupportEventSubscription extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the support event subscription. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. The name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * - * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pub_sub_topic = ''; - /** - * Output only. The state of the subscription. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failure_reason = 0; - /** - * Output only. The time at which the subscription was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which the subscription was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The time at which the subscription was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. The time at which the subscription will be purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $purge_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the support event subscription. - * @type string $pub_sub_topic - * Required. The name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * @type int $state - * Output only. The state of the subscription. - * @type int $failure_reason - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the subscription was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the subscription was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The time at which the subscription was deleted. - * @type \Google\Protobuf\Timestamp $purge_time - * Output only. The time at which the subscription will be purged. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscription::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the support event subscription. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the support event subscription. - * - * 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 name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * - * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPubSubTopic() - { - return $this->pub_sub_topic; - } - - /** - * Required. The name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * - * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPubSubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pub_sub_topic = $var; - - return $this; - } - - /** - * Output only. The state of the subscription. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the subscription. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\SupportEventSubscription\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFailureReason() - { - return $this->failure_reason; - } - - /** - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFailureReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\SupportEventSubscription\FailureReason::class); - $this->failure_reason = $var; - - return $this; - } - - /** - * Output only. The time at which the subscription was created. - * - * 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. The time at which the subscription was created. - * - * 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. The time at which the subscription was last updated. - * - * 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. The time at which the subscription was last updated. - * - * 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. The time at which the subscription was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The time at which the subscription was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. The time at which the subscription will be purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPurgeTime() - { - return $this->purge_time; - } - - public function hasPurgeTime() - { - return isset($this->purge_time); - } - - public function clearPurgeTime() - { - unset($this->purge_time); - } - - /** - * Output only. The time at which the subscription will be purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPurgeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->purge_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php deleted file mode 100644 index de7f91e52472..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.support.v2beta.SupportEventSubscription.FailureReason - */ -class FailureReason -{ - /** - * Unspecified failure reason. - * - * Generated from protobuf enum FAILURE_REASON_UNSPECIFIED = 0; - */ - const FAILURE_REASON_UNSPECIFIED = 0; - /** - * The service account (i.e. - * cloud-support-apievents\@system.gserviceaccount.com) lacks the permission - * to publish to the customer's Pub/Sub topic. - * - * Generated from protobuf enum PERMISSION_DENIED = 1; - */ - const PERMISSION_DENIED = 1; - /** - * The specified Pub/Sub topic does not exist. - * - * Generated from protobuf enum TOPIC_NOT_FOUND = 2; - */ - const TOPIC_NOT_FOUND = 2; - /** - * Message failed to publish due to a system-side error. - * - * Generated from protobuf enum OTHER = 3; - */ - const OTHER = 3; - - private static $valueToName = [ - self::FAILURE_REASON_UNSPECIFIED => 'FAILURE_REASON_UNSPECIFIED', - self::PERMISSION_DENIED => 'PERMISSION_DENIED', - self::TOPIC_NOT_FOUND => 'TOPIC_NOT_FOUND', - self::OTHER => 'OTHER', - ]; - - 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php deleted file mode 100644 index e4c34e234dc3..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.support.v2beta.SupportEventSubscription.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Subscription is active and working. - * - * Generated from protobuf enum WORKING = 1; - */ - const WORKING = 1; - /** - * Subscription is failing. Notifications cannot be published for some - * reason. - * - * Generated from protobuf enum FAILING = 2; - */ - const FAILING = 2; - /** - * Subscription has been deleted and is pending purge. Notifications are not - * sent for deleted subscriptions. Deleted subscriptions are purged after - * their `purge_time` has passed. - * - * Generated from protobuf enum DELETED = 3; - */ - const DELETED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::WORKING => 'WORKING', - self::FAILING => 'FAILING', - 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php deleted file mode 100644 index e34f8aa6e1ae..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.support.v2beta.TextContent - */ -class TextContent extends \Google\Protobuf\Internal\Message -{ - /** - * Content in this field should be rendered and interpreted as-is. - * - * Generated from protobuf field string plain_text = 1; - */ - protected $plain_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $plain_text - * Content in this field should be rendered and interpreted as-is. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\Content::initOnce(); - parent::__construct($data); - } - - /** - * Content in this field should be rendered and interpreted as-is. - * - * Generated from protobuf field string plain_text = 1; - * @return string - */ - public function getPlainText() - { - return $this->plain_text; - } - - /** - * Content in this field should be rendered and interpreted as-is. - * - * Generated from protobuf field string plain_text = 1; - * @param string $var - * @return $this - */ - public function setPlainText($var) - { - GPBUtil::checkString($var, True); - $this->plain_text = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php deleted file mode 100644 index 82aa755ae583..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.support.v2beta.UndeleteSupportEventSubscriptionRequest - */ -class UndeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php deleted file mode 100644 index 00144f33d32c..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.support.v2beta.UpdateCaseRequest - */ -class UpdateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The case to update. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $case = null; - /** - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Support\V2beta\PBCase $case Required. The case to update. - * @param \Google\Protobuf\FieldMask $updateMask A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * @return \Google\Cloud\Support\V2beta\UpdateCaseRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Support\V2beta\PBCase $case, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCase($case) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Support\V2beta\PBCase $case - * Required. The case to update. - * @type \Google\Protobuf\FieldMask $update_mask - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The case to update. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2beta\PBCase|null - */ - public function getCase() - { - return $this->case; - } - - public function hasCase() - { - return isset($this->case); - } - - public function clearCase() - { - unset($this->case); - } - - /** - * Required. The case to update. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2beta\PBCase $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\PBCase::class); - $this->case = $var; - - return $this; - } - - /** - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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); - } - - /** - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php deleted file mode 100644 index 25630369d25c..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.support.v2beta.UpdateSupportEventSubscriptionRequest - */ -class UpdateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $support_event_subscription = null; - /** - * Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * @return \Google\Cloud\Support\V2beta\UpdateSupportEventSubscriptionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSupportEventSubscription($supportEventSubscription) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Support\V2beta\SupportEventSubscription $support_event_subscription - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2beta\SupportEventSubscription|null - */ - public function getSupportEventSubscription() - { - return $this->support_event_subscription; - } - - public function hasSupportEventSubscription() - { - return isset($this->support_event_subscription); - } - - public function clearSupportEventSubscription() - { - unset($this->support_event_subscription); - } - - /** - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $var - * @return $this - */ - public function setSupportEventSubscription($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\SupportEventSubscription::class); - $this->support_event_subscription = $var; - - return $this; - } - - /** - * Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * 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. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * 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/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php deleted file mode 100644 index 2e1f084ac7a8..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Attachment $response */ - $response = $caseAttachmentServiceClient->getAttachment($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 = CaseAttachmentServiceClient::attachmentName( - '[ORGANIZATION]', - '[CASE]', - '[ATTACHMENT_ID]' - ); - - get_attachment_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_CaseAttachmentService_GetAttachment_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php deleted file mode 100644 index f4eae9af7556..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseAttachmentServiceClient->listAttachments($request); - - /** @var Attachment $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 = CaseAttachmentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - list_attachments_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_CaseAttachmentService_ListAttachments_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php deleted file mode 100644 index 872794606f3c..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->closeCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - close_case_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_CaseService_CloseCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php deleted file mode 100644 index e6b2fb4d5f8d..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setCase($case); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->createCase($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 -{ - $formattedParent = CaseServiceClient::projectName('[PROJECT]'); - - create_case_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_CaseService_CreateCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php deleted file mode 100644 index 7e040cb9b05e..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->escalateCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - escalate_case_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_CaseService_EscalateCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php deleted file mode 100644 index 46c7e7f725bc..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->getCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - get_case_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_CaseService_GetCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php deleted file mode 100644 index c8001c3a45bc..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseServiceClient->listCases($request); - - /** @var PBCase $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 = CaseServiceClient::projectName('[PROJECT]'); - - list_cases_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_CaseService_ListCases_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php deleted file mode 100644 index d22043d60a9a..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php +++ /dev/null @@ -1,71 +0,0 @@ - "`. For example, - * `"Technical Issue > Compute > Compute Engine"`. - * - * Classification IDs returned by this endpoint are valid for at least six - * months. When a classification is deactivated, this endpoint immediately - * stops returning it. After six months, `case.create` requests using the - * classification will fail. - * - * 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 search_case_classifications_sample(): void -{ - // Create a client. - $caseServiceClient = new CaseServiceClient(); - - // Prepare the request message. - $request = new SearchCaseClassificationsRequest(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseServiceClient->searchCaseClassifications($request); - - /** @var CaseClassification $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 cloudsupport_v2beta_generated_CaseService_SearchCaseClassifications_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php deleted file mode 100644 index 57e95d86f279..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php +++ /dev/null @@ -1,62 +0,0 @@ -searchCases($request); - - /** @var PBCase $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 cloudsupport_v2beta_generated_CaseService_SearchCases_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php deleted file mode 100644 index 5d6da5dda2bc..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php +++ /dev/null @@ -1,59 +0,0 @@ -setCase($case); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->updateCase($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudsupport_v2beta_generated_CaseService_UpdateCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php deleted file mode 100644 index a4c6bc8eaf58..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent) - ->setComment($comment); - - // Call the API and handle any network failures. - try { - /** @var Comment $response */ - $response = $commentServiceClient->createComment($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 -{ - $formattedParent = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - create_comment_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_CommentService_CreateComment_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php deleted file mode 100644 index 05fa2f51eaed..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Comment $response */ - $response = $commentServiceClient->getComment($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 = CommentServiceClient::commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); - - get_comment_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_CommentService_GetComment_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php deleted file mode 100644 index 2549f5508593..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $commentServiceClient->listComments($request); - - /** @var Comment $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 = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - list_comments_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_CommentService_ListComments_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php b/owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php deleted file mode 100644 index 98c127e2a626..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $feedServiceClient->showFeed($request); - - /** @var FeedItem $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 = FeedServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - show_feed_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_FeedService_ShowFeed_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php deleted file mode 100644 index 08c3cfecd28b..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php +++ /dev/null @@ -1,80 +0,0 @@ -setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->createSupportEventSubscription($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 -{ - $formattedParent = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); - $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; - - create_support_event_subscription_sample($formattedParent, $supportEventSubscriptionPubSubTopic); -} -// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_CreateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php deleted file mode 100644 index 2b80c814cb7c..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->deleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - delete_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_DeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php deleted file mode 100644 index aa5b9e21636f..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->getSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - get_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_GetSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php deleted file mode 100644 index e1ec9e763534..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $supportEventSubscriptionServiceClient->listSupportEventSubscriptions($request); - - /** @var SupportEventSubscription $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 = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); - - list_support_event_subscriptions_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_ListSupportEventSubscriptions_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php deleted file mode 100644 index 2177e3aecaa9..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->undeleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - undelete_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_UndeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php deleted file mode 100644 index 690560ac45b7..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php +++ /dev/null @@ -1,74 +0,0 @@ -setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new UpdateSupportEventSubscriptionRequest()) - ->setSupportEventSubscription($supportEventSubscription); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->updateSupportEventSubscription($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 -{ - $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; - - update_support_event_subscription_sample($supportEventSubscriptionPubSubTopic); -} -// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_UpdateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php deleted file mode 100644 index d08be6f860e0..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php +++ /dev/null @@ -1,403 +0,0 @@ - getAttachmentAsync(GetAttachmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAttachmentsAsync(ListAttachmentsRequest $request, array $optionalArgs = []) - */ -final class CaseAttachmentServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2beta.CaseAttachmentService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/case_attachment_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/case_attachment_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/case_attachment_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/case_attachment_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a attachment - * resource. - * - * @param string $organization - * @param string $case - * @param string $attachmentId - * - * @return string The formatted attachment resource. - * - * @experimental - */ - public static function attachmentName(string $organization, string $case, string $attachmentId): string - { - return self::getPathTemplate('attachment')->render([ - 'organization' => $organization, - 'case' => $case, - 'attachment_id' => $attachmentId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - * - * @experimental - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - * - * @experimental - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case_attachment_id resource. - * - * @param string $organization - * @param string $case - * @param string $attachmentId - * - * @return string The formatted organization_case_attachment_id resource. - * - * @experimental - */ - public static function organizationCaseAttachmentIdName(string $organization, string $case, string $attachmentId): string - { - return self::getPathTemplate('organizationCaseAttachmentId')->render([ - 'organization' => $organization, - 'case' => $case, - 'attachment_id' => $attachmentId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - * - * @experimental - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_case_attachment_id resource. - * - * @param string $project - * @param string $case - * @param string $attachmentId - * - * @return string The formatted project_case_attachment_id resource. - * - * @experimental - */ - public static function projectCaseAttachmentIdName(string $project, string $case, string $attachmentId): string - { - return self::getPathTemplate('projectCaseAttachmentId')->render([ - 'project' => $project, - 'case' => $case, - 'attachment_id' => $attachmentId, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - attachment: organizations/{organization}/cases/{case}/attachments/{attachment_id} - * - case: organizations/{organization}/cases/{case} - * - organizationCase: organizations/{organization}/cases/{case} - * - organizationCaseAttachmentId: organizations/{organization}/cases/{case}/attachments/{attachment_id} - * - projectCase: projects/{project}/cases/{case} - * - projectCaseAttachmentId: projects/{project}/cases/{case}/attachments/{attachment_id} - * - * 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. - * - * @experimental - */ - 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 'cloudsupport.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\Support\V2beta\CaseAttachmentServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CaseAttachmentServiceClient(['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 - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($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); - } - - /** - * Retrieve an attachment. - * - * The async variant is {@see CaseAttachmentServiceClient::getAttachmentAsync()} . - * - * @example samples/V2beta/CaseAttachmentServiceClient/get_attachment.php - * - * @param GetAttachmentRequest $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 Attachment - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getAttachment(GetAttachmentRequest $request, array $callOptions = []): Attachment - { - return $this->startApiCall('GetAttachment', $request, $callOptions)->wait(); - } - - /** - * List all the attachments associated with a support case. - * - * The async variant is {@see CaseAttachmentServiceClient::listAttachmentsAsync()} - * . - * - * @example samples/V2beta/CaseAttachmentServiceClient/list_attachments.php - * - * @param ListAttachmentsRequest $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. - * - * @experimental - */ - public function listAttachments(ListAttachmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAttachments', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php deleted file mode 100644 index 1ee28a54ab51..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php +++ /dev/null @@ -1,576 +0,0 @@ - closeCaseAsync(CloseCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCaseAsync(CreateCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface escalateCaseAsync(EscalateCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCaseAsync(GetCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCasesAsync(ListCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchCaseClassificationsAsync(SearchCaseClassificationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchCasesAsync(SearchCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCaseAsync(UpdateCaseRequest $request, array $optionalArgs = []) - */ -final class CaseServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2beta.CaseService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/case_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/case_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/case_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/case_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - * - * @experimental - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - * - * @experimental - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - * - * @experimental - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - * - * @experimental - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - * - * @experimental - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - organization: organizations/{organization} - * - organizationCase: organizations/{organization}/cases/{case} - * - project: projects/{project} - * - projectCase: projects/{project}/cases/{case} - * - * 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. - * - * @experimental - */ - 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 'cloudsupport.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\Support\V2beta\CaseServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CaseServiceClient(['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 - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($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); - } - - /** - * Close a case. - * - * The async variant is {@see CaseServiceClient::closeCaseAsync()} . - * - * @example samples/V2beta/CaseServiceClient/close_case.php - * - * @param CloseCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function closeCase(CloseCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('CloseCase', $request, $callOptions)->wait(); - } - - /** - * Create a new case and associate it with a parent. - * - * It must have the following fields set: `display_name`, `description`, - * `classification`, and `priority`. If you're just testing the API and don't - * want to route your case to an agent, set `testCase=true`. - * - * The async variant is {@see CaseServiceClient::createCaseAsync()} . - * - * @example samples/V2beta/CaseServiceClient/create_case.php - * - * @param CreateCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function createCase(CreateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('CreateCase', $request, $callOptions)->wait(); - } - - /** - * Escalate a case, starting the Google Cloud Support escalation management - * process. - * - * This operation is only available for some support services. Go to - * https://cloud.google.com/support and look for 'Technical support - * escalations' in the feature list to find out which ones let you - * do that. - * - * The async variant is {@see CaseServiceClient::escalateCaseAsync()} . - * - * @example samples/V2beta/CaseServiceClient/escalate_case.php - * - * @param EscalateCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function escalateCase(EscalateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('EscalateCase', $request, $callOptions)->wait(); - } - - /** - * Retrieve a case. - * - * The async variant is {@see CaseServiceClient::getCaseAsync()} . - * - * @example samples/V2beta/CaseServiceClient/get_case.php - * - * @param GetCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getCase(GetCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('GetCase', $request, $callOptions)->wait(); - } - - /** - * Retrieve all cases under a parent, but not its children. - * - * For example, listing cases under an organization only returns the cases - * that are directly parented by that organization. To retrieve cases - * under an organization and its projects, use `cases.search`. - * - * The async variant is {@see CaseServiceClient::listCasesAsync()} . - * - * @example samples/V2beta/CaseServiceClient/list_cases.php - * - * @param ListCasesRequest $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. - * - * @experimental - */ - public function listCases(ListCasesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCases', $request, $callOptions); - } - - /** - * Retrieve valid classifications to use when creating a support case. - * - * Classifications are hierarchical. Each classification is a string - * containing all levels of the hierarchy separated by `" > "`. For example, - * `"Technical Issue > Compute > Compute Engine"`. - * - * Classification IDs returned by this endpoint are valid for at least six - * months. When a classification is deactivated, this endpoint immediately - * stops returning it. After six months, `case.create` requests using the - * classification will fail. - * - * The async variant is {@see CaseServiceClient::searchCaseClassificationsAsync()} - * . - * - * @example samples/V2beta/CaseServiceClient/search_case_classifications.php - * - * @param SearchCaseClassificationsRequest $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. - * - * @experimental - */ - public function searchCaseClassifications(SearchCaseClassificationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchCaseClassifications', $request, $callOptions); - } - - /** - * Search for cases using a query. - * - * The async variant is {@see CaseServiceClient::searchCasesAsync()} . - * - * @example samples/V2beta/CaseServiceClient/search_cases.php - * - * @param SearchCasesRequest $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. - * - * @experimental - */ - public function searchCases(SearchCasesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchCases', $request, $callOptions); - } - - /** - * Update a case. Only some fields can be updated. - * - * The async variant is {@see CaseServiceClient::updateCaseAsync()} . - * - * @example samples/V2beta/CaseServiceClient/update_case.php - * - * @param UpdateCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function updateCase(UpdateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('UpdateCase', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php deleted file mode 100644 index 31930ea0515d..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php +++ /dev/null @@ -1,434 +0,0 @@ - createCommentAsync(CreateCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCommentAsync(GetCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCommentsAsync(ListCommentsRequest $request, array $optionalArgs = []) - */ -final class CommentServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2beta.CommentService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/comment_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/comment_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/comment_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/comment_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - * - * @experimental - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a comment - * resource. - * - * @param string $organization - * @param string $case - * @param string $comment - * - * @return string The formatted comment resource. - * - * @experimental - */ - public static function commentName(string $organization, string $case, string $comment): string - { - return self::getPathTemplate('comment')->render([ - 'organization' => $organization, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - * - * @experimental - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case_comment resource. - * - * @param string $organization - * @param string $case - * @param string $comment - * - * @return string The formatted organization_case_comment resource. - * - * @experimental - */ - public static function organizationCaseCommentName(string $organization, string $case, string $comment): string - { - return self::getPathTemplate('organizationCaseComment')->render([ - 'organization' => $organization, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - * - * @experimental - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_case_comment resource. - * - * @param string $project - * @param string $case - * @param string $comment - * - * @return string The formatted project_case_comment resource. - * - * @experimental - */ - public static function projectCaseCommentName(string $project, string $case, string $comment): string - { - return self::getPathTemplate('projectCaseComment')->render([ - 'project' => $project, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - comment: organizations/{organization}/cases/{case}/comments/{comment} - * - organizationCase: organizations/{organization}/cases/{case} - * - organizationCaseComment: organizations/{organization}/cases/{case}/comments/{comment} - * - projectCase: projects/{project}/cases/{case} - * - projectCaseComment: projects/{project}/cases/{case}/comments/{comment} - * - * 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. - * - * @experimental - */ - 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 'cloudsupport.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\Support\V2beta\CommentServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CommentServiceClient(['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 - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($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); - } - - /** - * Add a new comment to a case. - * - * The comment must have the following fields set: `body`. - * - * The async variant is {@see CommentServiceClient::createCommentAsync()} . - * - * @example samples/V2beta/CommentServiceClient/create_comment.php - * - * @param CreateCommentRequest $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 Comment - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function createComment(CreateCommentRequest $request, array $callOptions = []): Comment - { - return $this->startApiCall('CreateComment', $request, $callOptions)->wait(); - } - - /** - * Retrieve a comment. - * - * The async variant is {@see CommentServiceClient::getCommentAsync()} . - * - * @example samples/V2beta/CommentServiceClient/get_comment.php - * - * @param GetCommentRequest $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 Comment - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getComment(GetCommentRequest $request, array $callOptions = []): Comment - { - return $this->startApiCall('GetComment', $request, $callOptions)->wait(); - } - - /** - * List all the comments associated with a case. - * - * The async variant is {@see CommentServiceClient::listCommentsAsync()} . - * - * @example samples/V2beta/CommentServiceClient/list_comments.php - * - * @param ListCommentsRequest $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. - * - * @experimental - */ - public function listComments(ListCommentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListComments', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php deleted file mode 100644 index bd9204cb0a37..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php +++ /dev/null @@ -1,306 +0,0 @@ - showFeedAsync(ShowFeedRequest $request, array $optionalArgs = []) - */ -final class FeedServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2beta.FeedService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/feed_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/feed_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/feed_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/feed_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - * - * @experimental - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - * - * @experimental - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - * - * @experimental - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - organizationCase: organizations/{organization}/cases/{case} - * - projectCase: projects/{project}/cases/{case} - * - * 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. - * - * @experimental - */ - 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 'cloudsupport.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\Support\V2beta\FeedServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new FeedServiceClient(['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 - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($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); - } - - /** - * Show items in the feed of this case, including case emails, - * attachments, and comments. - * - * The async variant is {@see FeedServiceClient::showFeedAsync()} . - * - * @example samples/V2beta/FeedServiceClient/show_feed.php - * - * @param ShowFeedRequest $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. - * - * @experimental - */ - public function showFeed(ShowFeedRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ShowFeed', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php deleted file mode 100644 index d9bc913ee4e9..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php +++ /dev/null @@ -1,446 +0,0 @@ - createSupportEventSubscriptionAsync(CreateSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSupportEventSubscriptionAsync(DeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSupportEventSubscriptionAsync(GetSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSupportEventSubscriptionsAsync(ListSupportEventSubscriptionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeleteSupportEventSubscriptionAsync(UndeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSupportEventSubscriptionAsync(UpdateSupportEventSubscriptionRequest $request, array $optionalArgs = []) - */ -final class SupportEventSubscriptionServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2beta.SupportEventSubscriptionService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/support_event_subscription_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - * - * @experimental - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * support_event_subscription resource. - * - * @param string $organization - * @param string $supportEventSubscription - * - * @return string The formatted support_event_subscription resource. - * - * @experimental - */ - public static function supportEventSubscriptionName(string $organization, string $supportEventSubscription): string - { - return self::getPathTemplate('supportEventSubscription')->render([ - 'organization' => $organization, - 'support_event_subscription' => $supportEventSubscription, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - organization: organizations/{organization} - * - supportEventSubscription: organizations/{organization}/supportEventSubscriptions/{support_event_subscription} - * - * 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. - * - * @experimental - */ - 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 'cloudsupport.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\Support\V2beta\SupportEventSubscriptionServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new SupportEventSubscriptionServiceClient(['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 - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($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); - } - - /** - * Creates a support event subscription for an organization. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::createSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php - * - * @param CreateSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function createSupportEventSubscription(CreateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('CreateSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Soft deletes a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::deleteSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php - * - * @param DeleteSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function deleteSupportEventSubscription(DeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('DeleteSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Gets a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::getSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php - * - * @param GetSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getSupportEventSubscription(GetSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('GetSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Lists support event subscriptions. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::listSupportEventSubscriptionsAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php - * - * @param ListSupportEventSubscriptionsRequest $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. - * - * @experimental - */ - public function listSupportEventSubscriptions(ListSupportEventSubscriptionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSupportEventSubscriptions', $request, $callOptions); - } - - /** - * Undeletes a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::undeleteSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php - * - * @param UndeleteSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function undeleteSupportEventSubscription(UndeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('UndeleteSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Updates a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::updateSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php - * - * @param UpdateSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function updateSupportEventSubscription(UpdateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('UpdateSupportEventSubscription', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json b/owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json deleted file mode 100644 index f91cf79c6b4d..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json +++ /dev/null @@ -1,154 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.support.v2beta", - "libraryPackage": "Google\\Cloud\\Support\\V2beta", - "services": { - "CaseAttachmentService": { - "clients": { - "grpc": { - "libraryClient": "CaseAttachmentServiceGapicClient", - "rpcs": { - "GetAttachment": { - "methods": [ - "getAttachment" - ] - }, - "ListAttachments": { - "methods": [ - "listAttachments" - ] - } - } - } - } - }, - "CaseService": { - "clients": { - "grpc": { - "libraryClient": "CaseServiceGapicClient", - "rpcs": { - "CloseCase": { - "methods": [ - "closeCase" - ] - }, - "CreateCase": { - "methods": [ - "createCase" - ] - }, - "EscalateCase": { - "methods": [ - "escalateCase" - ] - }, - "GetCase": { - "methods": [ - "getCase" - ] - }, - "ListCases": { - "methods": [ - "listCases" - ] - }, - "SearchCaseClassifications": { - "methods": [ - "searchCaseClassifications" - ] - }, - "SearchCases": { - "methods": [ - "searchCases" - ] - }, - "UpdateCase": { - "methods": [ - "updateCase" - ] - } - } - } - } - }, - "CommentService": { - "clients": { - "grpc": { - "libraryClient": "CommentServiceGapicClient", - "rpcs": { - "CreateComment": { - "methods": [ - "createComment" - ] - }, - "GetComment": { - "methods": [ - "getComment" - ] - }, - "ListComments": { - "methods": [ - "listComments" - ] - } - } - } - } - }, - "FeedService": { - "clients": { - "grpc": { - "libraryClient": "FeedServiceGapicClient", - "rpcs": { - "ShowFeed": { - "methods": [ - "showFeed" - ] - } - } - } - } - }, - "SupportEventSubscriptionService": { - "clients": { - "grpc": { - "libraryClient": "SupportEventSubscriptionServiceGapicClient", - "rpcs": { - "CreateSupportEventSubscription": { - "methods": [ - "createSupportEventSubscription" - ] - }, - "DeleteSupportEventSubscription": { - "methods": [ - "deleteSupportEventSubscription" - ] - }, - "GetSupportEventSubscription": { - "methods": [ - "getSupportEventSubscription" - ] - }, - "ListSupportEventSubscriptions": { - "methods": [ - "listSupportEventSubscriptions" - ] - }, - "UndeleteSupportEventSubscription": { - "methods": [ - "undeleteSupportEventSubscription" - ] - }, - "UpdateSupportEventSubscription": { - "methods": [ - "updateSupportEventSubscription" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json deleted file mode 100644 index f19639a4ac33..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2beta.CaseAttachmentService": { - "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": { - "GetAttachment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListAttachments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php deleted file mode 100644 index 287ae1c56302..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php +++ /dev/null @@ -1,68 +0,0 @@ - [ - 'google.cloud.support.v2beta.CaseAttachmentService' => [ - 'GetAttachment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\Attachment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAttachments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAttachments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\ListAttachmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'attachment' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', - 'case' => 'organizations/{organization}/cases/{case}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'organizationCaseAttachmentId' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', - 'projectCase' => 'projects/{project}/cases/{case}', - 'projectCaseAttachmentId' => 'projects/{project}/cases/{case}/attachments/{attachment_id}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php deleted file mode 100644 index 6622e38fed04..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php +++ /dev/null @@ -1,57 +0,0 @@ - [ - 'google.cloud.support.v2beta.CaseAttachmentService' => [ - 'GetAttachment' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=*/*/cases/*/attachments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAttachments' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}/attachments', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}/attachments', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json deleted file mode 100644 index 110f290f14da..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2beta.CaseService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CloseCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "EscalateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetCase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchCaseClassifications": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php deleted file mode 100644 index e197c704af4b..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php +++ /dev/null @@ -1,148 +0,0 @@ - [ - 'google.cloud.support.v2beta.CaseService' => [ - 'CloseCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'EscalateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCases', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\ListCasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SearchCaseClassifications' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCaseClassifications', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SearchCaseClassificationsResponse', - ], - 'SearchCases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCases', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SearchCasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'case.name', - 'fieldAccessors' => [ - 'getCase', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'organization' => 'organizations/{organization}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'project' => 'projects/{project}', - 'projectCase' => 'projects/{project}/cases/{case}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php deleted file mode 100644 index 14753e7f357c..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php +++ /dev/null @@ -1,161 +0,0 @@ - [ - 'google.cloud.support.v2beta.CaseService' => [ - 'CloseCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=projects/*/cases/*}:close', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=organizations/*/cases/*}:close', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{parent=projects/*}/cases', - 'body' => 'case', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{parent=organizations/*}/cases', - 'body' => 'case', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'EscalateCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=projects/*/cases/*}:escalate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=organizations/*/cases/*}:escalate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCase' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=projects/*/cases/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=organizations/*/cases/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCases' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=projects/*}/cases', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=organizations/*}/cases', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SearchCaseClassifications' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/caseClassifications:search', - ], - 'SearchCases' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=projects/*}/cases:search', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=organizations/*}/cases:search', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCase' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2beta/{case.name=projects/*/cases/*}', - 'body' => 'case', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2beta/{case.name=organizations/*/cases/*}', - 'body' => 'case', - ], - ], - 'placeholders' => [ - 'case.name' => [ - 'getters' => [ - 'getCase', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json deleted file mode 100644 index a12278e1bc21..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2beta.CommentService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListComments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php deleted file mode 100644 index 615a3a58f6b9..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php +++ /dev/null @@ -1,80 +0,0 @@ - [ - 'google.cloud.support.v2beta.CommentService' => [ - 'CreateComment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\Comment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetComment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\Comment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListComments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getComments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\ListCommentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'comment' => 'organizations/{organization}/cases/{case}/comments/{comment}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'organizationCaseComment' => 'organizations/{organization}/cases/{case}/comments/{comment}', - 'projectCase' => 'projects/{project}/cases/{case}', - 'projectCaseComment' => 'projects/{project}/cases/{case}/comments/{comment}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php deleted file mode 100644 index 29cc3af0ddb0..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php +++ /dev/null @@ -1,76 +0,0 @@ - [ - 'google.cloud.support.v2beta.CommentService' => [ - 'CreateComment' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}/comments', - 'body' => 'comment', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}/comments', - 'body' => 'comment', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetComment' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=*/*/cases/*/comments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListComments' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}/comments', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}/comments', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json deleted file mode 100644 index 04b964759795..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2beta.FeedService": { - "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": { - "ShowFeed": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php deleted file mode 100644 index d71f2a17c867..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php +++ /dev/null @@ -1,53 +0,0 @@ - [ - 'google.cloud.support.v2beta.FeedService' => [ - 'ShowFeed' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFeedItems', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\ShowFeedResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'projectCase' => 'projects/{project}/cases/{case}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php deleted file mode 100644 index e5d5d3336a27..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php +++ /dev/null @@ -1,46 +0,0 @@ - [ - 'google.cloud.support.v2beta.FeedService' => [ - 'ShowFeed' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}:showFeed', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}:showFeed', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json deleted file mode 100644 index b40a371728ef..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2beta.SupportEventSubscriptionService": { - "retry_codes": { - "no_retry_codes": [] - }, - "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 - } - }, - "methods": { - "CreateSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListSupportEventSubscriptions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UndeleteSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php deleted file mode 100644 index 824f8c5dabe9..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php +++ /dev/null @@ -1,113 +0,0 @@ - [ - 'google.cloud.support.v2beta.SupportEventSubscriptionService' => [ - 'CreateSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListSupportEventSubscriptions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSupportEventSubscriptions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\ListSupportEventSubscriptionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UndeleteSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'support_event_subscription.name', - 'fieldAccessors' => [ - 'getSupportEventSubscription', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'organization' => 'organizations/{organization}', - 'supportEventSubscription' => 'organizations/{organization}/supportEventSubscriptions/{support_event_subscription}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php deleted file mode 100644 index 78d090501dce..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php +++ /dev/null @@ -1,99 +0,0 @@ - [ - 'google.cloud.support.v2beta.SupportEventSubscriptionService' => [ - 'CreateSupportEventSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{parent=*/*}/supportEventSubscriptions', - 'body' => 'support_event_subscription', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSupportEventSubscription' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2beta/{name=*/*/supportEventSubscriptions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSupportEventSubscription' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=*/*/supportEventSubscriptions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSupportEventSubscriptions' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=*/*}/supportEventSubscriptions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UndeleteSupportEventSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=*/*/supportEventSubscriptions/*}:undelete', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSupportEventSubscription' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2beta/{support_event_subscription.name=*/*/supportEventSubscriptions/*}', - 'body' => 'support_event_subscription', - 'placeholders' => [ - 'support_event_subscription.name' => [ - 'getters' => [ - 'getSupportEventSubscription', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php deleted file mode 100644 index 5e7448a0adcd..000000000000 --- a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php +++ /dev/null @@ -1,241 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CaseAttachmentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CaseAttachmentServiceClient($options); - } - - /** @test */ - public function getAttachmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $filename = 'filename-734768633'; - $mimeType = 'mimeType-196041627'; - $sizeBytes = 1796325715; - $expectedResponse = new Attachment(); - $expectedResponse->setName($name2); - $expectedResponse->setFilename($filename); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); - $request = (new GetAttachmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttachment($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.support.v2beta.CaseAttachmentService/GetAttachment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachmentExceptionTest() - { - $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->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); - $request = (new GetAttachmentRequest()) - ->setName($formattedName); - try { - $gapicClient->getAttachment($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 listAttachmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $attachmentsElement = new Attachment(); - $attachments = [ - $attachmentsElement, - ]; - $expectedResponse = new ListAttachmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAttachments($attachments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListAttachmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAttachments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAttachments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CaseAttachmentService/ListAttachments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAttachmentsExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListAttachmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAttachments($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 getAttachmentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $filename = 'filename-734768633'; - $mimeType = 'mimeType-196041627'; - $sizeBytes = 1796325715; - $expectedResponse = new Attachment(); - $expectedResponse->setName($name2); - $expectedResponse->setFilename($filename); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); - $request = (new GetAttachmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttachmentAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CaseAttachmentService/GetAttachment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php deleted file mode 100644 index 64d4d93e4b7b..000000000000 --- a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php +++ /dev/null @@ -1,712 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CaseServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CaseServiceClient($options); - } - - /** @test */ - public function closeCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->closeCase($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.support.v2beta.CaseService/CloseCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function closeCaseExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->closeCase($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 createCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $case = new PBCase(); - $request = (new CreateCaseRequest()) - ->setParent($formattedParent) - ->setCase($case); - $response = $gapicClient->createCase($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.support.v2beta.CaseService/CreateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCase(); - $this->assertProtobufEquals($case, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCaseExceptionTest() - { - $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->projectName('[PROJECT]'); - $case = new PBCase(); - $request = (new CreateCaseRequest()) - ->setParent($formattedParent) - ->setCase($case); - try { - $gapicClient->createCase($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 escalateCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new EscalateCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->escalateCase($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.support.v2beta.CaseService/EscalateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function escalateCaseExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new EscalateCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->escalateCase($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 getCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new GetCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->getCase($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.support.v2beta.CaseService/GetCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCaseExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new GetCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->getCase($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 listCasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $casesElement = new PBCase(); - $cases = [ - $casesElement, - ]; - $expectedResponse = new ListCasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCases($cases); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListCasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCases($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CaseService/ListCases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCasesExceptionTest() - { - $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->projectName('[PROJECT]'); - $request = (new ListCasesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCases($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 searchCaseClassificationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $caseClassificationsElement = new CaseClassification(); - $caseClassifications = [ - $caseClassificationsElement, - ]; - $expectedResponse = new SearchCaseClassificationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCaseClassifications($caseClassifications); - $transport->addResponse($expectedResponse); - $request = new SearchCaseClassificationsRequest(); - $response = $gapicClient->searchCaseClassifications($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCaseClassifications()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CaseService/SearchCaseClassifications', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCaseClassificationsExceptionTest() - { - $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 SearchCaseClassificationsRequest(); - try { - $gapicClient->searchCaseClassifications($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 searchCasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $casesElement = new PBCase(); - $cases = [ - $casesElement, - ]; - $expectedResponse = new SearchCasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCases($cases); - $transport->addResponse($expectedResponse); - $request = new SearchCasesRequest(); - $response = $gapicClient->searchCases($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CaseService/SearchCases', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCasesExceptionTest() - { - $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 SearchCasesRequest(); - try { - $gapicClient->searchCases($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 updateCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $case = new PBCase(); - $request = (new UpdateCaseRequest()) - ->setCase($case); - $response = $gapicClient->updateCase($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.support.v2beta.CaseService/UpdateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getCase(); - $this->assertProtobufEquals($case, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCaseExceptionTest() - { - $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 - $case = new PBCase(); - $request = (new UpdateCaseRequest()) - ->setCase($case); - try { - $gapicClient->updateCase($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 closeCaseAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->closeCaseAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CaseService/CloseCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php deleted file mode 100644 index 0e38fc9ee9d2..000000000000 --- a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php +++ /dev/null @@ -1,316 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CommentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CommentServiceClient($options); - } - - /** @test */ - public function createCommentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - $response = $gapicClient->createComment($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.support.v2beta.CommentService/CreateComment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getComment(); - $this->assertProtobufEquals($comment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCommentExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - try { - $gapicClient->createComment($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 getCommentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name2); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); - $request = (new GetCommentRequest()) - ->setName($formattedName); - $response = $gapicClient->getComment($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.support.v2beta.CommentService/GetComment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCommentExceptionTest() - { - $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->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); - $request = (new GetCommentRequest()) - ->setName($formattedName); - try { - $gapicClient->getComment($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 listCommentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $commentsElement = new Comment(); - $comments = [ - $commentsElement, - ]; - $expectedResponse = new ListCommentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setComments($comments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListCommentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listComments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getComments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CommentService/ListComments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCommentsExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListCommentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listComments($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 createCommentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - $response = $gapicClient->createCommentAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CommentService/CreateComment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getComment(); - $this->assertProtobufEquals($comment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php deleted file mode 100644 index 303a6a57e9b5..000000000000 --- a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php +++ /dev/null @@ -1,172 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FeedServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FeedServiceClient($options); - } - - /** @test */ - public function showFeedTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $feedItemsElement = new FeedItem(); - $feedItems = [ - $feedItemsElement, - ]; - $expectedResponse = new ShowFeedResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFeedItems($feedItems); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ShowFeedRequest()) - ->setParent($formattedParent); - $response = $gapicClient->showFeed($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFeedItems()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.FeedService/ShowFeed', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showFeedExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ShowFeedRequest()) - ->setParent($formattedParent); - try { - $gapicClient->showFeed($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 showFeedAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $feedItemsElement = new FeedItem(); - $feedItems = [ - $feedItemsElement, - ]; - $expectedResponse = new ShowFeedResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFeedItems($feedItems); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ShowFeedRequest()) - ->setParent($formattedParent); - $response = $gapicClient->showFeedAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFeedItems()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.FeedService/ShowFeed', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php deleted file mode 100644 index e2e28fbb6561..000000000000 --- a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php +++ /dev/null @@ -1,521 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SupportEventSubscriptionServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SupportEventSubscriptionServiceClient($options); - } - - /** @test */ - public function createSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - $response = $gapicClient->createSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSupportEventSubscription(); - $this->assertProtobufEquals($supportEventSubscription, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSupportEventSubscriptionExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - try { - $gapicClient->createSupportEventSubscription($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 deleteSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name2); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new DeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/DeleteSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new DeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSupportEventSubscription($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 getSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name2); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new GetSupportEventSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->getSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/GetSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new GetSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->getSupportEventSubscription($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 listSupportEventSubscriptionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $supportEventSubscriptionsElement = new SupportEventSubscription(); - $supportEventSubscriptions = [ - $supportEventSubscriptionsElement, - ]; - $expectedResponse = new ListSupportEventSubscriptionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSupportEventSubscriptions($supportEventSubscriptions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $request = (new ListSupportEventSubscriptionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSupportEventSubscriptions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSupportEventSubscriptions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.SupportEventSubscriptionService/ListSupportEventSubscriptions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSupportEventSubscriptionsExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $request = (new ListSupportEventSubscriptionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSupportEventSubscriptions($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 undeleteSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name2); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new UndeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->undeleteSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/UndeleteSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function undeleteSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new UndeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->undeleteSupportEventSubscription($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 updateSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new UpdateSupportEventSubscriptionRequest()) - ->setSupportEventSubscription($supportEventSubscription); - $response = $gapicClient->updateSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/UpdateSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getSupportEventSubscription(); - $this->assertProtobufEquals($supportEventSubscription, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSupportEventSubscriptionExceptionTest() - { - $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 - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new UpdateSupportEventSubscriptionRequest()) - ->setSupportEventSubscription($supportEventSubscription); - try { - $gapicClient->updateSupportEventSubscription($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 createSupportEventSubscriptionAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - $response = $gapicClient->createSupportEventSubscriptionAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSupportEventSubscription(); - $this->assertProtobufEquals($supportEventSubscription, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} From 61b600ba6decc2ae9ae1d7aadcc0d0e27be896d5 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 24 Jul 2026 21:59:28 +0000 Subject: [PATCH 3/4] fix: align HTTP paths with enforced matching feat: A new method `ExpungeSupportEventSubscription` is added to service `SupportEventSubscriptionService` feat: A new message `ExpungeSupportEventSubscriptionRequest` is added docs: A comment for method `ListSupportEventSubscriptions` in service `SupportEventSubscriptionService` is changed PiperOrigin-RevId: 953476189 Source-Link: https://github.com/googleapis/googleapis/commit/09bc253ea6b336c1a214487684f4eb303bd7fc62 Source-Link: https://github.com/googleapis/googleapis-gen/commit/377434f5ad4ad8a54aca1acec002ba51faa17f0f Copy-Tag: eyJwIjoiU3VwcG9ydC8uT3dsQm90LnlhbWwiLCJoIjoiMzc3NDM0ZjVhZDRhZDhhNTRhY2ExYWNlYzAwMmJhNTFmYWExN2YwZiJ9 --- .../Google/Cloud/Support/V2/Actor.php | 25 + .../Google/Cloud/Support/V2/Attachment.php | 28 + .../Cloud/Support/V2/AttachmentService.php | 29 + .../Google/Cloud/Support/V2/CaseService.php | 31 + .../Google/Cloud/Support/V2/Comment.php | 28 + .../Cloud/Support/V2/CommentService.php | 29 + .../Google/Cloud/Support/V2/Escalation.php | 25 + .../Google/Cloud/Support/V2/PBCase.php | 28 + .../Support/V2/SupportEventSubscription.php | 27 + .../V2/SupportEventSubscriptionService.php | 31 + .../src/Google/Cloud/Support/V2/Actor.php | 222 ++++++ .../Google/Cloud/Support/V2/Attachment.php | 267 +++++++ .../Cloud/Support/V2/CaseClassification.php | 137 ++++ .../Cloud/Support/V2/CloseCaseRequest.php | 67 ++ .../src/Google/Cloud/Support/V2/Comment.php | 245 ++++++ .../Cloud/Support/V2/CreateCaseRequest.php | 127 ++++ .../Cloud/Support/V2/CreateCommentRequest.php | 127 ++++ .../CreateSupportEventSubscriptionRequest.php | 132 ++++ .../DeleteSupportEventSubscriptionRequest.php | 91 +++ .../Cloud/Support/V2/EscalateCaseRequest.php | 111 +++ .../Google/Cloud/Support/V2/Escalation.php | 105 +++ .../Cloud/Support/V2/Escalation/Reason.php | 69 ++ ...ExpungeSupportEventSubscriptionRequest.php | 91 +++ .../Cloud/Support/V2/GetAttachmentRequest.php | 81 ++ .../Cloud/Support/V2/GetCaseRequest.php | 81 ++ .../Cloud/Support/V2/GetCommentRequest.php | 81 ++ .../V2/GetSupportEventSubscriptionRequest.php | 91 +++ .../Support/V2/ListAttachmentsRequest.php | 173 +++++ .../Support/V2/ListAttachmentsResponse.php | 109 +++ .../Cloud/Support/V2/ListCasesRequest.php | 239 ++++++ .../Cloud/Support/V2/ListCasesResponse.php | 113 +++ .../Cloud/Support/V2/ListCommentsRequest.php | 153 ++++ .../Cloud/Support/V2/ListCommentsResponse.php | 109 +++ .../ListSupportEventSubscriptionsRequest.php | 274 +++++++ .../ListSupportEventSubscriptionsResponse.php | 105 +++ .../src/Google/Cloud/Support/V2/PBCase.php | 654 ++++++++++++++++ .../Cloud/Support/V2/PBCase/Priority.php | 85 +++ .../Google/Cloud/Support/V2/PBCase/State.php | 86 +++ .../V2/SearchCaseClassificationsRequest.php | 147 ++++ .../V2/SearchCaseClassificationsResponse.php | 109 +++ .../Cloud/Support/V2/SearchCasesRequest.php | 317 ++++++++ .../Cloud/Support/V2/SearchCasesResponse.php | 113 +++ .../Support/V2/SupportEventSubscription.php | 353 +++++++++ .../FailureReason.php | 70 ++ .../V2/SupportEventSubscription/State.php | 71 ++ ...ndeleteSupportEventSubscriptionRequest.php | 75 ++ .../Cloud/Support/V2/UpdateCaseRequest.php | 167 ++++ .../UpdateSupportEventSubscriptionRequest.php | 146 ++++ .../get_attachment.php | 105 +++ .../list_attachments.php | 76 ++ .../V2/CaseServiceClient/close_case.php | 71 ++ .../V2/CaseServiceClient/create_case.php | 77 ++ .../V2/CaseServiceClient/escalate_case.php | 77 ++ .../samples/V2/CaseServiceClient/get_case.php | 71 ++ .../V2/CaseServiceClient/list_cases.php | 80 ++ .../search_case_classifications.php | 71 ++ .../V2/CaseServiceClient/search_cases.php | 62 ++ .../V2/CaseServiceClient/update_case.php | 59 ++ .../CommentServiceClient/create_comment.php | 75 ++ .../V2/CommentServiceClient/get_comment.php | 100 +++ .../V2/CommentServiceClient/list_comments.php | 76 ++ .../create_support_event_subscription.php | 80 ++ .../delete_support_event_subscription.php | 76 ++ .../expunge_support_event_subscription.php | 104 +++ .../get_support_event_subscription.php | 76 ++ .../list_support_event_subscriptions.php | 77 ++ .../undelete_support_event_subscription.php | 76 ++ .../update_support_event_subscription.php | 74 ++ .../V2/Client/CaseAttachmentServiceClient.php | 409 ++++++++++ .../v2/src/V2/Client/CaseServiceClient.php | 542 +++++++++++++ .../v2/src/V2/Client/CommentServiceClient.php | 437 +++++++++++ .../SupportEventSubscriptionServiceClient.php | 480 ++++++++++++ .../Support/v2/src/V2/gapic_metadata.json | 145 ++++ ...case_attachment_service_client_config.json | 44 ++ ...e_attachment_service_descriptor_config.php | 68 ++ ..._attachment_service_rest_client_config.php | 57 ++ .../resources/case_service_client_config.json | 84 +++ .../case_service_descriptor_config.php | 148 ++++ .../case_service_rest_client_config.php | 161 ++++ .../comment_service_client_config.json | 59 ++ .../comment_service_descriptor_config.php | 80 ++ .../comment_service_rest_client_config.php | 76 ++ ...nt_subscription_service_client_config.json | 57 ++ ...subscription_service_descriptor_config.php | 125 +++ ...ubscription_service_rest_client_config.php | 111 +++ .../CaseAttachmentServiceClientTest.php | 241 ++++++ .../Unit/V2/Client/CaseServiceClientTest.php | 712 ++++++++++++++++++ .../V2/Client/CommentServiceClientTest.php | 316 ++++++++ ...portEventSubscriptionServiceClientTest.php | 584 ++++++++++++++ .../Google/Cloud/Support/V2Beta/Actor.php | 25 + .../Cloud/Support/V2Beta/Attachment.php | 28 + .../Support/V2Beta/AttachmentService.php | 29 + .../Cloud/Support/V2Beta/CaseService.php | 31 + .../Google/Cloud/Support/V2Beta/Comment.php | 28 + .../Cloud/Support/V2Beta/CommentService.php | 29 + .../Google/Cloud/Support/V2Beta/Content.php | 24 + .../Cloud/Support/V2Beta/EmailMessage.php | 29 + .../Cloud/Support/V2Beta/Escalation.php | 25 + .../Google/Cloud/Support/V2Beta/FeedItem.php | 29 + .../Cloud/Support/V2Beta/FeedService.php | 29 + .../Google/Cloud/Support/V2Beta/PBCase.php | 28 + .../V2Beta/SupportEventSubscription.php | 27 + .../SupportEventSubscriptionService.php | 31 + .../src/Google/Cloud/Support/V2beta/Actor.php | 222 ++++++ .../Cloud/Support/V2beta/Attachment.php | 267 +++++++ .../Support/V2beta/CaseClassification.php | 181 +++++ .../Cloud/Support/V2beta/CloseCaseRequest.php | 67 ++ .../Google/Cloud/Support/V2beta/Comment.php | 245 ++++++ .../Support/V2beta/CreateCaseRequest.php | 127 ++++ .../Support/V2beta/CreateCommentRequest.php | 127 ++++ .../CreateSupportEventSubscriptionRequest.php | 132 ++++ .../DeleteSupportEventSubscriptionRequest.php | 91 +++ .../Cloud/Support/V2beta/EmailMessage.php | 309 ++++++++ .../Support/V2beta/EscalateCaseRequest.php | 111 +++ .../Cloud/Support/V2beta/Escalation.php | 105 +++ .../Support/V2beta/Escalation/Reason.php | 69 ++ ...ExpungeSupportEventSubscriptionRequest.php | 91 +++ .../Google/Cloud/Support/V2beta/FeedItem.php | 221 ++++++ .../Support/V2beta/GetAttachmentRequest.php | 81 ++ .../Cloud/Support/V2beta/GetCaseRequest.php | 81 ++ .../Support/V2beta/GetCommentRequest.php | 81 ++ .../GetSupportEventSubscriptionRequest.php | 91 +++ .../Support/V2beta/ListAttachmentsRequest.php | 173 +++++ .../V2beta/ListAttachmentsResponse.php | 109 +++ .../Cloud/Support/V2beta/ListCasesRequest.php | 287 +++++++ .../Support/V2beta/ListCasesResponse.php | 113 +++ .../Support/V2beta/ListCommentsRequest.php | 153 ++++ .../Support/V2beta/ListCommentsResponse.php | 109 +++ .../ListSupportEventSubscriptionsRequest.php | 274 +++++++ .../ListSupportEventSubscriptionsResponse.php | 105 +++ .../Google/Cloud/Support/V2beta/PBCase.php | 654 ++++++++++++++++ .../Cloud/Support/V2beta/PBCase/Priority.php | 85 +++ .../Cloud/Support/V2beta/PBCase/State.php | 86 +++ .../Google/Cloud/Support/V2beta/Product.php | 67 ++ .../Cloud/Support/V2beta/ProductLine.php | 61 ++ .../SearchCaseClassificationsRequest.php | 191 +++++ .../SearchCaseClassificationsResponse.php | 109 +++ .../Support/V2beta/SearchCasesRequest.php | 317 ++++++++ .../Support/V2beta/SearchCasesResponse.php | 113 +++ .../Cloud/Support/V2beta/ShowFeedRequest.php | 208 +++++ .../Cloud/Support/V2beta/ShowFeedResponse.php | 109 +++ .../V2beta/SupportEventSubscription.php | 353 +++++++++ .../FailureReason.php | 70 ++ .../V2beta/SupportEventSubscription/State.php | 71 ++ .../Cloud/Support/V2beta/TextContent.php | 67 ++ ...ndeleteSupportEventSubscriptionRequest.php | 75 ++ .../Support/V2beta/UpdateCaseRequest.php | 167 ++++ .../UpdateSupportEventSubscriptionRequest.php | 146 ++++ .../get_attachment.php | 75 ++ .../list_attachments.php | 76 ++ .../V2beta/CaseServiceClient/close_case.php | 71 ++ .../V2beta/CaseServiceClient/create_case.php | 77 ++ .../CaseServiceClient/escalate_case.php | 77 ++ .../V2beta/CaseServiceClient/get_case.php | 71 ++ .../V2beta/CaseServiceClient/list_cases.php | 80 ++ .../search_case_classifications.php | 71 ++ .../V2beta/CaseServiceClient/search_cases.php | 62 ++ .../V2beta/CaseServiceClient/update_case.php | 59 ++ .../CommentServiceClient/create_comment.php | 75 ++ .../CommentServiceClient/get_comment.php | 71 ++ .../CommentServiceClient/list_comments.php | 76 ++ .../V2beta/FeedServiceClient/show_feed.php | 78 ++ .../create_support_event_subscription.php | 80 ++ .../delete_support_event_subscription.php | 76 ++ .../expunge_support_event_subscription.php | 104 +++ .../get_support_event_subscription.php | 76 ++ .../list_support_event_subscriptions.php | 77 ++ .../undelete_support_event_subscription.php | 76 ++ .../update_support_event_subscription.php | 74 ++ .../Client/CaseAttachmentServiceClient.php | 403 ++++++++++ .../src/V2beta/Client/CaseServiceClient.php | 576 ++++++++++++++ .../V2beta/Client/CommentServiceClient.php | 434 +++++++++++ .../src/V2beta/Client/FeedServiceClient.php | 306 ++++++++ .../SupportEventSubscriptionServiceClient.php | 506 +++++++++++++ .../v2beta/src/V2beta/gapic_metadata.json | 159 ++++ ...case_attachment_service_client_config.json | 44 ++ ...e_attachment_service_descriptor_config.php | 68 ++ ..._attachment_service_rest_client_config.php | 57 ++ .../resources/case_service_client_config.json | 84 +++ .../case_service_descriptor_config.php | 148 ++++ .../case_service_rest_client_config.php | 161 ++++ .../comment_service_client_config.json | 59 ++ .../comment_service_descriptor_config.php | 80 ++ .../comment_service_rest_client_config.php | 76 ++ .../resources/feed_service_client_config.json | 39 + .../feed_service_descriptor_config.php | 53 ++ .../feed_service_rest_client_config.php | 46 ++ ...nt_subscription_service_client_config.json | 57 ++ ...subscription_service_descriptor_config.php | 125 +++ ...ubscription_service_rest_client_config.php | 111 +++ .../CaseAttachmentServiceClientTest.php | 241 ++++++ .../V2beta/Client/CaseServiceClientTest.php | 712 ++++++++++++++++++ .../Client/CommentServiceClientTest.php | 316 ++++++++ .../V2beta/Client/FeedServiceClientTest.php | 172 +++++ ...portEventSubscriptionServiceClientTest.php | 584 ++++++++++++++ 195 files changed, 27135 insertions(+) create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CommentService.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php create mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php create mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php create mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php create mode 100644 owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php create mode 100644 owl-bot-staging/Support/v2/src/V2/gapic_metadata.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CommentService.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscriptionService.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Actor.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ExpungeSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php create mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php create mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php create mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php create mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php new file mode 100644 index 000000000000..6a81217bb838 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xE2\x02\x0A#google/cloud/support/v2/actor.proto\x12\x17google.cloud.support.v2\"d\x0A\x05Actor\x12\x14\x0A\x0Cdisplay_name\x18\x01 \x01(\x09\x12\x11\x0A\x05email\x18\x02 \x01(\x09B\x02\x18\x01\x12\x1B\x0A\x0Egoogle_support\x18\x04 \x01(\x08B\x03\xE0A\x03\x12\x15\x0A\x08username\x18\x05 \x01(\x09B\x03\xE0A\x03B\xB3\x01\x0A\x1Bcom.google.cloud.support.v2B\x0AActorProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php new file mode 100644 index 000000000000..5c8e5e22e383 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xEE\x05\x0A(google/cloud/support/v2/attachment.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A#google/cloud/support/v2/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x84\x03\x0A\x0AAttachment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x07creator\x18\x03 \x01(\x0B2\x1E.google.cloud.support.v2.ActorB\x03\xE0A\x03\x12\x10\x0A\x08filename\x18\x04 \x01(\x09\x12\x16\x0A\x09mime_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Asize_bytes\x18\x06 \x01(\x03B\x03\xE0A\x03:\xB0\x01\xEAA\xAC\x01\x0A&cloudsupport.googleapis.com/Attachment\x12Eorganizations/{organization}/cases/{case}/attachments/{attachment_id}\x12;projects/{project}/cases/{case}/attachments/{attachment_id}B\xB8\x01\x0A\x1Bcom.google.cloud.support.v2B\x0FAttachmentProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php new file mode 100644 index 000000000000..1516fd0052ef --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xC2\x09\x0A0google/cloud/support/v2/attachment_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A(google/cloud/support/v2/attachment.proto\"y\x0A\x16ListAttachmentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"T\x0A\x14GetAttachmentRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&cloudsupport.googleapis.com/Attachment\"l\x0A\x17ListAttachmentsResponse\x128\x0A\x0Battachments\x18\x01 \x03(\x0B2#.google.cloud.support.v2.Attachment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xEC\x03\x0A\x15CaseAttachmentService\x12\xE6\x01\x0A\x0FListAttachments\x12/.google.cloud.support.v2.ListAttachmentsRequest\x1A0.google.cloud.support.v2.ListAttachmentsResponse\"p\xDAA\x06parent\x82\xD3\xE4\x93\x02a\x12+/v2/{parent=projects/*/cases/*}/attachmentsZ2\x120/v2/{parent=organizations/*/cases/*}/attachments\x12\x98\x01\x0A\x0DGetAttachment\x12-.google.cloud.support.v2.GetAttachmentRequest\x1A#.google.cloud.support.v2.Attachment\"3\xDAA\x04name\x82\xD3\xE4\x93\x02&\x12\$/v2/{name=*/*/cases/*/attachments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xBF\x01\x0A\x1Bcom.google.cloud.support.v2B\x16AttachmentServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php new file mode 100644 index 000000000000..5a6996bec887 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\xB8\x19\x0A*google/cloud/support/v2/case_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\"google/cloud/support/v2/case.proto\x1A(google/cloud/support/v2/escalation.proto\x1A google/protobuf/field_mask.proto\"H\x0A\x0EGetCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"\x7F\x0A\x11CreateCaseRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x120\x0A\x04case\x18\x02 \x01(\x0B2\x1D.google.cloud.support.v2.CaseB\x03\xE0A\x02\"\x83\x01\x0A\x10ListCasesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\"Z\x0A\x11ListCasesResponse\x12,\x0A\x05cases\x18\x01 \x03(\x0B2\x1D.google.cloud.support.v2.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"Z\x0A\x12SearchCasesRequest\x12\x0E\x0A\x06parent\x18\x04 \x01(\x09\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\\\x0A\x13SearchCasesResponse\x12,\x0A\x05cases\x18\x01 \x03(\x0B2\x1D.google.cloud.support.v2.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x86\x01\x0A\x13EscalateCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x127\x0A\x0Aescalation\x18\x02 \x01(\x0B2#.google.cloud.support.v2.Escalation\"v\x0A\x11UpdateCaseRequest\x120\x0A\x04case\x18\x01 \x01(\x0B2\x1D.google.cloud.support.v2.CaseB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"J\x0A\x10CloseCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"X\x0A SearchCaseClassificationsRequest\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x87\x01\x0A!SearchCaseClassificationsResponse\x12I\x0A\x14case_classifications\x18\x01 \x03(\x0B2+.google.cloud.support.v2.CaseClassification\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xCF\x0C\x0A\x0BCaseService\x12\xA5\x01\x0A\x07GetCase\x12'.google.cloud.support.v2.GetCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"R\xDAA\x04name\x82\xD3\xE4\x93\x02E\x12\x1D/v2/{name=projects/*/cases/*}Z\$\x12\"/v2/{name=organizations/*/cases/*}\x12\xB8\x01\x0A\x09ListCases\x12).google.cloud.support.v2.ListCasesRequest\x1A*.google.cloud.support.v2.ListCasesResponse\"T\xDAA\x06parent\x82\xD3\xE4\x93\x02E\x12\x1D/v2/{parent=projects/*}/casesZ\$\x12\"/v2/{parent=organizations/*}/cases\x12\xC3\x01\x0A\x0BSearchCases\x12+.google.cloud.support.v2.SearchCasesRequest\x1A,.google.cloud.support.v2.SearchCasesResponse\"Y\x82\xD3\xE4\x93\x02S\x12\$/v2/{parent=projects/*}/cases:searchZ+\x12)/v2/{parent=organizations/*}/cases:search\x12\xBE\x01\x0A\x0ACreateCase\x12*.google.cloud.support.v2.CreateCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"e\xDAA\x0Bparent,case\x82\xD3\xE4\x93\x02Q\"\x1D/v2/{parent=projects/*}/cases:\x04caseZ*\"\"/v2/{parent=organizations/*}/cases:\x04case\x12\xCD\x01\x0A\x0AUpdateCase\x12*.google.cloud.support.v2.UpdateCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"t\xDAA\x10case,update_mask\x82\xD3\xE4\x93\x02[2\"/v2/{case.name=projects/*/cases/*}:\x04caseZ/2'/v2/{case.name=organizations/*/cases/*}:\x04case\x12\xC0\x01\x0A\x0CEscalateCase\x12,.google.cloud.support.v2.EscalateCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"c\x82\xD3\xE4\x93\x02]\"&/v2/{name=projects/*/cases/*}:escalate:\x01*Z0\"+/v2/{name=organizations/*/cases/*}:escalate:\x01*\x12\xB4\x01\x0A\x09CloseCase\x12).google.cloud.support.v2.CloseCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"]\x82\xD3\xE4\x93\x02W\"#/v2/{name=projects/*/cases/*}:close:\x01*Z-\"(/v2/{name=organizations/*/cases/*}:close:\x01*\x12\xBA\x01\x0A\x19SearchCaseClassifications\x129.google.cloud.support.v2.SearchCaseClassificationsRequest\x1A:.google.cloud.support.v2.SearchCaseClassificationsResponse\"&\x82\xD3\xE4\x93\x02 \x12\x1E/v2/caseClassifications:search\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xB9\x01\x0A\x1Bcom.google.cloud.support.v2B\x10CaseServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php new file mode 100644 index 000000000000..18113ad5b3a7 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xBB\x05\x0A%google/cloud/support/v2/comment.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A#google/cloud/support/v2/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xD7\x02\x0A\x07Comment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x07creator\x18\x03 \x01(\x0B2\x1E.google.cloud.support.v2.ActorB\x03\xE0A\x03\x12\x0C\x0A\x04body\x18\x04 \x01(\x09\x12\x1E\x0A\x0Fplain_text_body\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03:\x9B\x01\xEAA\x97\x01\x0A#cloudsupport.googleapis.com/Comment\x12internalAddGeneratedFile( + "\x0A\xFA\x0B\x0A-google/cloud/support/v2/comment_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A%google/cloud/support/v2/comment.proto\"v\x0A\x13ListCommentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\"c\x0A\x14ListCommentsResponse\x122\x0A\x08comments\x18\x01 \x03(\x0B2 .google.cloud.support.v2.Comment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x88\x01\x0A\x14CreateCommentRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x126\x0A\x07comment\x18\x02 \x01(\x0B2 .google.cloud.support.v2.CommentB\x03\xE0A\x02\"N\x0A\x11GetCommentRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#cloudsupport.googleapis.com/Comment2\xB4\x05\x0A\x0ECommentService\x12\xD7\x01\x0A\x0CListComments\x12,.google.cloud.support.v2.ListCommentsRequest\x1A-.google.cloud.support.v2.ListCommentsResponse\"j\xDAA\x06parent\x82\xD3\xE4\x93\x02[\x12(/v2/{parent=projects/*/cases/*}/commentsZ/\x12-/v2/{parent=organizations/*/cases/*}/comments\x12\xE7\x01\x0A\x0DCreateComment\x12-.google.cloud.support.v2.CreateCommentRequest\x1A .google.cloud.support.v2.Comment\"\x84\x01\xDAA\x0Eparent,comment\x82\xD3\xE4\x93\x02m\"(/v2/{parent=projects/*/cases/*}/comments:\x07commentZ8\"-/v2/{parent=organizations/*/cases/*}/comments:\x07comment\x12\x8C\x01\x0A\x0AGetComment\x12*.google.cloud.support.v2.GetCommentRequest\x1A .google.cloud.support.v2.Comment\"0\xDAA\x04name\x82\xD3\xE4\x93\x02#\x12!/v2/{name=*/*/cases/*/comments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xBC\x01\x0A\x1Bcom.google.cloud.support.v2B\x13CommentServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php new file mode 100644 index 000000000000..3fe62b602963 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xD7\x03\x0A(google/cloud/support/v2/escalation.proto\x12\x17google.cloud.support.v2\"\xCE\x01\x0A\x0AEscalation\x12?\x0A\x06reason\x18\x04 \x01(\x0E2*.google.cloud.support.v2.Escalation.ReasonB\x03\xE0A\x02\x12\x1A\x0A\x0Djustification\x18\x05 \x01(\x09B\x03\xE0A\x02\"c\x0A\x06Reason\x12\x16\x0A\x12REASON_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FRESOLUTION_TIME\x10\x01\x12\x17\x0A\x13TECHNICAL_EXPERTISE\x10\x02\x12\x13\x0A\x0FBUSINESS_IMPACT\x10\x03B\xB8\x01\x0A\x1Bcom.google.cloud.support.v2B\x0FEscalationProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php new file mode 100644 index 000000000000..a841b40ecb03 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xFC\x09\x0A\"google/cloud/support/v2/case.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A#google/cloud/support/v2/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE6\x06\x0A\x04Case\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x12C\x0A\x0Eclassification\x18\x04 \x01(\x0B2+.google.cloud.support.v2.CaseClassification\x12\x11\x0A\x09time_zone\x18\x08 \x01(\x09\x12\"\x0A\x1Asubscriber_email_addresses\x18\x09 \x03(\x09\x127\x0A\x05state\x18\x0C \x01(\x0E2#.google.cloud.support.v2.Case.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x0D \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0E \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12/\x0A\x07creator\x18\x0F \x01(\x0B2\x1E.google.cloud.support.v2.Actor\x12\x15\x0A\x0Dcontact_email\x18# \x01(\x09\x12\x11\x0A\x09escalated\x18\x11 \x01(\x08\x12\x11\x0A\x09test_case\x18\x13 \x01(\x08\x12\x15\x0A\x0Dlanguage_code\x18\x17 \x01(\x09\x128\x0A\x08priority\x18 \x01(\x0E2&.google.cloud.support.v2.Case.Priority\"\x7F\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03NEW\x10\x01\x12\x1E\x0A\x1AIN_PROGRESS_GOOGLE_SUPPORT\x10\x02\x12\x13\x0A\x0FACTION_REQUIRED\x10\x03\x12\x15\x0A\x11SOLUTION_PROVIDED\x10\x04\x12\x0A\x0A\x06CLOSED\x10\x05\"L\x0A\x08Priority\x12\x18\x0A\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02P0\x10\x01\x12\x06\x0A\x02P1\x10\x02\x12\x06\x0A\x02P2\x10\x03\x12\x06\x0A\x02P3\x10\x04\x12\x06\x0A\x02P4\x10\x05:q\xEAAn\x0A cloudsupport.googleapis.com/Case\x12)organizations/{organization}/cases/{case}\x12\x1Fprojects/{project}/cases/{case}\"6\x0A\x12CaseClassification\x12\x0A\x0A\x02id\x18\x03 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\xB2\x01\x0A\x1Bcom.google.cloud.support.v2B\x09CaseProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php new file mode 100644 index 000000000000..23e8067b0f15 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xA4\x09\x0A8google/cloud/support/v2/support_event_subscription.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xC1\x06\x0A\x18SupportEventSubscription\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1A\x0A\x0Dpub_sub_topic\x18\x02 \x01(\x09B\x03\xE0A\x02\x12K\x0A\x05state\x18\x03 \x01(\x0E27.google.cloud.support.v2.SupportEventSubscription.StateB\x03\xE0A\x03\x12\\\x0A\x0Efailure_reason\x18\x04 \x01(\x0E2?.google.cloud.support.v2.SupportEventSubscription.FailureReasonB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bdelete_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x123\x0A\x0Apurge_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"E\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07WORKING\x10\x01\x12\x0B\x0A\x07FAILING\x10\x02\x12\x0B\x0A\x07DELETED\x10\x03\"f\x0A\x0DFailureReason\x12\x1E\x0A\x1AFAILURE_REASON_UNSPECIFIED\x10\x00\x12\x15\x0A\x11PERMISSION_DENIED\x10\x01\x12\x13\x0A\x0FTOPIC_NOT_FOUND\x10\x02\x12\x09\x0A\x05OTHER\x10\x03:\xC4\x01\xEAA\xC0\x01\x0A4cloudsupport.googleapis.com/SupportEventSubscription\x12Sorganizations/{organization}/supportEventSubscriptions/{support_event_subscription}*\x19supportEventSubscriptions2\x18supportEventSubscriptionB\xC6\x01\x0A\x1Bcom.google.cloud.support.v2B\x1DSupportEventSubscriptionProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php new file mode 100644 index 000000000000..bf830fd0b677 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\xED\x1B\x0A@google/cloud/support/v2/support_event_subscription_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A8google/cloud/support/v2/support_event_subscription.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\"\xD1\x01\x0A%CreateSupportEventSubscriptionRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124cloudsupport.googleapis.com/SupportEventSubscription\x12Z\x0A\x1Asupport_event_subscription\x18\x02 \x01(\x0B21.google.cloud.support.v2.SupportEventSubscriptionB\x03\xE0A\x02\"p\x0A\"GetSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"\xD5\x01\x0A\$ListSupportEventSubscriptionsRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124cloudsupport.googleapis.com/SupportEventSubscription\x12\x13\x0A\x06filter\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x19\x0A\x0Cshow_deleted\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\"\x98\x01\x0A%ListSupportEventSubscriptionsResponse\x12V\x0A\x1Bsupport_event_subscriptions\x18\x01 \x03(\x0B21.google.cloud.support.v2.SupportEventSubscription\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xB9\x01\x0A%UpdateSupportEventSubscriptionRequest\x12Z\x0A\x1Asupport_event_subscription\x18\x01 \x01(\x0B21.google.cloud.support.v2.SupportEventSubscriptionB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"s\x0A%DeleteSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"u\x0A'UndeleteSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"t\x0A&ExpungeSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription2\x92\x0E\x0A\x1FSupportEventSubscriptionService\x12\x93\x02\x0A\x1ECreateSupportEventSubscription\x12>.google.cloud.support.v2.CreateSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"~\xDAA!parent,support_event_subscription\x82\xD3\xE4\x93\x02T\"6/v2/{parent=organizations/*}/supportEventSubscriptions:\x1Asupport_event_subscription\x12\xD4\x01\x0A\x1BGetSupportEventSubscription\x12;.google.cloud.support.v2.GetSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\x126/v2/{name=organizations/*/supportEventSubscriptions/*}\x12\xE7\x01\x0A\x1DListSupportEventSubscriptions\x12=.google.cloud.support.v2.ListSupportEventSubscriptionsRequest\x1A>.google.cloud.support.v2.ListSupportEventSubscriptionsResponse\"G\xDAA\x06parent\x82\xD3\xE4\x93\x028\x126/v2/{parent=organizations/*}/supportEventSubscriptions\x12\xB4\x02\x0A\x1EUpdateSupportEventSubscription\x12>.google.cloud.support.v2.UpdateSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"\x9E\x01\xDAA&support_event_subscription,update_mask\x82\xD3\xE4\x93\x02o2Q/v2/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}:\x1Asupport_event_subscription\x12\xDA\x01\x0A\x1EDeleteSupportEventSubscription\x12>.google.cloud.support.v2.DeleteSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"E\xDAA\x04name\x82\xD3\xE4\x93\x028*6/v2/{name=organizations/*/supportEventSubscriptions/*}\x12\xE3\x01\x0A UndeleteSupportEventSubscription\x12@.google.cloud.support.v2.UndeleteSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"J\x82\xD3\xE4\x93\x02D\"?/v2/{name=organizations/*/supportEventSubscriptions/*}:undelete:\x01*\x12\xCC\x01\x0A\x1FExpungeSupportEventSubscription\x12?.google.cloud.support.v2.ExpungeSupportEventSubscriptionRequest\x1A\x16.google.protobuf.Empty\"P\xDAA\x04name\x82\xD3\xE4\x93\x02C\">/v2/{name=organizations/*/supportEventSubscriptions/*}:expunge:\x01*\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Bcom.google.cloud.support.v2B\$SupportEventSubscriptionServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php new file mode 100644 index 000000000000..57386d9ba65c --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php @@ -0,0 +1,222 @@ +google.cloud.support.v2.Actor + */ +class Actor extends \Google\Protobuf\Internal\Message +{ + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * + * Generated from protobuf field string email = 2 [deprecated = true]; + * @deprecated + */ + protected $email = ''; + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_support = false; + /** + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * + * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $username = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * @type string $email + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * @type bool $google_support + * Output only. Whether the actor is a Google support actor. + * @type string $username + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\Actor::initOnce(); + parent::__construct($data); + } + + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * + * Generated from protobuf field string email = 2 [deprecated = true]; + * @return string + * @deprecated + */ + public function getEmail() + { + if ($this->email !== '') { + @trigger_error('email is deprecated.', E_USER_DEPRECATED); + } + return $this->email; + } + + /** + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * + * Generated from protobuf field string email = 2 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setEmail($var) + { + @trigger_error('email is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGoogleSupport() + { + return $this->google_support; + } + + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGoogleSupport($var) + { + GPBUtil::checkBool($var); + $this->google_support = $var; + + return $this; + } + + /** + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * + * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * + * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php new file mode 100644 index 000000000000..d6da92e2a525 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php @@ -0,0 +1,267 @@ +google.cloud.support.v2.Attachment + */ +class Attachment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The time at which the attachment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = null; + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + */ + protected $filename = ''; + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $mime_type = ''; + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. The resource name of the attachment. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the attachment was created. + * @type \Google\Cloud\Support\V2\Actor $creator + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * @type string $filename + * The filename of the attachment (e.g. `"graph.jpg"`). + * @type string $mime_type + * Output only. The MIME type of the attachment (e.g. text/plain). + * @type int|string $size_bytes + * Output only. The size of the attachment in bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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. The time at which the attachment was created. + * + * 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. The time at which the attachment was created. + * + * 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. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + * @return string + */ + public function getFilename() + { + return $this->filename; + } + + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + * @param string $var + * @return $this + */ + public function setFilename($var) + { + GPBUtil::checkString($var, True); + $this->filename = $var; + + return $this; + } + + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->size_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php new file mode 100644 index 000000000000..026ffb5c3278 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php @@ -0,0 +1,137 @@ +google.cloud.support.v2.CaseClassification + */ +class CaseClassification extends \Google\Protobuf\Internal\Message +{ + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * + * Generated from protobuf field string id = 3; + */ + protected $id = ''; + /** + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * @type string $display_name + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\PBCase::initOnce(); + parent::__construct($data); + } + + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * + * Generated from protobuf field string id = 3; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * + * Generated from protobuf field string id = 3; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * + * Generated from protobuf field string display_name = 4; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php new file mode 100644 index 000000000000..7a5f629348a4 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php @@ -0,0 +1,67 @@ +google.cloud.support.v2.CloseCaseRequest + */ +class CloseCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case to close. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the case to close. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case to close. + * + * 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 name of the case to close. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php new file mode 100644 index 000000000000..9aeb311e6952 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php @@ -0,0 +1,245 @@ +google.cloud.support.v2.Comment + */ +class Comment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. The resource name of the comment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The time when the comment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The user or Google Support agent who created the comment. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = null; + /** + * The full comment body. + * Maximum of 12800 characters. + * + * Generated from protobuf field string body = 4; + */ + protected $body = ''; + /** + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * + * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $plain_text_body = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. The resource name of the comment. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the comment was created. + * @type \Google\Cloud\Support\V2\Actor $creator + * Output only. The user or Google Support agent who created the comment. + * @type string $body + * The full comment body. + * Maximum of 12800 characters. + * @type string $plain_text_body + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\Comment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. The resource name of the comment. + * + * 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. The resource name of the comment. + * + * 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; + } + + /** + * Output only. The time when the comment was created. + * + * 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. The time when the comment was created. + * + * 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. The user or Google Support agent who created the comment. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * Output only. The user or Google Support agent who created the comment. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * The full comment body. + * Maximum of 12800 characters. + * + * Generated from protobuf field string body = 4; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * The full comment body. + * Maximum of 12800 characters. + * + * Generated from protobuf field string body = 4; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + + /** + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * + * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + * @deprecated + */ + public function getPlainTextBody() + { + if ($this->plain_text_body !== '') { + @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); + } + return $this->plain_text_body; + } + + /** + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * + * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + * @deprecated + */ + public function setPlainTextBody($var) + { + @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->plain_text_body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php new file mode 100644 index 000000000000..2df993059685 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php @@ -0,0 +1,127 @@ +google.cloud.support.v2.CreateCaseRequest + */ +class CreateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent under which the case should be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The case to be created. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $case = null; + + /** + * @param string $parent Required. The name of the parent under which the case should be created. Please see + * {@see CaseServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\Support\V2\PBCase $case Required. The case to be created. + * + * @return \Google\Cloud\Support\V2\CreateCaseRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2\PBCase $case): self + { + return (new self()) + ->setParent($parent) + ->setCase($case); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent under which the case should be created. + * @type \Google\Cloud\Support\V2\PBCase $case + * Required. The case to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent under which the case should be created. + * + * 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 name of the parent under which the case should be created. + * + * 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 case to be created. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\PBCase|null + */ + public function getCase() + { + return $this->case; + } + + public function hasCase() + { + return isset($this->case); + } + + public function clearCase() + { + unset($this->case); + } + + /** + * Required. The case to be created. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\PBCase $var + * @return $this + */ + public function setCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\PBCase::class); + $this->case = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php new file mode 100644 index 000000000000..192221045eb4 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php @@ -0,0 +1,127 @@ +google.cloud.support.v2.CreateCommentRequest + */ +class CreateCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case to which the comment should be added. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The comment to be added. + * + * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $comment = null; + + /** + * @param string $parent Required. The name of the case to which the comment should be added. Please see + * {@see CommentServiceClient::caseName()} for help formatting this field. + * @param \Google\Cloud\Support\V2\Comment $comment Required. The comment to be added. + * + * @return \Google\Cloud\Support\V2\CreateCommentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2\Comment $comment): self + { + return (new self()) + ->setParent($parent) + ->setComment($comment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the case to which the comment should be added. + * @type \Google\Cloud\Support\V2\Comment $comment + * Required. The comment to be added. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case to which the comment should be added. + * + * 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 name of the case to which the comment should be added. + * + * 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 comment to be added. + * + * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\Comment|null + */ + public function getComment() + { + return $this->comment; + } + + public function hasComment() + { + return isset($this->comment); + } + + public function clearComment() + { + unset($this->comment); + } + + /** + * Required. The comment to be added. + * + * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\Comment $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Comment::class); + $this->comment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..0ec88c1c9e3f --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php @@ -0,0 +1,132 @@ +google.cloud.support.v2.CreateSupportEventSubscriptionRequest + */ +class CreateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Pub/Sub configuration to create. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $support_event_subscription = null; + + /** + * @param string $parent Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_id} + * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. + * @param \Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription Required. The Pub/Sub configuration to create. + * + * @return \Google\Cloud\Support\V2\CreateSupportEventSubscriptionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription): self + { + return (new self()) + ->setParent($parent) + ->setSupportEventSubscription($supportEventSubscription); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_id} + * @type \Google\Cloud\Support\V2\SupportEventSubscription $support_event_subscription + * Required. The Pub/Sub configuration to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_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 parent resource name where the support event subscription + * will be created. Format: organizations/{organization_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 Pub/Sub configuration to create. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\SupportEventSubscription|null + */ + public function getSupportEventSubscription() + { + return $this->support_event_subscription; + } + + public function hasSupportEventSubscription() + { + return isset($this->support_event_subscription); + } + + public function clearSupportEventSubscription() + { + unset($this->support_event_subscription); + } + + /** + * Required. The Pub/Sub configuration to create. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\SupportEventSubscription $var + * @return $this + */ + public function setSupportEventSubscription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\SupportEventSubscription::class); + $this->support_event_subscription = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..3ee310ad6372 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php @@ -0,0 +1,91 @@ +google.cloud.support.v2.DeleteSupportEventSubscriptionRequest + */ +class DeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\DeleteSupportEventSubscriptionRequest + * + * @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 name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php new file mode 100644 index 000000000000..bf49626249e1 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php @@ -0,0 +1,111 @@ +google.cloud.support.v2.EscalateCaseRequest + */ +class EscalateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case to be escalated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The escalation information to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; + */ + protected $escalation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the case to be escalated. + * @type \Google\Cloud\Support\V2\Escalation $escalation + * The escalation information to be sent with the escalation request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case to be escalated. + * + * 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 name of the case to be escalated. + * + * 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; + } + + /** + * The escalation information to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; + * @return \Google\Cloud\Support\V2\Escalation|null + */ + public function getEscalation() + { + return $this->escalation; + } + + public function hasEscalation() + { + return isset($this->escalation); + } + + public function clearEscalation() + { + unset($this->escalation); + } + + /** + * The escalation information to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; + * @param \Google\Cloud\Support\V2\Escalation $var + * @return $this + */ + public function setEscalation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Escalation::class); + $this->escalation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php new file mode 100644 index 000000000000..b91391678282 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php @@ -0,0 +1,105 @@ +google.cloud.support.v2.Escalation + */ +class Escalation extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reason = 0; + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $justification = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $reason + * Required. The reason why the Case is being escalated. + * @type string $justification + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\Escalation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReason() + { + return $this->reason; + } + + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\Escalation\Reason::class); + $this->reason = $var; + + return $this; + } + + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getJustification() + { + return $this->justification; + } + + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setJustification($var) + { + GPBUtil::checkString($var, True); + $this->justification = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php new file mode 100644 index 000000000000..eeb6557770a8 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php @@ -0,0 +1,69 @@ +google.cloud.support.v2.Escalation.Reason + */ +class Reason +{ + /** + * The escalation reason is in an unknown state or has not been specified. + * + * Generated from protobuf enum REASON_UNSPECIFIED = 0; + */ + const REASON_UNSPECIFIED = 0; + /** + * The case is taking too long to resolve. + * + * Generated from protobuf enum RESOLUTION_TIME = 1; + */ + const RESOLUTION_TIME = 1; + /** + * The support agent does not have the expertise required to successfully + * resolve the issue. + * + * Generated from protobuf enum TECHNICAL_EXPERTISE = 2; + */ + const TECHNICAL_EXPERTISE = 2; + /** + * The issue is having a significant business impact. + * + * Generated from protobuf enum BUSINESS_IMPACT = 3; + */ + const BUSINESS_IMPACT = 3; + + private static $valueToName = [ + self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', + self::RESOLUTION_TIME => 'RESOLUTION_TIME', + self::TECHNICAL_EXPERTISE => 'TECHNICAL_EXPERTISE', + self::BUSINESS_IMPACT => 'BUSINESS_IMPACT', + ]; + + 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/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..d7899204f5f3 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php @@ -0,0 +1,91 @@ +google.cloud.support.v2.ExpungeSupportEventSubscriptionRequest + */ +class ExpungeSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ExpungeSupportEventSubscriptionRequest + * + * @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 name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php new file mode 100644 index 000000000000..df615006a628 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2.GetAttachmentRequest + */ +class GetAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the attachment to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the attachment to get. Please see + * {@see CaseAttachmentServiceClient::attachmentName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\GetAttachmentRequest + * + * @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 name of the attachment to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the attachment to get. + * + * 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 name of the attachment to get. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php new file mode 100644 index 000000000000..3ea4719976be --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2.GetCaseRequest + */ +class GetCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of a case to be retrieved. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full name of a case to be retrieved. Please see + * {@see CaseServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\GetCaseRequest + * + * @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 full name of a case to be retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of a case to be retrieved. + * + * 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 full name of a case to be retrieved. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php new file mode 100644 index 000000000000..d2544235252a --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2.GetCommentRequest + */ +class GetCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the comment to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the comment to retrieve. Please see + * {@see CommentServiceClient::commentName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\GetCommentRequest + * + * @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 name of the comment to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the comment to retrieve. + * + * 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 name of the comment to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..b11239ed6f1a --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php @@ -0,0 +1,91 @@ +google.cloud.support.v2.GetSupportEventSubscriptionRequest + */ +class GetSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\GetSupportEventSubscriptionRequest + * + * @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 name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php new file mode 100644 index 000000000000..a7c951278243 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php @@ -0,0 +1,173 @@ +google.cloud.support.v2.ListAttachmentsRequest + */ +class ListAttachmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case for which attachments should be listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the case for which attachments should be listed. Please see + * {@see CaseAttachmentServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ListAttachmentsRequest + * + * @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 name of the case for which attachments should be listed. + * @type int $page_size + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case for which attachments should be listed. + * + * 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 name of the case for which attachments should be listed. + * + * 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; + } + + /** + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @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/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php new file mode 100644 index 000000000000..9336b1b9d73d --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2.ListAttachmentsResponse + */ +class ListAttachmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of attachments associated with a case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; + */ + private $attachments; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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\Support\V2\Attachment[] $attachments + * The list of attachments associated with a case. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * The list of attachments associated with a case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; + * @return RepeatedField<\Google\Cloud\Support\V2\Attachment> + */ + public function getAttachments() + { + return $this->attachments; + } + + /** + * The list of attachments associated with a case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; + * @param \Google\Cloud\Support\V2\Attachment[] $var + * @return $this + */ + public function setAttachments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\Attachment::class); + $this->attachments = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php new file mode 100644 index 000000000000..fb33eba6e001 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php @@ -0,0 +1,239 @@ +google.cloud.support.v2.ListCasesRequest + */ +class ListCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of a parent to list cases under. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of a parent to list cases under. Please see + * {@see CaseServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ListCasesRequest + * + * @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 name of a parent to list cases under. + * @type string $filter + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * @type int $page_size + * The maximum number of cases fetched with each request. Defaults to 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of a parent to list cases under. + * + * 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 name of a parent to list cases under. + * + * 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; + } + + /** + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + * @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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php new file mode 100644 index 000000000000..497f1d847c23 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php @@ -0,0 +1,113 @@ +google.cloud.support.v2.ListCasesResponse + */ +class ListCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + */ + private $cases; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * + * 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\Support\V2\PBCase[] $cases + * The list of cases associated with the parent after any + * filters have been applied. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + * @return RepeatedField<\Google\Cloud\Support\V2\PBCase> + */ + public function getCases() + { + return $this->cases; + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + * @param \Google\Cloud\Support\V2\PBCase[] $var + * @return $this + */ + public function setCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\PBCase::class); + $this->cases = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php new file mode 100644 index 000000000000..cdbbfb140003 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php @@ -0,0 +1,153 @@ +google.cloud.support.v2.ListCommentsRequest + */ +class ListCommentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case for which to list comments. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of comments to fetch. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the case for which to list comments. Please see + * {@see CommentServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ListCommentsRequest + * + * @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 name of the case for which to list comments. + * @type int $page_size + * The maximum number of comments to fetch. Defaults to 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case for which to list comments. + * + * 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 name of the case for which to list comments. + * + * 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; + } + + /** + * The maximum number of comments to fetch. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of comments to fetch. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * + * Generated from protobuf field string page_token = 5; + * @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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php new file mode 100644 index 000000000000..a1e1e711abce --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2.ListCommentsResponse + */ +class ListCommentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of the comments associated with the case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; + */ + private $comments; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * + * 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\Support\V2\Comment[] $comments + * List of the comments associated with the case. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * List of the comments associated with the case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; + * @return RepeatedField<\Google\Cloud\Support\V2\Comment> + */ + public function getComments() + { + return $this->comments; + } + + /** + * List of the comments associated with the case. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; + * @param \Google\Cloud\Support\V2\Comment[] $var + * @return $this + */ + public function setComments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\Comment::class); + $this->comments = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php new file mode 100644 index 000000000000..f4c0087d1a5a --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php @@ -0,0 +1,274 @@ +google.cloud.support.v2.ListSupportEventSubscriptionsRequest + */ +class ListSupportEventSubscriptionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * + * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_deleted = false; + /** + * Optional. The maximum number of support event subscriptions to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_id} + * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2\ListSupportEventSubscriptionsRequest + * + * @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 fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_id} + * @type string $filter + * Optional. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * @type bool $show_deleted + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * @type int $page_size + * Optional. The maximum number of support event subscriptions to return. + * @type string $page_token + * Optional. A token identifying the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_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 fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_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. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * + * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * + * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + + /** + * Optional. The maximum number of support event subscriptions to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of support event subscriptions to return. + * + * 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 the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * + * 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 the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php new file mode 100644 index 000000000000..5b05a2a149f1 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.support.v2.ListSupportEventSubscriptionsResponse + */ +class ListSupportEventSubscriptionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The support event subscriptions. + * + * Generated from protobuf field repeated .google.cloud.support.v2.SupportEventSubscription support_event_subscriptions = 1; + */ + private $support_event_subscriptions; + /** + * A token, which can be sent 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\Support\V2\SupportEventSubscription[] $support_event_subscriptions + * The support event subscriptions. + * @type string $next_page_token + * A token, which can be sent 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\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * The support event subscriptions. + * + * Generated from protobuf field repeated .google.cloud.support.v2.SupportEventSubscription support_event_subscriptions = 1; + * @return RepeatedField<\Google\Cloud\Support\V2\SupportEventSubscription> + */ + public function getSupportEventSubscriptions() + { + return $this->support_event_subscriptions; + } + + /** + * The support event subscriptions. + * + * Generated from protobuf field repeated .google.cloud.support.v2.SupportEventSubscription support_event_subscriptions = 1; + * @param \Google\Cloud\Support\V2\SupportEventSubscription[] $var + * @return $this + */ + public function setSupportEventSubscriptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\SupportEventSubscription::class); + $this->support_event_subscriptions = $arr; + + return $this; + } + + /** + * A token, which can be sent 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, which can be sent 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/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php new file mode 100644 index 000000000000..b52e863e405a --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php @@ -0,0 +1,654 @@ +google.cloud.support.v2.Case + */ +class PBCase extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name for the case. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; + */ + protected $classification = null; + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + */ + protected $time_zone = ''; + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + */ + private $subscriber_email_addresses; + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; + */ + protected $creator = null; + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + */ + protected $contact_email = ''; + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + */ + protected $escalated = false; + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + */ + protected $test_case = false; + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + */ + protected $language_code = ''; + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; + */ + protected $priority = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name for the case. + * @type string $display_name + * The short summary of the issue reported in this case. + * @type string $description + * A broad description of the issue. + * @type \Google\Cloud\Support\V2\CaseClassification $classification + * The issue classification applicable to this case. + * @type string $time_zone + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * @type string[] $subscriber_email_addresses + * The email addresses to receive updates on this case. + * @type int $state + * Output only. The current status of the support case. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time this case was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time this case was last updated. + * @type \Google\Cloud\Support\V2\Actor $creator + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * @type string $contact_email + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * @type bool $escalated + * Whether the case is currently escalated. + * @type bool $test_case + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * @type string $language_code + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * @type int $priority + * The priority of this case. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\PBCase::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name for the case. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name for the case. + * + * 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; + } + + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; + * @return \Google\Cloud\Support\V2\CaseClassification|null + */ + public function getClassification() + { + return $this->classification; + } + + public function hasClassification() + { + return isset($this->classification); + } + + public function clearClassification() + { + unset($this->classification); + } + + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; + * @param \Google\Cloud\Support\V2\CaseClassification $var + * @return $this + */ + public function setClassification($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\CaseClassification::class); + $this->classification = $var; + + return $this; + } + + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + * @return RepeatedField + */ + public function getSubscriberEmailAddresses() + { + return $this->subscriber_email_addresses; + } + + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + * @param string[] $var + * @return $this + */ + public function setSubscriberEmailAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->subscriber_email_addresses = $arr; + + return $this; + } + + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\PBCase\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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. The time this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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; + } + + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; + * @return \Google\Cloud\Support\V2\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; + * @param \Google\Cloud\Support\V2\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + * @return string + */ + public function getContactEmail() + { + return $this->contact_email; + } + + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + * @param string $var + * @return $this + */ + public function setContactEmail($var) + { + GPBUtil::checkString($var, True); + $this->contact_email = $var; + + return $this; + } + + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + * @return bool + */ + public function getEscalated() + { + return $this->escalated; + } + + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + * @param bool $var + * @return $this + */ + public function setEscalated($var) + { + GPBUtil::checkBool($var); + $this->escalated = $var; + + return $this; + } + + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + * @return bool + */ + public function getTestCase() + { + return $this->test_case; + } + + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + * @param bool $var + * @return $this + */ + public function setTestCase($var) + { + GPBUtil::checkBool($var); + $this->test_case = $var; + + return $this; + } + + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\PBCase\Priority::class); + $this->priority = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php new file mode 100644 index 000000000000..617441f6d2b3 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php @@ -0,0 +1,85 @@ +google.cloud.support.v2.Case.Priority + */ +class Priority +{ + /** + * Priority is undefined or has not been set yet. + * + * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; + */ + const PRIORITY_UNSPECIFIED = 0; + /** + * Extreme impact on a production service. Service is hard down. + * + * Generated from protobuf enum P0 = 1; + */ + const P0 = 1; + /** + * Critical impact on a production service. Service is currently unusable. + * + * Generated from protobuf enum P1 = 2; + */ + const P1 = 2; + /** + * Severe impact on a production service. Service is usable but greatly + * impaired. + * + * Generated from protobuf enum P2 = 3; + */ + const P2 = 3; + /** + * Medium impact on a production service. Service is available, but + * moderately impaired. + * + * Generated from protobuf enum P3 = 4; + */ + const P3 = 4; + /** + * General questions or minor issues. Production service is fully + * available. + * + * Generated from protobuf enum P4 = 5; + */ + const P4 = 5; + + private static $valueToName = [ + self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', + self::P0 => 'P0', + self::P1 => 'P1', + self::P2 => 'P2', + self::P3 => 'P3', + self::P4 => 'P4', + ]; + + 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/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php new file mode 100644 index 000000000000..9a4a8304d949 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php @@ -0,0 +1,86 @@ +google.cloud.support.v2.Case.State + */ +class State +{ + /** + * Case is in an unknown state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The case has been created but no one is assigned to work on it yet. + * + * Generated from protobuf enum NEW = 1; + */ + const PBNEW = 1; + /** + * The case is currently being handled by Google support. + * + * Generated from protobuf enum IN_PROGRESS_GOOGLE_SUPPORT = 2; + */ + const IN_PROGRESS_GOOGLE_SUPPORT = 2; + /** + * Google is waiting for a response. + * + * Generated from protobuf enum ACTION_REQUIRED = 3; + */ + const ACTION_REQUIRED = 3; + /** + * A solution has been offered for the case, but it isn't yet closed. + * + * Generated from protobuf enum SOLUTION_PROVIDED = 4; + */ + const SOLUTION_PROVIDED = 4; + /** + * The case has been resolved. + * + * Generated from protobuf enum CLOSED = 5; + */ + const CLOSED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PBNEW => 'NEW', + self::IN_PROGRESS_GOOGLE_SUPPORT => 'IN_PROGRESS_GOOGLE_SUPPORT', + self::ACTION_REQUIRED => 'ACTION_REQUIRED', + self::SOLUTION_PROVIDED => 'SOLUTION_PROVIDED', + 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)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php new file mode 100644 index 000000000000..b2951a27d2b8 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php @@ -0,0 +1,147 @@ +google.cloud.support.v2.SearchCaseClassificationsRequest + */ +class SearchCaseClassificationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + /** + * The maximum number of classifications fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * @type int $page_size + * The maximum number of classifications fetched with each request. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The maximum number of classifications fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of classifications fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php new file mode 100644 index 000000000000..01ddd091da7e --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2.SearchCaseClassificationsResponse + */ +class SearchCaseClassificationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; + */ + private $case_classifications; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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\Support\V2\CaseClassification[] $case_classifications + * The classifications retrieved. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; + * @return RepeatedField<\Google\Cloud\Support\V2\CaseClassification> + */ + public function getCaseClassifications() + { + return $this->case_classifications; + } + + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; + * @param \Google\Cloud\Support\V2\CaseClassification[] $var + * @return $this + */ + public function setCaseClassifications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\CaseClassification::class); + $this->case_classifications = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php new file mode 100644 index 000000000000..7fee30e6b0e2 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php @@ -0,0 +1,317 @@ +google.cloud.support.v2.SearchCasesRequest + */ +class SearchCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the parent resource to search for cases under. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + /** + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The name of the parent resource to search for cases under. + * @type string $query + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * @type int $page_size + * The maximum number of cases fetched with each request. The default page + * size is 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the parent resource to search for cases under. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The name of the parent resource to search for cases under. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php new file mode 100644 index 000000000000..d8dbd382a842 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php @@ -0,0 +1,113 @@ +google.cloud.support.v2.SearchCasesResponse + */ +class SearchCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + */ + private $cases; + /** + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * + * 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\Support\V2\PBCase[] $cases + * The list of cases associated with the parent after any + * filters have been applied. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + * @return RepeatedField<\Google\Cloud\Support\V2\PBCase> + */ + public function getCases() + { + return $this->cases; + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; + * @param \Google\Cloud\Support\V2\PBCase[] $var + * @return $this + */ + public function setCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\PBCase::class); + $this->cases = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * + * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php new file mode 100644 index 000000000000..7cd1a7511a20 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php @@ -0,0 +1,353 @@ +google.cloud.support.v2.SupportEventSubscription + */ +class SupportEventSubscription extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the support event subscription. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * + * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pub_sub_topic = ''; + /** + * Output only. The state of the subscription. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failure_reason = 0; + /** + * Output only. The time at which the subscription was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which the subscription was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The time at which the subscription was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. The time at which the subscription will be purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $purge_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the support event subscription. + * @type string $pub_sub_topic + * Required. The name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * @type int $state + * Output only. The state of the subscription. + * @type int $failure_reason + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the subscription was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which the subscription was last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The time at which the subscription was deleted. + * @type \Google\Protobuf\Timestamp $purge_time + * Output only. The time at which the subscription will be purged. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscription::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the support event subscription. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the support event subscription. + * + * 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 name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * + * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPubSubTopic() + { + return $this->pub_sub_topic; + } + + /** + * Required. The name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * + * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPubSubTopic($var) + { + GPBUtil::checkString($var, True); + $this->pub_sub_topic = $var; + + return $this; + } + + /** + * Output only. The state of the subscription. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the subscription. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\SupportEventSubscription\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFailureReason() + { + return $this->failure_reason; + } + + /** + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFailureReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\SupportEventSubscription\FailureReason::class); + $this->failure_reason = $var; + + return $this; + } + + /** + * Output only. The time at which the subscription was created. + * + * 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. The time at which the subscription was created. + * + * 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. The time at which the subscription was last updated. + * + * 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. The time at which the subscription was last updated. + * + * 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. The time at which the subscription was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The time at which the subscription was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. The time at which the subscription will be purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPurgeTime() + { + return $this->purge_time; + } + + public function hasPurgeTime() + { + return isset($this->purge_time); + } + + public function clearPurgeTime() + { + unset($this->purge_time); + } + + /** + * Output only. The time at which the subscription will be purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPurgeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->purge_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php new file mode 100644 index 000000000000..d0e213d58cfa --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php @@ -0,0 +1,70 @@ +google.cloud.support.v2.SupportEventSubscription.FailureReason + */ +class FailureReason +{ + /** + * Unspecified failure reason. + * + * Generated from protobuf enum FAILURE_REASON_UNSPECIFIED = 0; + */ + const FAILURE_REASON_UNSPECIFIED = 0; + /** + * The service account (i.e. + * cloud-support-apievents\@system.gserviceaccount.com) lacks the permission + * to publish to the customer's Pub/Sub topic. + * + * Generated from protobuf enum PERMISSION_DENIED = 1; + */ + const PERMISSION_DENIED = 1; + /** + * The specified Pub/Sub topic does not exist. + * + * Generated from protobuf enum TOPIC_NOT_FOUND = 2; + */ + const TOPIC_NOT_FOUND = 2; + /** + * Message failed to publish due to a system-side error. + * + * Generated from protobuf enum OTHER = 3; + */ + const OTHER = 3; + + private static $valueToName = [ + self::FAILURE_REASON_UNSPECIFIED => 'FAILURE_REASON_UNSPECIFIED', + self::PERMISSION_DENIED => 'PERMISSION_DENIED', + self::TOPIC_NOT_FOUND => 'TOPIC_NOT_FOUND', + self::OTHER => 'OTHER', + ]; + + 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/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php new file mode 100644 index 000000000000..a06e2d1706c0 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php @@ -0,0 +1,71 @@ +google.cloud.support.v2.SupportEventSubscription.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Subscription is active and working. + * + * Generated from protobuf enum WORKING = 1; + */ + const WORKING = 1; + /** + * Subscription is failing. Notifications cannot be published for some + * reason. + * + * Generated from protobuf enum FAILING = 2; + */ + const FAILING = 2; + /** + * Subscription has been deleted and is pending purge. Notifications are not + * sent for deleted subscriptions. Deleted subscriptions are purged after + * their `purge_time` has passed. + * + * Generated from protobuf enum DELETED = 3; + */ + const DELETED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::WORKING => 'WORKING', + self::FAILING => 'FAILING', + 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/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..3277fa4eab91 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php @@ -0,0 +1,75 @@ +google.cloud.support.v2.UndeleteSupportEventSubscriptionRequest + */ +class UndeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php new file mode 100644 index 000000000000..7927f7822642 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php @@ -0,0 +1,167 @@ +google.cloud.support.v2.UpdateCaseRequest + */ +class UpdateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The case to update. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $case = null; + /** + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Support\V2\PBCase $case Required. The case to update. + * @param \Google\Protobuf\FieldMask $updateMask A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * @return \Google\Cloud\Support\V2\UpdateCaseRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Support\V2\PBCase $case, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCase($case) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Support\V2\PBCase $case + * Required. The case to update. + * @type \Google\Protobuf\FieldMask $update_mask + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The case to update. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\PBCase|null + */ + public function getCase() + { + return $this->case; + } + + public function hasCase() + { + return isset($this->case); + } + + public function clearCase() + { + unset($this->case); + } + + /** + * Required. The case to update. + * + * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\PBCase $var + * @return $this + */ + public function setCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\PBCase::class); + $this->case = $var; + + return $this; + } + + /** + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @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); + } + + /** + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @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/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..b6193ba06d07 --- /dev/null +++ b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php @@ -0,0 +1,146 @@ +google.cloud.support.v2.UpdateSupportEventSubscriptionRequest + */ +class UpdateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $support_event_subscription = null; + /** + * Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * @return \Google\Cloud\Support\V2\UpdateSupportEventSubscriptionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSupportEventSubscription($supportEventSubscription) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Support\V2\SupportEventSubscription $support_event_subscription + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2\SupportEventSubscription|null + */ + public function getSupportEventSubscription() + { + return $this->support_event_subscription; + } + + public function hasSupportEventSubscription() + { + return isset($this->support_event_subscription); + } + + public function clearSupportEventSubscription() + { + unset($this->support_event_subscription); + } + + /** + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * + * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2\SupportEventSubscription $var + * @return $this + */ + public function setSupportEventSubscription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\SupportEventSubscription::class); + $this->support_event_subscription = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * 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. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * 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/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php new file mode 100644 index 000000000000..046a8aedb81e --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php @@ -0,0 +1,105 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Attachment $response */ + $response = $caseAttachmentServiceClient->getAttachment($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 = CaseAttachmentServiceClient::attachmentName( + '[ORGANIZATION]', + '[CASE]', + '[ATTACHMENT_ID]' + ); + + get_attachment_sample($formattedName); +} +// [END cloudsupport_v2_generated_CaseAttachmentService_GetAttachment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php new file mode 100644 index 000000000000..2f5f6c15522a --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseAttachmentServiceClient->listAttachments($request); + + /** @var Attachment $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 = CaseAttachmentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + list_attachments_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CaseAttachmentService_ListAttachments_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php new file mode 100644 index 000000000000..abe7fa02e037 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->closeCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + close_case_sample($formattedName); +} +// [END cloudsupport_v2_generated_CaseService_CloseCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php new file mode 100644 index 000000000000..bfa24805b97a --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setCase($case); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->createCase($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 +{ + $formattedParent = CaseServiceClient::projectName('[PROJECT]'); + + create_case_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CaseService_CreateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php new file mode 100644 index 000000000000..ff978d1bbba7 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->escalateCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + escalate_case_sample($formattedName); +} +// [END cloudsupport_v2_generated_CaseService_EscalateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php new file mode 100644 index 000000000000..c74fae332e8e --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->getCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + get_case_sample($formattedName); +} +// [END cloudsupport_v2_generated_CaseService_GetCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php new file mode 100644 index 000000000000..7889879da0e0 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseServiceClient->listCases($request); + + /** @var PBCase $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 = CaseServiceClient::projectName('[PROJECT]'); + + list_cases_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CaseService_ListCases_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php new file mode 100644 index 000000000000..6531ad0432f3 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php @@ -0,0 +1,71 @@ + "`. For example, + * `"Technical Issue > Compute > Compute Engine"`. + * + * Classification IDs returned by this endpoint are valid for at least six + * months. When a classification is deactivated, this endpoint immediately + * stops returning it. After six months, `case.create` requests using the + * classification will fail. + * + * 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 search_case_classifications_sample(): void +{ + // Create a client. + $caseServiceClient = new CaseServiceClient(); + + // Prepare the request message. + $request = new SearchCaseClassificationsRequest(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseServiceClient->searchCaseClassifications($request); + + /** @var CaseClassification $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 cloudsupport_v2_generated_CaseService_SearchCaseClassifications_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php new file mode 100644 index 000000000000..42e3e2f444e0 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php @@ -0,0 +1,62 @@ +searchCases($request); + + /** @var PBCase $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 cloudsupport_v2_generated_CaseService_SearchCases_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php new file mode 100644 index 000000000000..b723593f103a --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php @@ -0,0 +1,59 @@ +setCase($case); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->updateCase($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudsupport_v2_generated_CaseService_UpdateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php new file mode 100644 index 000000000000..36bf38f2e93a --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php @@ -0,0 +1,75 @@ +setParent($formattedParent) + ->setComment($comment); + + // Call the API and handle any network failures. + try { + /** @var Comment $response */ + $response = $commentServiceClient->createComment($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 +{ + $formattedParent = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + create_comment_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CommentService_CreateComment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php new file mode 100644 index 000000000000..10ebea221aa6 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php @@ -0,0 +1,100 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Comment $response */ + $response = $commentServiceClient->getComment($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 = CommentServiceClient::commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); + + get_comment_sample($formattedName); +} +// [END cloudsupport_v2_generated_CommentService_GetComment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php new file mode 100644 index 000000000000..cbfe58d206e6 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $commentServiceClient->listComments($request); + + /** @var Comment $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 = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + list_comments_sample($formattedParent); +} +// [END cloudsupport_v2_generated_CommentService_ListComments_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php new file mode 100644 index 000000000000..16786c58af00 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php @@ -0,0 +1,80 @@ +setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->createSupportEventSubscription($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 +{ + $formattedParent = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); + $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; + + create_support_event_subscription_sample($formattedParent, $supportEventSubscriptionPubSubTopic); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_CreateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php new file mode 100644 index 000000000000..f7263d70ab14 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->deleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + delete_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_DeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php new file mode 100644 index 000000000000..3bfbb93c382a --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php @@ -0,0 +1,104 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $supportEventSubscriptionServiceClient->expungeSupportEventSubscription($request); + printf('Call completed successfully.' . PHP_EOL); + } 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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + expunge_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_ExpungeSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php new file mode 100644 index 000000000000..e8bdfd53d627 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->getSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + get_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_GetSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php new file mode 100644 index 000000000000..828bdacb0a68 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $supportEventSubscriptionServiceClient->listSupportEventSubscriptions($request); + + /** @var SupportEventSubscription $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 = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); + + list_support_event_subscriptions_sample($formattedParent); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_ListSupportEventSubscriptions_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php new file mode 100644 index 000000000000..0153eb19d132 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->undeleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + undelete_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_UndeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php new file mode 100644 index 000000000000..f7084b7cc9b4 --- /dev/null +++ b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php @@ -0,0 +1,74 @@ +setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new UpdateSupportEventSubscriptionRequest()) + ->setSupportEventSubscription($supportEventSubscription); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->updateSupportEventSubscription($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 +{ + $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; + + update_support_event_subscription_sample($supportEventSubscriptionPubSubTopic); +} +// [END cloudsupport_v2_generated_SupportEventSubscriptionService_UpdateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php new file mode 100644 index 000000000000..8cdb4af45028 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php @@ -0,0 +1,409 @@ + getAttachmentAsync(GetAttachmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAttachmentsAsync(ListAttachmentsRequest $request, array $optionalArgs = []) + */ +final class CaseAttachmentServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2.CaseAttachmentService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/case_attachment_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/case_attachment_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/case_attachment_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/case_attachment_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a attachment + * resource. + * + * @param string $organization + * @param string $case + * @param string $attachmentId + * + * @return string The formatted attachment resource. + */ + public static function attachmentName(string $organization, string $case, string $attachmentId): string + { + return self::getPathTemplate('attachment')->render([ + 'organization' => $organization, + 'case' => $case, + 'attachment_id' => $attachmentId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case_attachment_id resource. + * + * @param string $organization + * @param string $case + * @param string $attachmentId + * + * @return string The formatted organization_case_attachment_id resource. + */ + public static function organizationCaseAttachmentIdName(string $organization, string $case, string $attachmentId): string + { + return self::getPathTemplate('organizationCaseAttachmentId')->render([ + 'organization' => $organization, + 'case' => $case, + 'attachment_id' => $attachmentId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_case_attachment_id resource. + * + * @param string $project + * @param string $case + * @param string $attachmentId + * + * @return string The formatted project_case_attachment_id resource. + */ + public static function projectCaseAttachmentIdName(string $project, string $case, string $attachmentId): string + { + return self::getPathTemplate('projectCaseAttachmentId')->render([ + 'project' => $project, + 'case' => $case, + 'attachment_id' => $attachmentId, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - attachment: organizations/{organization}/cases/{case}/attachments/{attachment_id} + * - case: organizations/{organization}/cases/{case} + * - organizationCase: organizations/{organization}/cases/{case} + * - organizationCaseAttachmentId: organizations/{organization}/cases/{case}/attachments/{attachment_id} + * - projectCase: projects/{project}/cases/{case} + * - projectCaseAttachmentId: projects/{project}/cases/{case}/attachments/{attachment_id} + * + * 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 'cloudsupport.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\Support\V2\CaseAttachmentServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CaseAttachmentServiceClient(['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); + } + + /** 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); + } + + /** + * Retrieve an attachment associated with a support case. + * + * EXAMPLES: + * + * cURL: + * + * ```shell + * attachment="projects/some-project/cases/23598314/attachments/0684M00000P3h1fQAB" + * curl \ + * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ + * "https://cloudsupport.googleapis.com/v2/$attachment" + * ``` + * + * Python: + * + * ```python + * import googleapiclient.discovery + * + * api_version = "v2" + * supportApiService = googleapiclient.discovery.build( + * serviceName="cloudsupport", + * version=api_version, + * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", + * ) + * request = ( + * supportApiService.cases() + * .attachments() + * .get(name="projects/some-project/cases/43595344/attachments/0684M00000P3h1fQAB") + * ) + * print(request.execute()) + * ``` + * + * The async variant is {@see CaseAttachmentServiceClient::getAttachmentAsync()} . + * + * @example samples/V2/CaseAttachmentServiceClient/get_attachment.php + * + * @param GetAttachmentRequest $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 Attachment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getAttachment(GetAttachmentRequest $request, array $callOptions = []): Attachment + { + return $this->startApiCall('GetAttachment', $request, $callOptions)->wait(); + } + + /** + * List all the attachments associated with a support case. + * + * The async variant is {@see CaseAttachmentServiceClient::listAttachmentsAsync()} + * . + * + * @example samples/V2/CaseAttachmentServiceClient/list_attachments.php + * + * @param ListAttachmentsRequest $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 listAttachments(ListAttachmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAttachments', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php new file mode 100644 index 000000000000..e1f1a634d50d --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php @@ -0,0 +1,542 @@ + closeCaseAsync(CloseCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCaseAsync(CreateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface escalateCaseAsync(EscalateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCaseAsync(GetCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCasesAsync(ListCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchCaseClassificationsAsync(SearchCaseClassificationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchCasesAsync(SearchCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCaseAsync(UpdateCaseRequest $request, array $optionalArgs = []) + */ +final class CaseServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2.CaseService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/case_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/case_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/case_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/case_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - organization: organizations/{organization} + * - organizationCase: organizations/{organization}/cases/{case} + * - project: projects/{project} + * - projectCase: projects/{project}/cases/{case} + * + * 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 'cloudsupport.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\Support\V2\CaseServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CaseServiceClient(['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); + } + + /** 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); + } + + /** + * Close a case. + * + * The async variant is {@see CaseServiceClient::closeCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/close_case.php + * + * @param CloseCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function closeCase(CloseCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('CloseCase', $request, $callOptions)->wait(); + } + + /** + * Create a new case and associate it with a parent. + * + * It must have the following fields set: `display_name`, `description`, + * `classification`, and `priority`. If you're just testing the API and don't + * want to route your case to an agent, set `testCase=true`. + * + * The async variant is {@see CaseServiceClient::createCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/create_case.php + * + * @param CreateCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function createCase(CreateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('CreateCase', $request, $callOptions)->wait(); + } + + /** + * Escalate a case, starting the Google Cloud Support escalation management + * process. + * + * This operation is only available for some support services. Go to + * https://cloud.google.com/support and look for 'Technical support + * escalations' in the feature list to find out which ones let you + * do that. + * + * The async variant is {@see CaseServiceClient::escalateCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/escalate_case.php + * + * @param EscalateCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function escalateCase(EscalateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('EscalateCase', $request, $callOptions)->wait(); + } + + /** + * Retrieve a case. + * + * The async variant is {@see CaseServiceClient::getCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/get_case.php + * + * @param GetCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function getCase(GetCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('GetCase', $request, $callOptions)->wait(); + } + + /** + * Retrieve all cases under a parent, but not its children. + * + * For example, listing cases under an organization only returns the cases + * that are directly parented by that organization. To retrieve cases + * under an organization and its projects, use `cases.search`. + * + * The async variant is {@see CaseServiceClient::listCasesAsync()} . + * + * @example samples/V2/CaseServiceClient/list_cases.php + * + * @param ListCasesRequest $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 listCases(ListCasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCases', $request, $callOptions); + } + + /** + * Retrieve valid classifications to use when creating a support case. + * + * Classifications are hierarchical. Each classification is a string + * containing all levels of the hierarchy separated by `" > "`. For example, + * `"Technical Issue > Compute > Compute Engine"`. + * + * Classification IDs returned by this endpoint are valid for at least six + * months. When a classification is deactivated, this endpoint immediately + * stops returning it. After six months, `case.create` requests using the + * classification will fail. + * + * The async variant is {@see CaseServiceClient::searchCaseClassificationsAsync()} + * . + * + * @example samples/V2/CaseServiceClient/search_case_classifications.php + * + * @param SearchCaseClassificationsRequest $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 searchCaseClassifications(SearchCaseClassificationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchCaseClassifications', $request, $callOptions); + } + + /** + * Search for cases using a query. + * + * The async variant is {@see CaseServiceClient::searchCasesAsync()} . + * + * @example samples/V2/CaseServiceClient/search_cases.php + * + * @param SearchCasesRequest $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 searchCases(SearchCasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchCases', $request, $callOptions); + } + + /** + * Update a case. Only some fields can be updated. + * + * The async variant is {@see CaseServiceClient::updateCaseAsync()} . + * + * @example samples/V2/CaseServiceClient/update_case.php + * + * @param UpdateCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateCase(UpdateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('UpdateCase', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php new file mode 100644 index 000000000000..123c261c9c96 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php @@ -0,0 +1,437 @@ + createCommentAsync(CreateCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCommentAsync(GetCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCommentsAsync(ListCommentsRequest $request, array $optionalArgs = []) + */ +final class CommentServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2.CommentService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/comment_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/comment_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/comment_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/comment_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a comment + * resource. + * + * @param string $organization + * @param string $case + * @param string $comment + * + * @return string The formatted comment resource. + */ + public static function commentName(string $organization, string $case, string $comment): string + { + return self::getPathTemplate('comment')->render([ + 'organization' => $organization, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case_comment resource. + * + * @param string $organization + * @param string $case + * @param string $comment + * + * @return string The formatted organization_case_comment resource. + */ + public static function organizationCaseCommentName(string $organization, string $case, string $comment): string + { + return self::getPathTemplate('organizationCaseComment')->render([ + 'organization' => $organization, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_case_comment resource. + * + * @param string $project + * @param string $case + * @param string $comment + * + * @return string The formatted project_case_comment resource. + */ + public static function projectCaseCommentName(string $project, string $case, string $comment): string + { + return self::getPathTemplate('projectCaseComment')->render([ + 'project' => $project, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - comment: organizations/{organization}/cases/{case}/comments/{comment} + * - organizationCase: organizations/{organization}/cases/{case} + * - organizationCaseComment: organizations/{organization}/cases/{case}/comments/{comment} + * - projectCase: projects/{project}/cases/{case} + * - projectCaseComment: projects/{project}/cases/{case}/comments/{comment} + * + * 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 'cloudsupport.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\Support\V2\CommentServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CommentServiceClient(['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); + } + + /** 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); + } + + /** + * Add a new comment to a case. + * + * The comment must have the following fields set: `body`. + * + * The async variant is {@see CommentServiceClient::createCommentAsync()} . + * + * @example samples/V2/CommentServiceClient/create_comment.php + * + * @param CreateCommentRequest $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 Comment + * + * @throws ApiException Thrown if the API call fails. + */ + public function createComment(CreateCommentRequest $request, array $callOptions = []): Comment + { + return $this->startApiCall('CreateComment', $request, $callOptions)->wait(); + } + + /** + * Retrieve a comment. + * + * EXAMPLES: + * + * cURL: + * + * ```shell + * comment="projects/some-project/cases/43595344/comments/234567890" + * curl \ + * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ + * "https://cloudsupport.googleapis.com/v2/$comment" + * ``` + * + * Python: + * + * ```python + * import googleapiclient.discovery + * + * api_version = "v2" + * supportApiService = googleapiclient.discovery.build( + * serviceName="cloudsupport", + * version=api_version, + * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", + * ) + * + * request = supportApiService.cases().comments().get( + * name="projects/some-project/cases/43595344/comments/234567890", + * ) + * print(request.execute()) + * ``` + * + * The async variant is {@see CommentServiceClient::getCommentAsync()} . + * + * @example samples/V2/CommentServiceClient/get_comment.php + * + * @param GetCommentRequest $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 Comment + * + * @throws ApiException Thrown if the API call fails. + */ + public function getComment(GetCommentRequest $request, array $callOptions = []): Comment + { + return $this->startApiCall('GetComment', $request, $callOptions)->wait(); + } + + /** + * List all the comments associated with a case. + * + * The async variant is {@see CommentServiceClient::listCommentsAsync()} . + * + * @example samples/V2/CommentServiceClient/list_comments.php + * + * @param ListCommentsRequest $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 listComments(ListCommentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListComments', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php new file mode 100644 index 000000000000..2d1e59412ff0 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php @@ -0,0 +1,480 @@ + createSupportEventSubscriptionAsync(CreateSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSupportEventSubscriptionAsync(DeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface expungeSupportEventSubscriptionAsync(ExpungeSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSupportEventSubscriptionAsync(GetSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSupportEventSubscriptionsAsync(ListSupportEventSubscriptionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface undeleteSupportEventSubscriptionAsync(UndeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSupportEventSubscriptionAsync(UpdateSupportEventSubscriptionRequest $request, array $optionalArgs = []) + */ +final class SupportEventSubscriptionServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2.SupportEventSubscriptionService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/support_event_subscription_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * support_event_subscription resource. + * + * @param string $organization + * @param string $supportEventSubscription + * + * @return string The formatted support_event_subscription resource. + */ + public static function supportEventSubscriptionName(string $organization, string $supportEventSubscription): string + { + return self::getPathTemplate('supportEventSubscription')->render([ + 'organization' => $organization, + 'support_event_subscription' => $supportEventSubscription, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - organization: organizations/{organization} + * - supportEventSubscription: organizations/{organization}/supportEventSubscriptions/{support_event_subscription} + * + * 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 'cloudsupport.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\Support\V2\SupportEventSubscriptionServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new SupportEventSubscriptionServiceClient(['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); + } + + /** 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); + } + + /** + * Creates a support event subscription for an organization. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::createSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php + * + * @param CreateSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSupportEventSubscription(CreateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('CreateSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Soft deletes a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::deleteSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php + * + * @param DeleteSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteSupportEventSubscription(DeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('DeleteSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Expunges a support event subscription. + * + * EXAMPLES: + * + * cURL: + * + * ```shell + * support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" + * curl \ + * --request POST \ + * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ + * "https://cloudsupport.googleapis.com/v2/$support_event_subscription:expunge" + * ``` + * + * Python: + * + * ```python + * import googleapiclient.discovery + * + * api_version = "v2" + * supportApiService = googleapiclient.discovery.build( + * serviceName="cloudsupport", + * version=api_version, + * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", + * ) + * + * request = supportApiService.supportEventSubscriptions().expunge( + * name="organizations/123456789/supportEventSubscriptions/abcdef123456" + * ) + * print(request.execute()) + * ``` + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::expungeSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php + * + * @param ExpungeSupportEventSubscriptionRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + */ + public function expungeSupportEventSubscription(ExpungeSupportEventSubscriptionRequest $request, array $callOptions = []): void + { + $this->startApiCall('ExpungeSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Gets a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::getSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php + * + * @param GetSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSupportEventSubscription(GetSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('GetSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Lists support event subscriptions for an organization. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::listSupportEventSubscriptionsAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php + * + * @param ListSupportEventSubscriptionsRequest $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 listSupportEventSubscriptions(ListSupportEventSubscriptionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSupportEventSubscriptions', $request, $callOptions); + } + + /** + * Undeletes a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::undeleteSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php + * + * @param UndeleteSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + */ + public function undeleteSupportEventSubscription(UndeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('UndeleteSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Updates a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::updateSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php + * + * @param UpdateSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSupportEventSubscription(UpdateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('UpdateSupportEventSubscription', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..a1a0b226e030 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json @@ -0,0 +1,145 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.support.v2", + "libraryPackage": "Google\\Cloud\\Support\\V2", + "services": { + "CaseAttachmentService": { + "clients": { + "grpc": { + "libraryClient": "CaseAttachmentServiceGapicClient", + "rpcs": { + "GetAttachment": { + "methods": [ + "getAttachment" + ] + }, + "ListAttachments": { + "methods": [ + "listAttachments" + ] + } + } + } + } + }, + "CaseService": { + "clients": { + "grpc": { + "libraryClient": "CaseServiceGapicClient", + "rpcs": { + "CloseCase": { + "methods": [ + "closeCase" + ] + }, + "CreateCase": { + "methods": [ + "createCase" + ] + }, + "EscalateCase": { + "methods": [ + "escalateCase" + ] + }, + "GetCase": { + "methods": [ + "getCase" + ] + }, + "ListCases": { + "methods": [ + "listCases" + ] + }, + "SearchCaseClassifications": { + "methods": [ + "searchCaseClassifications" + ] + }, + "SearchCases": { + "methods": [ + "searchCases" + ] + }, + "UpdateCase": { + "methods": [ + "updateCase" + ] + } + } + } + } + }, + "CommentService": { + "clients": { + "grpc": { + "libraryClient": "CommentServiceGapicClient", + "rpcs": { + "CreateComment": { + "methods": [ + "createComment" + ] + }, + "GetComment": { + "methods": [ + "getComment" + ] + }, + "ListComments": { + "methods": [ + "listComments" + ] + } + } + } + } + }, + "SupportEventSubscriptionService": { + "clients": { + "grpc": { + "libraryClient": "SupportEventSubscriptionServiceGapicClient", + "rpcs": { + "CreateSupportEventSubscription": { + "methods": [ + "createSupportEventSubscription" + ] + }, + "DeleteSupportEventSubscription": { + "methods": [ + "deleteSupportEventSubscription" + ] + }, + "ExpungeSupportEventSubscription": { + "methods": [ + "expungeSupportEventSubscription" + ] + }, + "GetSupportEventSubscription": { + "methods": [ + "getSupportEventSubscription" + ] + }, + "ListSupportEventSubscriptions": { + "methods": [ + "listSupportEventSubscriptions" + ] + }, + "UndeleteSupportEventSubscription": { + "methods": [ + "undeleteSupportEventSubscription" + ] + }, + "UpdateSupportEventSubscription": { + "methods": [ + "updateSupportEventSubscription" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json new file mode 100644 index 000000000000..86644d843261 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json @@ -0,0 +1,44 @@ +{ + "interfaces": { + "google.cloud.support.v2.CaseAttachmentService": { + "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": { + "GetAttachment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAttachments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php new file mode 100644 index 000000000000..d09c50e12e40 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php @@ -0,0 +1,68 @@ + [ + 'google.cloud.support.v2.CaseAttachmentService' => [ + 'GetAttachment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\Attachment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAttachments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAttachments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\ListAttachmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'attachment' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', + 'case' => 'organizations/{organization}/cases/{case}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'organizationCaseAttachmentId' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', + 'projectCase' => 'projects/{project}/cases/{case}', + 'projectCaseAttachmentId' => 'projects/{project}/cases/{case}/attachments/{attachment_id}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php new file mode 100644 index 000000000000..e0337097818c --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php @@ -0,0 +1,57 @@ + [ + 'google.cloud.support.v2.CaseAttachmentService' => [ + 'GetAttachment' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/cases/*/attachments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAttachments' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/attachments', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/attachments', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json new file mode 100644 index 000000000000..7fff474416b4 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json @@ -0,0 +1,84 @@ +{ + "interfaces": { + "google.cloud.support.v2.CaseService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "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 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CloseCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EscalateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetCase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchCaseClassifications": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php new file mode 100644 index 000000000000..51f3317d6a1c --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php @@ -0,0 +1,148 @@ + [ + 'google.cloud.support.v2.CaseService' => [ + 'CloseCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'EscalateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\ListCasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchCaseClassifications' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCaseClassifications', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SearchCaseClassificationsResponse', + ], + 'SearchCases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SearchCasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'case.name', + 'fieldAccessors' => [ + 'getCase', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'organization' => 'organizations/{organization}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'project' => 'projects/{project}', + 'projectCase' => 'projects/{project}/cases/{case}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php new file mode 100644 index 000000000000..f9f9374d9247 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php @@ -0,0 +1,161 @@ + [ + 'google.cloud.support.v2.CaseService' => [ + 'CloseCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/cases/*}:close', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/cases/*}:close', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*}/cases', + 'body' => 'case', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*}/cases', + 'body' => 'case', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'EscalateCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=projects/*/cases/*}:escalate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/cases/*}:escalate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCase' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=projects/*/cases/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/cases/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCases' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/cases', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/cases', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchCaseClassifications' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/caseClassifications:search', + ], + 'SearchCases' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*}/cases:search', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/cases:search', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCase' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{case.name=projects/*/cases/*}', + 'body' => 'case', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{case.name=organizations/*/cases/*}', + 'body' => 'case', + ], + ], + 'placeholders' => [ + 'case.name' => [ + 'getters' => [ + 'getCase', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json new file mode 100644 index 000000000000..8dba9a653701 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json @@ -0,0 +1,59 @@ +{ + "interfaces": { + "google.cloud.support.v2.CommentService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "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 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListComments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php new file mode 100644 index 000000000000..1157c2b2f18c --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php @@ -0,0 +1,80 @@ + [ + 'google.cloud.support.v2.CommentService' => [ + 'CreateComment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\Comment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetComment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\Comment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListComments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getComments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\ListCommentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'comment' => 'organizations/{organization}/cases/{case}/comments/{comment}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'organizationCaseComment' => 'organizations/{organization}/cases/{case}/comments/{comment}', + 'projectCase' => 'projects/{project}/cases/{case}', + 'projectCaseComment' => 'projects/{project}/cases/{case}/comments/{comment}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php new file mode 100644 index 000000000000..80f01b235112 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php @@ -0,0 +1,76 @@ + [ + 'google.cloud.support.v2.CommentService' => [ + 'CreateComment' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/comments', + 'body' => 'comment', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/comments', + 'body' => 'comment', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetComment' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=*/*/cases/*/comments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListComments' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/comments', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/comments', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json new file mode 100644 index 000000000000..207f6e81330a --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json @@ -0,0 +1,57 @@ +{ + "interfaces": { + "google.cloud.support.v2.SupportEventSubscriptionService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "CreateSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ExpungeSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSupportEventSubscriptions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UndeleteSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php new file mode 100644 index 000000000000..8524c72bce3c --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php @@ -0,0 +1,125 @@ + [ + 'google.cloud.support.v2.SupportEventSubscriptionService' => [ + 'CreateSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExpungeSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSupportEventSubscriptions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSupportEventSubscriptions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2\ListSupportEventSubscriptionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UndeleteSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'support_event_subscription.name', + 'fieldAccessors' => [ + 'getSupportEventSubscription', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'organization' => 'organizations/{organization}', + 'supportEventSubscription' => 'organizations/{organization}/supportEventSubscriptions/{support_event_subscription}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php new file mode 100644 index 000000000000..d47c677179a1 --- /dev/null +++ b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php @@ -0,0 +1,111 @@ + [ + 'google.cloud.support.v2.SupportEventSubscriptionService' => [ + 'CreateSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{parent=organizations/*}/supportEventSubscriptions', + 'body' => 'support_event_subscription', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSupportEventSubscription' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExpungeSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}:expunge', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSupportEventSubscription' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSupportEventSubscriptions' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=organizations/*}/supportEventSubscriptions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UndeleteSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}:undelete', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSupportEventSubscription' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}', + 'body' => 'support_event_subscription', + 'placeholders' => [ + 'support_event_subscription.name' => [ + 'getters' => [ + 'getSupportEventSubscription', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php new file mode 100644 index 000000000000..601ac8d587e1 --- /dev/null +++ b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php @@ -0,0 +1,241 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CaseAttachmentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CaseAttachmentServiceClient($options); + } + + /** @test */ + public function getAttachmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $filename = 'filename-734768633'; + $mimeType = 'mimeType-196041627'; + $sizeBytes = 1796325715; + $expectedResponse = new Attachment(); + $expectedResponse->setName($name2); + $expectedResponse->setFilename($filename); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setSizeBytes($sizeBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); + $request = (new GetAttachmentRequest()) + ->setName($formattedName); + $response = $gapicClient->getAttachment($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.support.v2.CaseAttachmentService/GetAttachment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachmentExceptionTest() + { + $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->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); + $request = (new GetAttachmentRequest()) + ->setName($formattedName); + try { + $gapicClient->getAttachment($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 listAttachmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $attachmentsElement = new Attachment(); + $attachments = [ + $attachmentsElement, + ]; + $expectedResponse = new ListAttachmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAttachments($attachments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListAttachmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAttachments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAttachments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseAttachmentService/ListAttachments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAttachmentsExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListAttachmentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAttachments($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 getAttachmentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $filename = 'filename-734768633'; + $mimeType = 'mimeType-196041627'; + $sizeBytes = 1796325715; + $expectedResponse = new Attachment(); + $expectedResponse->setName($name2); + $expectedResponse->setFilename($filename); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setSizeBytes($sizeBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); + $request = (new GetAttachmentRequest()) + ->setName($formattedName); + $response = $gapicClient->getAttachmentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseAttachmentService/GetAttachment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php new file mode 100644 index 000000000000..e3977a3af5ad --- /dev/null +++ b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php @@ -0,0 +1,712 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CaseServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CaseServiceClient($options); + } + + /** @test */ + public function closeCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->closeCase($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.support.v2.CaseService/CloseCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function closeCaseExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->closeCase($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 createCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $case = new PBCase(); + $request = (new CreateCaseRequest()) + ->setParent($formattedParent) + ->setCase($case); + $response = $gapicClient->createCase($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.support.v2.CaseService/CreateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCase(); + $this->assertProtobufEquals($case, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCaseExceptionTest() + { + $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->projectName('[PROJECT]'); + $case = new PBCase(); + $request = (new CreateCaseRequest()) + ->setParent($formattedParent) + ->setCase($case); + try { + $gapicClient->createCase($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 escalateCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new EscalateCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->escalateCase($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.support.v2.CaseService/EscalateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function escalateCaseExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new EscalateCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->escalateCase($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 getCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new GetCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->getCase($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.support.v2.CaseService/GetCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCaseExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new GetCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->getCase($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 listCasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $casesElement = new PBCase(); + $cases = [ + $casesElement, + ]; + $expectedResponse = new ListCasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCases($cases); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListCasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseService/ListCases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCasesExceptionTest() + { + $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->projectName('[PROJECT]'); + $request = (new ListCasesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCases($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 searchCaseClassificationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $caseClassificationsElement = new CaseClassification(); + $caseClassifications = [ + $caseClassificationsElement, + ]; + $expectedResponse = new SearchCaseClassificationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCaseClassifications($caseClassifications); + $transport->addResponse($expectedResponse); + $request = new SearchCaseClassificationsRequest(); + $response = $gapicClient->searchCaseClassifications($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCaseClassifications()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseService/SearchCaseClassifications', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCaseClassificationsExceptionTest() + { + $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 SearchCaseClassificationsRequest(); + try { + $gapicClient->searchCaseClassifications($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 searchCasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $casesElement = new PBCase(); + $cases = [ + $casesElement, + ]; + $expectedResponse = new SearchCasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCases($cases); + $transport->addResponse($expectedResponse); + $request = new SearchCasesRequest(); + $response = $gapicClient->searchCases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseService/SearchCases', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCasesExceptionTest() + { + $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 SearchCasesRequest(); + try { + $gapicClient->searchCases($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 updateCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $case = new PBCase(); + $request = (new UpdateCaseRequest()) + ->setCase($case); + $response = $gapicClient->updateCase($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.support.v2.CaseService/UpdateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getCase(); + $this->assertProtobufEquals($case, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCaseExceptionTest() + { + $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 + $case = new PBCase(); + $request = (new UpdateCaseRequest()) + ->setCase($case); + try { + $gapicClient->updateCase($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 closeCaseAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->closeCaseAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CaseService/CloseCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php new file mode 100644 index 000000000000..0982658b529d --- /dev/null +++ b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php @@ -0,0 +1,316 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CommentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CommentServiceClient($options); + } + + /** @test */ + public function createCommentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + $response = $gapicClient->createComment($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.support.v2.CommentService/CreateComment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getComment(); + $this->assertProtobufEquals($comment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCommentExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + try { + $gapicClient->createComment($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 getCommentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name2); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); + $request = (new GetCommentRequest()) + ->setName($formattedName); + $response = $gapicClient->getComment($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.support.v2.CommentService/GetComment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCommentExceptionTest() + { + $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->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); + $request = (new GetCommentRequest()) + ->setName($formattedName); + try { + $gapicClient->getComment($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 listCommentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $commentsElement = new Comment(); + $comments = [ + $commentsElement, + ]; + $expectedResponse = new ListCommentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setComments($comments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListCommentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listComments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getComments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CommentService/ListComments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCommentsExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListCommentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listComments($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 createCommentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + $response = $gapicClient->createCommentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.CommentService/CreateComment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getComment(); + $this->assertProtobufEquals($comment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php new file mode 100644 index 000000000000..90d1f77613e5 --- /dev/null +++ b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php @@ -0,0 +1,584 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SupportEventSubscriptionServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SupportEventSubscriptionServiceClient($options); + } + + /** @test */ + public function createSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + $response = $gapicClient->createSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSupportEventSubscription(); + $this->assertProtobufEquals($supportEventSubscription, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSupportEventSubscriptionExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + try { + $gapicClient->createSupportEventSubscription($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 deleteSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name2); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new DeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/DeleteSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new DeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSupportEventSubscription($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 expungeSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new ExpungeSupportEventSubscriptionRequest()) + ->setName($formattedName); + $gapicClient->expungeSupportEventSubscription($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.SupportEventSubscriptionService/ExpungeSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function expungeSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new ExpungeSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->expungeSupportEventSubscription($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 getSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name2); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new GetSupportEventSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->getSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/GetSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new GetSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->getSupportEventSubscription($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 listSupportEventSubscriptionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $supportEventSubscriptionsElement = new SupportEventSubscription(); + $supportEventSubscriptions = [ + $supportEventSubscriptionsElement, + ]; + $expectedResponse = new ListSupportEventSubscriptionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSupportEventSubscriptions($supportEventSubscriptions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new ListSupportEventSubscriptionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSupportEventSubscriptions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSupportEventSubscriptions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.SupportEventSubscriptionService/ListSupportEventSubscriptions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSupportEventSubscriptionsExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $request = (new ListSupportEventSubscriptionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSupportEventSubscriptions($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 undeleteSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name2); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new UndeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->undeleteSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/UndeleteSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function undeleteSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new UndeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->undeleteSupportEventSubscription($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 updateSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new UpdateSupportEventSubscriptionRequest()) + ->setSupportEventSubscription($supportEventSubscription); + $response = $gapicClient->updateSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/UpdateSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getSupportEventSubscription(); + $this->assertProtobufEquals($supportEventSubscription, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSupportEventSubscriptionExceptionTest() + { + $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 + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new UpdateSupportEventSubscriptionRequest()) + ->setSupportEventSubscription($supportEventSubscription); + try { + $gapicClient->updateSupportEventSubscription($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 createSupportEventSubscriptionAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + $response = $gapicClient->createSupportEventSubscriptionAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSupportEventSubscription(); + $this->assertProtobufEquals($supportEventSubscription, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php new file mode 100644 index 000000000000..1aa4b2dcd381 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xFE\x02\x0A'google/cloud/support/v2beta/actor.proto\x12\x1Bgoogle.cloud.support.v2beta\"d\x0A\x05Actor\x12\x14\x0A\x0Cdisplay_name\x18\x01 \x01(\x09\x12\x11\x0A\x05email\x18\x02 \x01(\x09B\x02\x18\x01\x12\x1B\x0A\x0Egoogle_support\x18\x04 \x01(\x08B\x03\xE0A\x03\x12\x15\x0A\x08username\x18\x05 \x01(\x09B\x03\xE0A\x03B\xC7\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0AActorProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php new file mode 100644 index 000000000000..4a62f7824389 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\x92\x06\x0A,google/cloud/support/v2beta/attachment.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x88\x03\x0A\x0AAttachment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x128\x0A\x07creator\x18\x03 \x01(\x0B2\".google.cloud.support.v2beta.ActorB\x03\xE0A\x03\x12\x10\x0A\x08filename\x18\x04 \x01(\x09\x12\x16\x0A\x09mime_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Asize_bytes\x18\x06 \x01(\x03B\x03\xE0A\x03:\xB0\x01\xEAA\xAC\x01\x0A&cloudsupport.googleapis.com/Attachment\x12Eorganizations/{organization}/cases/{case}/attachments/{attachment_id}\x12;projects/{project}/cases/{case}/attachments/{attachment_id}B\xCC\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0FAttachmentProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php new file mode 100644 index 000000000000..4ff8c684ca06 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\x82\x0A\x0A4google/cloud/support/v2beta/attachment_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/support/v2beta/attachment.proto\"y\x0A\x16ListAttachmentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"T\x0A\x14GetAttachmentRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&cloudsupport.googleapis.com/Attachment\"p\x0A\x17ListAttachmentsResponse\x12<\x0A\x0Battachments\x18\x01 \x03(\x0B2'.google.cloud.support.v2beta.Attachment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\x88\x04\x0A\x15CaseAttachmentService\x12\xF6\x01\x0A\x0FListAttachments\x123.google.cloud.support.v2beta.ListAttachmentsRequest\x1A4.google.cloud.support.v2beta.ListAttachmentsResponse\"x\xDAA\x06parent\x82\xD3\xE4\x93\x02i\x12//v2beta/{parent=projects/*/cases/*}/attachmentsZ6\x124/v2beta/{parent=organizations/*/cases/*}/attachments\x12\xA4\x01\x0A\x0DGetAttachment\x121.google.cloud.support.v2beta.GetAttachmentRequest\x1A'.google.cloud.support.v2beta.Attachment\"7\xDAA\x04name\x82\xD3\xE4\x93\x02*\x12(/v2beta/{name=*/*/cases/*/attachments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xD3\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x16AttachmentServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php new file mode 100644 index 000000000000..d96b709d8545 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + "\x0A\x84\x1C\x0A.google/cloud/support/v2beta/case_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A&google/cloud/support/v2beta/case.proto\x1A,google/cloud/support/v2beta/escalation.proto\x1A google/protobuf/field_mask.proto\"H\x0A\x0EGetCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"\x83\x01\x0A\x11CreateCaseRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x124\x0A\x04case\x18\x02 \x01(\x0B2!.google.cloud.support.v2beta.CaseB\x03\xE0A\x02\"\xD9\x01\x0A\x10ListCasesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\x12C\x0A\x0Cproduct_line\x18\x08 \x01(\x0E2(.google.cloud.support.v2beta.ProductLineH\x00\x88\x01\x01B\x0F\x0A\x0D_product_line\"^\x0A\x11ListCasesResponse\x120\x0A\x05cases\x18\x01 \x03(\x0B2!.google.cloud.support.v2beta.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"Z\x0A\x12SearchCasesRequest\x12\x0E\x0A\x06parent\x18\x04 \x01(\x09\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"`\x0A\x13SearchCasesResponse\x120\x0A\x05cases\x18\x01 \x03(\x0B2!.google.cloud.support.v2beta.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x8A\x01\x0A\x13EscalateCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12;\x0A\x0Aescalation\x18\x02 \x01(\x0B2'.google.cloud.support.v2beta.Escalation\"z\x0A\x11UpdateCaseRequest\x124\x0A\x04case\x18\x01 \x01(\x0B2!.google.cloud.support.v2beta.CaseB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"J\x0A\x10CloseCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"\x94\x01\x0A SearchCaseClassificationsRequest\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12:\x0A\x07product\x18\x07 \x01(\x0B2\$.google.cloud.support.v2beta.ProductB\x03\xE0A\x01\"\x8B\x01\x0A!SearchCaseClassificationsResponse\x12M\x0A\x14case_classifications\x18\x01 \x03(\x0B2/.google.cloud.support.v2beta.CaseClassification\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xCB\x0D\x0A\x0BCaseService\x12\xB5\x01\x0A\x07GetCase\x12+.google.cloud.support.v2beta.GetCaseRequest\x1A!.google.cloud.support.v2beta.Case\"Z\xDAA\x04name\x82\xD3\xE4\x93\x02M\x12!/v2beta/{name=projects/*/cases/*}Z(\x12&/v2beta/{name=organizations/*/cases/*}\x12\xC8\x01\x0A\x09ListCases\x12-.google.cloud.support.v2beta.ListCasesRequest\x1A..google.cloud.support.v2beta.ListCasesResponse\"\\\xDAA\x06parent\x82\xD3\xE4\x93\x02M\x12!/v2beta/{parent=projects/*}/casesZ(\x12&/v2beta/{parent=organizations/*}/cases\x12\xD3\x01\x0A\x0BSearchCases\x12/.google.cloud.support.v2beta.SearchCasesRequest\x1A0.google.cloud.support.v2beta.SearchCasesResponse\"a\x82\xD3\xE4\x93\x02[\x12(/v2beta/{parent=projects/*}/cases:searchZ/\x12-/v2beta/{parent=organizations/*}/cases:search\x12\xCE\x01\x0A\x0ACreateCase\x12..google.cloud.support.v2beta.CreateCaseRequest\x1A!.google.cloud.support.v2beta.Case\"m\xDAA\x0Bparent,case\x82\xD3\xE4\x93\x02Y\"!/v2beta/{parent=projects/*}/cases:\x04caseZ.\"&/v2beta/{parent=organizations/*}/cases:\x04case\x12\xDD\x01\x0A\x0AUpdateCase\x12..google.cloud.support.v2beta.UpdateCaseRequest\x1A!.google.cloud.support.v2beta.Case\"|\xDAA\x10case,update_mask\x82\xD3\xE4\x93\x02c2&/v2beta/{case.name=projects/*/cases/*}:\x04caseZ32+/v2beta/{case.name=organizations/*/cases/*}:\x04case\x12\xD0\x01\x0A\x0CEscalateCase\x120.google.cloud.support.v2beta.EscalateCaseRequest\x1A!.google.cloud.support.v2beta.Case\"k\x82\xD3\xE4\x93\x02e\"*/v2beta/{name=projects/*/cases/*}:escalate:\x01*Z4\"//v2beta/{name=organizations/*/cases/*}:escalate:\x01*\x12\xC4\x01\x0A\x09CloseCase\x12-.google.cloud.support.v2beta.CloseCaseRequest\x1A!.google.cloud.support.v2beta.Case\"e\x82\xD3\xE4\x93\x02_\"'/v2beta/{name=projects/*/cases/*}:close:\x01*Z1\",/v2beta/{name=organizations/*/cases/*}:close:\x01*\x12\xC6\x01\x0A\x19SearchCaseClassifications\x12=.google.cloud.support.v2beta.SearchCaseClassificationsRequest\x1A>.google.cloud.support.v2beta.SearchCaseClassificationsResponse\"*\x82\xD3\xE4\x93\x02\$\x12\"/v2beta/caseClassifications:search\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x10CaseServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php new file mode 100644 index 000000000000..04bdbfb5d675 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xDF\x05\x0A)google/cloud/support/v2beta/comment.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDB\x02\x0A\x07Comment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x128\x0A\x07creator\x18\x03 \x01(\x0B2\".google.cloud.support.v2beta.ActorB\x03\xE0A\x03\x12\x0C\x0A\x04body\x18\x04 \x01(\x09\x12\x1E\x0A\x0Fplain_text_body\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03:\x9B\x01\xEAA\x97\x01\x0A#cloudsupport.googleapis.com/Comment\x12internalAddGeneratedFile( + "\x0A\xCE\x0C\x0A1google/cloud/support/v2beta/comment_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/support/v2beta/comment.proto\"v\x0A\x13ListCommentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\"g\x0A\x14ListCommentsResponse\x126\x0A\x08comments\x18\x01 \x03(\x0B2\$.google.cloud.support.v2beta.Comment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x8C\x01\x0A\x14CreateCommentRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12:\x0A\x07comment\x18\x02 \x01(\x0B2\$.google.cloud.support.v2beta.CommentB\x03\xE0A\x02\"N\x0A\x11GetCommentRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#cloudsupport.googleapis.com/Comment2\xE0\x05\x0A\x0ECommentService\x12\xE7\x01\x0A\x0CListComments\x120.google.cloud.support.v2beta.ListCommentsRequest\x1A1.google.cloud.support.v2beta.ListCommentsResponse\"r\xDAA\x06parent\x82\xD3\xE4\x93\x02c\x12,/v2beta/{parent=projects/*/cases/*}/commentsZ3\x121/v2beta/{parent=organizations/*/cases/*}/comments\x12\xF7\x01\x0A\x0DCreateComment\x121.google.cloud.support.v2beta.CreateCommentRequest\x1A\$.google.cloud.support.v2beta.Comment\"\x8C\x01\xDAA\x0Eparent,comment\x82\xD3\xE4\x93\x02u\",/v2beta/{parent=projects/*/cases/*}/comments:\x07commentZ<\"1/v2beta/{parent=organizations/*/cases/*}/comments:\x07comment\x12\x98\x01\x0A\x0AGetComment\x12..google.cloud.support.v2beta.GetCommentRequest\x1A\$.google.cloud.support.v2beta.Comment\"4\xDAA\x04name\x82\xD3\xE4\x93\x02'\x12%/v2beta/{name=*/*/cases/*/comments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xD0\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x13CommentServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php new file mode 100644 index 000000000000..9732640975d1 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php @@ -0,0 +1,24 @@ +internalAddGeneratedFile( + "\x0A\xBF\x02\x0A)google/cloud/support/v2beta/content.proto\x12\x1Bgoogle.cloud.support.v2beta\"!\x0A\x0BTextContent\x12\x12\x0A\x0Aplain_text\x18\x01 \x01(\x09B\xC9\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0CContentProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php new file mode 100644 index 000000000000..532f5c66b638 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xC3\x07\x0A/google/cloud/support/v2beta/email_message.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A)google/cloud/support/v2beta/content.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x89\x04\x0A\x0CEmailMessage\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\x126\x0A\x05actor\x18\x03 \x01(\x0B2\".google.cloud.support.v2beta.ActorB\x03\xE0A\x03\x12\x14\x0A\x07subject\x18\x04 \x01(\x09B\x03\xE0A\x03\x12&\x0A\x19recipient_email_addresses\x18\x05 \x03(\x09B\x03\xE0A\x03\x12\x1F\x0A\x12cc_email_addresses\x18\x06 \x03(\x09B\x03\xE0A\x03\x12C\x0A\x0Cbody_content\x18\x08 \x01(\x0B2(.google.cloud.support.v2beta.TextContentB\x03\xE0A\x03:\xD3\x01\xEAA\xCF\x01\x0A(cloudsupport.googleapis.com/EmailMessage\x12=projects/{project}/cases/{case}/emailMessages/{email_message}\x12Gorganizations/{organization}/cases/{case}/emailMessages/{email_message}*\x0DemailMessages2\x0CemailMessageB\xCE\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x11EmailMessageProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php new file mode 100644 index 000000000000..4f02ac33a05a --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php @@ -0,0 +1,25 @@ +internalAddGeneratedFile( + "\x0A\xF7\x03\x0A,google/cloud/support/v2beta/escalation.proto\x12\x1Bgoogle.cloud.support.v2beta\"\xD2\x01\x0A\x0AEscalation\x12C\x0A\x06reason\x18\x04 \x01(\x0E2..google.cloud.support.v2beta.Escalation.ReasonB\x03\xE0A\x02\x12\x1A\x0A\x0Djustification\x18\x05 \x01(\x09B\x03\xE0A\x02\"c\x0A\x06Reason\x12\x16\x0A\x12REASON_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FRESOLUTION_TIME\x10\x01\x12\x17\x0A\x13TECHNICAL_EXPERTISE\x10\x02\x12\x13\x0A\x0FBUSINESS_IMPACT\x10\x03B\xCC\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0FEscalationProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php new file mode 100644 index 000000000000..ba6174c9de88 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xB3\x06\x0A+google/cloud/support/v2beta/feed_item.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A,google/cloud/support/v2beta/attachment.proto\x1A)google/cloud/support/v2beta/comment.proto\x1A/google/cloud/support/v2beta/email_message.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE6\x02\x0A\x08FeedItem\x12<\x0A\x07comment\x18d \x01(\x0B2\$.google.cloud.support.v2beta.CommentB\x03\xE0A\x03H\x00\x12B\x0A\x0Aattachment\x18e \x01(\x0B2'.google.cloud.support.v2beta.AttachmentB\x03\xE0A\x03H\x00\x12G\x0A\x0Demail_message\x18f \x01(\x0B2).google.cloud.support.v2beta.EmailMessageB\x03\xE0A\x03H\x00\x12J\x0A\x12deleted_attachment\x18g \x01(\x0B2'.google.cloud.support.v2beta.AttachmentB\x03\xE0A\x03H\x00\x123\x0A\x0Aevent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03B\x0E\x0A\x0Cevent_objectB\xCA\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0DFeedItemProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php new file mode 100644 index 000000000000..c8ed909c6857 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php @@ -0,0 +1,29 @@ +internalAddGeneratedFile( + "\x0A\xE4\x07\x0A.google/cloud/support/v2beta/feed_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A+google/cloud/support/v2beta/feed_item.proto\"\x93\x01\x0A\x0FShowFeedRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x15\x0A\x08order_by\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x04 \x01(\x09B\x03\xE0A\x01\"f\x0A\x10ShowFeedResponse\x129\x0A\x0Afeed_items\x18\x01 \x03(\x0B2%.google.cloud.support.v2beta.FeedItem\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xBC\x02\x0A\x0BFeedService\x12\xDB\x01\x0A\x08ShowFeed\x12,.google.cloud.support.v2beta.ShowFeedRequest\x1A-.google.cloud.support.v2beta.ShowFeedResponse\"r\xDAA\x06parent\x82\xD3\xE4\x93\x02c\x12,/v2beta/{parent=projects/*/cases/*}:showFeedZ3\x121/v2beta/{parent=organizations/*/cases/*}:showFeed\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x10FeedServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php new file mode 100644 index 000000000000..a56bd0b1fbf4 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php @@ -0,0 +1,28 @@ +internalAddGeneratedFile( + "\x0A\xFE\x0B\x0A&google/cloud/support/v2beta/case.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xF6\x06\x0A\x04Case\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x12G\x0A\x0Eclassification\x18\x04 \x01(\x0B2/.google.cloud.support.v2beta.CaseClassification\x12\x11\x0A\x09time_zone\x18\x08 \x01(\x09\x12\"\x0A\x1Asubscriber_email_addresses\x18\x09 \x03(\x09\x12;\x0A\x05state\x18\x0C \x01(\x0E2'.google.cloud.support.v2beta.Case.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x0D \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0E \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x123\x0A\x07creator\x18\x0F \x01(\x0B2\".google.cloud.support.v2beta.Actor\x12\x15\x0A\x0Dcontact_email\x18# \x01(\x09\x12\x11\x0A\x09escalated\x18\x11 \x01(\x08\x12\x11\x0A\x09test_case\x18\x13 \x01(\x08\x12\x15\x0A\x0Dlanguage_code\x18\x17 \x01(\x09\x12<\x0A\x08priority\x18 \x01(\x0E2*.google.cloud.support.v2beta.Case.Priority\"\x7F\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03NEW\x10\x01\x12\x1E\x0A\x1AIN_PROGRESS_GOOGLE_SUPPORT\x10\x02\x12\x13\x0A\x0FACTION_REQUIRED\x10\x03\x12\x15\x0A\x11SOLUTION_PROVIDED\x10\x04\x12\x0A\x0A\x06CLOSED\x10\x05\"L\x0A\x08Priority\x12\x18\x0A\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02P0\x10\x01\x12\x06\x0A\x02P1\x10\x02\x12\x06\x0A\x02P2\x10\x03\x12\x06\x0A\x02P3\x10\x04\x12\x06\x0A\x02P4\x10\x05:q\xEAAn\x0A cloudsupport.googleapis.com/Case\x12)organizations/{organization}/cases/{case}\x12\x1Fprojects/{project}/cases/{case}\"m\x0A\x12CaseClassification\x12\x0A\x0A\x02id\x18\x03 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x04 \x01(\x09\x125\x0A\x07product\x18\x0A \x01(\x0B2\$.google.cloud.support.v2beta.Product\"I\x0A\x07Product\x12>\x0A\x0Cproduct_line\x18\x01 \x01(\x0E2(.google.cloud.support.v2beta.ProductLine*N\x0A\x0BProductLine\x12\x1C\x0A\x18PRODUCT_LINE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CGOOGLE_CLOUD\x10\x01\x12\x0F\x0A\x0BGOOGLE_MAPS\x10\x02B\xC6\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x09CaseProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php new file mode 100644 index 000000000000..998bb4bd4afc --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php @@ -0,0 +1,27 @@ +internalAddGeneratedFile( + "\x0A\xC8\x09\x0AinternalAddGeneratedFile( + "\x0A\xEA\x1C\x0ADgoogle/cloud/support/v2beta/support_event_subscription_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1Agoogle.cloud.support.v2beta.Actor + */ +class Actor extends \Google\Protobuf\Internal\Message +{ + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + */ + protected $display_name = ''; + /** + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * + * Generated from protobuf field string email = 2 [deprecated = true]; + * @deprecated + */ + protected $email = ''; + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $google_support = false; + /** + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * + * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $username = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * @type string $email + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * @type bool $google_support + * Output only. Whether the actor is a Google support actor. + * @type string $username + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\Actor::initOnce(); + parent::__construct($data); + } + + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The name to display for the actor. If not provided, it is inferred from + * credentials supplied during case creation. When an email is provided, a + * display name must also be provided. This will be obfuscated if the user + * is a Google Support agent. + * + * Generated from protobuf field string display_name = 1; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * + * Generated from protobuf field string email = 2 [deprecated = true]; + * @return string + * @deprecated + */ + public function getEmail() + { + if ($this->email !== '') { + @trigger_error('email is deprecated.', E_USER_DEPRECATED); + } + return $this->email; + } + + /** + * The email address of the actor. If not provided, it is inferred from the + * credentials supplied during case creation. When a name is provided, an + * email must also be provided. If the user is a Google Support agent, this is + * obfuscated. + * This field is deprecated. Use `username` instead. + * + * Generated from protobuf field string email = 2 [deprecated = true]; + * @param string $var + * @return $this + * @deprecated + */ + public function setEmail($var) + { + @trigger_error('email is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->email = $var; + + return $this; + } + + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getGoogleSupport() + { + return $this->google_support; + } + + /** + * Output only. Whether the actor is a Google support actor. + * + * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setGoogleSupport($var) + { + GPBUtil::checkBool($var); + $this->google_support = $var; + + return $this; + } + + /** + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * + * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUsername() + { + return $this->username; + } + + /** + * Output only. The username of the actor. It may look like an email or other + * format provided by the identity provider. If not provided, it is inferred + * from the credentials supplied. When a name is provided, a username must + * also be provided. If the user is a Google Support agent, this will not be + * set. + * + * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUsername($var) + { + GPBUtil::checkString($var, True); + $this->username = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php new file mode 100644 index 000000000000..59369f69aad9 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php @@ -0,0 +1,267 @@ +google.cloud.support.v2beta.Attachment + */ +class Attachment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. The time at which the attachment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = null; + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + */ + protected $filename = ''; + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $mime_type = ''; + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $size_bytes = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. The resource name of the attachment. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the attachment was created. + * @type \Google\Cloud\Support\V2beta\Actor $creator + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * @type string $filename + * The filename of the attachment (e.g. `"graph.jpg"`). + * @type string $mime_type + * Output only. The MIME type of the attachment (e.g. text/plain). + * @type int|string $size_bytes + * Output only. The size of the attachment in bytes. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Identifier. The resource name of the attachment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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. The time at which the attachment was created. + * + * 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. The time at which the attachment was created. + * + * 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. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * Output only. The user who uploaded the attachment. Note, the name and email + * will be obfuscated if the attachment was uploaded by Google support. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + * @return string + */ + public function getFilename() + { + return $this->filename; + } + + /** + * The filename of the attachment (e.g. `"graph.jpg"`). + * + * Generated from protobuf field string filename = 4; + * @param string $var + * @return $this + */ + public function setFilename($var) + { + GPBUtil::checkString($var, True); + $this->filename = $var; + + return $this; + } + + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * Output only. The MIME type of the attachment (e.g. text/plain). + * + * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int|string + */ + public function getSizeBytes() + { + return $this->size_bytes; + } + + /** + * Output only. The size of the attachment in bytes. + * + * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int|string $var + * @return $this + */ + public function setSizeBytes($var) + { + GPBUtil::checkInt64($var); + $this->size_bytes = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php new file mode 100644 index 000000000000..804aaa392f49 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php @@ -0,0 +1,181 @@ +google.cloud.support.v2beta.CaseClassification + */ +class CaseClassification extends \Google\Protobuf\Internal\Message +{ + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * + * Generated from protobuf field string id = 3; + */ + protected $id = ''; + /** + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * + * Generated from protobuf field string display_name = 4; + */ + protected $display_name = ''; + /** + * The full product the classification corresponds to. + * + * Generated from protobuf field .google.cloud.support.v2beta.Product product = 10; + */ + protected $product = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * @type string $display_name + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * @type \Google\Cloud\Support\V2beta\Product $product + * The full product the classification corresponds to. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\PBCase::initOnce(); + parent::__construct($data); + } + + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * + * Generated from protobuf field string id = 3; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * The unique ID for a classification. Must be specified for case creation. + * To retrieve valid classification IDs for case creation, use + * `caseClassifications.search`. + * Classification IDs returned by `caseClassifications.search` are guaranteed + * to be valid for at least 6 months. If a given classification is + * deactiveated, it will immediately stop being returned. After 6 months, + * `case.create` requests using the classification ID will fail. + * + * Generated from protobuf field string id = 3; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * + * Generated from protobuf field string display_name = 4; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * A display name for the classification. + * The display name is not static and can change. To uniquely and consistently + * identify classifications, use the `CaseClassification.id` field. + * + * Generated from protobuf field string display_name = 4; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * The full product the classification corresponds to. + * + * Generated from protobuf field .google.cloud.support.v2beta.Product product = 10; + * @return \Google\Cloud\Support\V2beta\Product|null + */ + public function getProduct() + { + return $this->product; + } + + public function hasProduct() + { + return isset($this->product); + } + + public function clearProduct() + { + unset($this->product); + } + + /** + * The full product the classification corresponds to. + * + * Generated from protobuf field .google.cloud.support.v2beta.Product product = 10; + * @param \Google\Cloud\Support\V2beta\Product $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Product::class); + $this->product = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php new file mode 100644 index 000000000000..09abfd6689fb --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php @@ -0,0 +1,67 @@ +google.cloud.support.v2beta.CloseCaseRequest + */ +class CloseCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case to close. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the case to close. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case to close. + * + * 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 name of the case to close. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php new file mode 100644 index 000000000000..12b50d25f5a2 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php @@ -0,0 +1,245 @@ +google.cloud.support.v2beta.Comment + */ +class Comment extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Identifier. The resource name of the comment. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. The time when the comment was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The user or Google Support agent who created the comment. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $creator = null; + /** + * The full comment body. + * Maximum of 12800 characters. + * + * Generated from protobuf field string body = 4; + */ + protected $body = ''; + /** + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * + * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $plain_text_body = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Identifier. The resource name of the comment. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time when the comment was created. + * @type \Google\Cloud\Support\V2beta\Actor $creator + * Output only. The user or Google Support agent who created the comment. + * @type string $body + * The full comment body. + * Maximum of 12800 characters. + * @type string $plain_text_body + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\Comment::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Identifier. The resource name of the comment. + * + * 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. The resource name of the comment. + * + * 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; + } + + /** + * Output only. The time when the comment was created. + * + * 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. The time when the comment was created. + * + * 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. The user or Google Support agent who created the comment. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * Output only. The user or Google Support agent who created the comment. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * The full comment body. + * Maximum of 12800 characters. + * + * Generated from protobuf field string body = 4; + * @return string + */ + public function getBody() + { + return $this->body; + } + + /** + * The full comment body. + * Maximum of 12800 characters. + * + * Generated from protobuf field string body = 4; + * @param string $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkString($var, True); + $this->body = $var; + + return $this; + } + + /** + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * + * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + * @deprecated + */ + public function getPlainTextBody() + { + if ($this->plain_text_body !== '') { + @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); + } + return $this->plain_text_body; + } + + /** + * Output only. DEPRECATED. DO NOT USE. + * A duplicate of the `body` field. + * This field is only present for legacy reasons. + * + * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + * @deprecated + */ + public function setPlainTextBody($var) + { + @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->plain_text_body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php new file mode 100644 index 000000000000..3e6af8730079 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php @@ -0,0 +1,127 @@ +google.cloud.support.v2beta.CreateCaseRequest + */ +class CreateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the parent under which the case should be created. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The case to be created. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $case = null; + + /** + * @param string $parent Required. The name of the parent under which the case should be created. Please see + * {@see CaseServiceClient::projectName()} for help formatting this field. + * @param \Google\Cloud\Support\V2beta\PBCase $case Required. The case to be created. + * + * @return \Google\Cloud\Support\V2beta\CreateCaseRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2beta\PBCase $case): self + { + return (new self()) + ->setParent($parent) + ->setCase($case); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the parent under which the case should be created. + * @type \Google\Cloud\Support\V2beta\PBCase $case + * Required. The case to be created. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the parent under which the case should be created. + * + * 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 name of the parent under which the case should be created. + * + * 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 case to be created. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2beta\PBCase|null + */ + public function getCase() + { + return $this->case; + } + + public function hasCase() + { + return isset($this->case); + } + + public function clearCase() + { + unset($this->case); + } + + /** + * Required. The case to be created. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2beta\PBCase $var + * @return $this + */ + public function setCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\PBCase::class); + $this->case = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php new file mode 100644 index 000000000000..73722d599bcd --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php @@ -0,0 +1,127 @@ +google.cloud.support.v2beta.CreateCommentRequest + */ +class CreateCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case to which the comment should be added. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The comment to be added. + * + * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $comment = null; + + /** + * @param string $parent Required. The name of the case to which the comment should be added. Please see + * {@see CommentServiceClient::caseName()} for help formatting this field. + * @param \Google\Cloud\Support\V2beta\Comment $comment Required. The comment to be added. + * + * @return \Google\Cloud\Support\V2beta\CreateCommentRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2beta\Comment $comment): self + { + return (new self()) + ->setParent($parent) + ->setComment($comment); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The name of the case to which the comment should be added. + * @type \Google\Cloud\Support\V2beta\Comment $comment + * Required. The comment to be added. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case to which the comment should be added. + * + * 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 name of the case to which the comment should be added. + * + * 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 comment to be added. + * + * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2beta\Comment|null + */ + public function getComment() + { + return $this->comment; + } + + public function hasComment() + { + return isset($this->comment); + } + + public function clearComment() + { + unset($this->comment); + } + + /** + * Required. The comment to be added. + * + * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2beta\Comment $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Comment::class); + $this->comment = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..406c06c8dd58 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php @@ -0,0 +1,132 @@ +google.cloud.support.v2beta.CreateSupportEventSubscriptionRequest + */ +class CreateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The Pub/Sub configuration to create. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $support_event_subscription = null; + + /** + * @param string $parent Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_id} + * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. + * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription Required. The Pub/Sub configuration to create. + * + * @return \Google\Cloud\Support\V2beta\CreateSupportEventSubscriptionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription): self + { + return (new self()) + ->setParent($parent) + ->setSupportEventSubscription($supportEventSubscription); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_id} + * @type \Google\Cloud\Support\V2beta\SupportEventSubscription $support_event_subscription + * Required. The Pub/Sub configuration to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The parent resource name where the support event subscription + * will be created. Format: organizations/{organization_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 parent resource name where the support event subscription + * will be created. Format: organizations/{organization_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 Pub/Sub configuration to create. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2beta\SupportEventSubscription|null + */ + public function getSupportEventSubscription() + { + return $this->support_event_subscription; + } + + public function hasSupportEventSubscription() + { + return isset($this->support_event_subscription); + } + + public function clearSupportEventSubscription() + { + unset($this->support_event_subscription); + } + + /** + * Required. The Pub/Sub configuration to create. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $var + * @return $this + */ + public function setSupportEventSubscription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\SupportEventSubscription::class); + $this->support_event_subscription = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..749156d44fd3 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php @@ -0,0 +1,91 @@ +google.cloud.support.v2beta.DeleteSupportEventSubscriptionRequest + */ +class DeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\DeleteSupportEventSubscriptionRequest + * + * @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 name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to delete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php new file mode 100644 index 000000000000..fd71d8833511 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php @@ -0,0 +1,309 @@ +google.cloud.support.v2beta.EmailMessage + */ +class EmailMessage extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Resource name for the email message. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Time when this email message object was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The user or Google Support agent that created this email + * message. This is inferred from the headers on the email message. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor actor = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $actor = null; + /** + * Output only. Subject of the email. + * + * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $subject = ''; + /** + * Output only. Email addresses the email was sent to. + * + * Generated from protobuf field repeated string recipient_email_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $recipient_email_addresses; + /** + * Output only. Email addresses CCed on the email. + * + * Generated from protobuf field repeated string cc_email_addresses = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $cc_email_addresses; + /** + * Output only. The full email message body. A best-effort attempt is made to + * remove extraneous reply threads. + * + * Generated from protobuf field .google.cloud.support.v2beta.TextContent body_content = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $body_content = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Resource name for the email message. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. Time when this email message object was created. + * @type \Google\Cloud\Support\V2beta\Actor $actor + * Output only. The user or Google Support agent that created this email + * message. This is inferred from the headers on the email message. + * @type string $subject + * Output only. Subject of the email. + * @type string[] $recipient_email_addresses + * Output only. Email addresses the email was sent to. + * @type string[] $cc_email_addresses + * Output only. Email addresses CCed on the email. + * @type \Google\Cloud\Support\V2beta\TextContent $body_content + * Output only. The full email message body. A best-effort attempt is made to + * remove extraneous reply threads. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\EmailMessage::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Resource name for the email message. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Resource name for the email message. + * + * 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. Time when this email message object was created. + * + * 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. Time when this email message object was created. + * + * 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. The user or Google Support agent that created this email + * message. This is inferred from the headers on the email message. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor actor = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\Actor|null + */ + public function getActor() + { + return $this->actor; + } + + public function hasActor() + { + return isset($this->actor); + } + + public function clearActor() + { + unset($this->actor); + } + + /** + * Output only. The user or Google Support agent that created this email + * message. This is inferred from the headers on the email message. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor actor = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\Actor $var + * @return $this + */ + public function setActor($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); + $this->actor = $var; + + return $this; + } + + /** + * Output only. Subject of the email. + * + * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSubject() + { + return $this->subject; + } + + /** + * Output only. Subject of the email. + * + * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSubject($var) + { + GPBUtil::checkString($var, True); + $this->subject = $var; + + return $this; + } + + /** + * Output only. Email addresses the email was sent to. + * + * Generated from protobuf field repeated string recipient_email_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + */ + public function getRecipientEmailAddresses() + { + return $this->recipient_email_addresses; + } + + /** + * Output only. Email addresses the email was sent to. + * + * Generated from protobuf field repeated string recipient_email_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string[] $var + * @return $this + */ + public function setRecipientEmailAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->recipient_email_addresses = $arr; + + return $this; + } + + /** + * Output only. Email addresses CCed on the email. + * + * Generated from protobuf field repeated string cc_email_addresses = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField + */ + public function getCcEmailAddresses() + { + return $this->cc_email_addresses; + } + + /** + * Output only. Email addresses CCed on the email. + * + * Generated from protobuf field repeated string cc_email_addresses = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string[] $var + * @return $this + */ + public function setCcEmailAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->cc_email_addresses = $arr; + + return $this; + } + + /** + * Output only. The full email message body. A best-effort attempt is made to + * remove extraneous reply threads. + * + * Generated from protobuf field .google.cloud.support.v2beta.TextContent body_content = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\TextContent|null + */ + public function getBodyContent() + { + return $this->body_content; + } + + public function hasBodyContent() + { + return isset($this->body_content); + } + + public function clearBodyContent() + { + unset($this->body_content); + } + + /** + * Output only. The full email message body. A best-effort attempt is made to + * remove extraneous reply threads. + * + * Generated from protobuf field .google.cloud.support.v2beta.TextContent body_content = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\TextContent $var + * @return $this + */ + public function setBodyContent($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\TextContent::class); + $this->body_content = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php new file mode 100644 index 000000000000..59acffdb5c87 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php @@ -0,0 +1,111 @@ +google.cloud.support.v2beta.EscalateCaseRequest + */ +class EscalateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case to be escalated. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * The escalation information to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2beta.Escalation escalation = 2; + */ + protected $escalation = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the case to be escalated. + * @type \Google\Cloud\Support\V2beta\Escalation $escalation + * The escalation information to be sent with the escalation request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case to be escalated. + * + * 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 name of the case to be escalated. + * + * 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; + } + + /** + * The escalation information to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2beta.Escalation escalation = 2; + * @return \Google\Cloud\Support\V2beta\Escalation|null + */ + public function getEscalation() + { + return $this->escalation; + } + + public function hasEscalation() + { + return isset($this->escalation); + } + + public function clearEscalation() + { + unset($this->escalation); + } + + /** + * The escalation information to be sent with the escalation request. + * + * Generated from protobuf field .google.cloud.support.v2beta.Escalation escalation = 2; + * @param \Google\Cloud\Support\V2beta\Escalation $var + * @return $this + */ + public function setEscalation($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Escalation::class); + $this->escalation = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php new file mode 100644 index 000000000000..86610b1235f5 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php @@ -0,0 +1,105 @@ +google.cloud.support.v2beta.Escalation + */ +class Escalation extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2beta.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reason = 0; + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $justification = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $reason + * Required. The reason why the Case is being escalated. + * @type string $justification + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\Escalation::initOnce(); + parent::__construct($data); + } + + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2beta.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return int + */ + public function getReason() + { + return $this->reason; + } + + /** + * Required. The reason why the Case is being escalated. + * + * Generated from protobuf field .google.cloud.support.v2beta.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param int $var + * @return $this + */ + public function setReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\Escalation\Reason::class); + $this->reason = $var; + + return $this; + } + + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getJustification() + { + return $this->justification; + } + + /** + * Required. A free text description to accompany the `reason` field above. + * Provides additional context on why the case is being escalated. + * + * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setJustification($var) + { + GPBUtil::checkString($var, True); + $this->justification = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php new file mode 100644 index 000000000000..bd3d6fc6a7fe --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php @@ -0,0 +1,69 @@ +google.cloud.support.v2beta.Escalation.Reason + */ +class Reason +{ + /** + * The escalation reason is in an unknown state or has not been specified. + * + * Generated from protobuf enum REASON_UNSPECIFIED = 0; + */ + const REASON_UNSPECIFIED = 0; + /** + * The case is taking too long to resolve. + * + * Generated from protobuf enum RESOLUTION_TIME = 1; + */ + const RESOLUTION_TIME = 1; + /** + * The support agent does not have the expertise required to successfully + * resolve the issue. + * + * Generated from protobuf enum TECHNICAL_EXPERTISE = 2; + */ + const TECHNICAL_EXPERTISE = 2; + /** + * The issue is having a significant business impact. + * + * Generated from protobuf enum BUSINESS_IMPACT = 3; + */ + const BUSINESS_IMPACT = 3; + + private static $valueToName = [ + self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', + self::RESOLUTION_TIME => 'RESOLUTION_TIME', + self::TECHNICAL_EXPERTISE => 'TECHNICAL_EXPERTISE', + self::BUSINESS_IMPACT => 'BUSINESS_IMPACT', + ]; + + 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ExpungeSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ExpungeSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..4ba91172a944 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ExpungeSupportEventSubscriptionRequest.php @@ -0,0 +1,91 @@ +google.cloud.support.v2beta.ExpungeSupportEventSubscriptionRequest + */ +class ExpungeSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\ExpungeSupportEventSubscriptionRequest + * + * @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 name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to expunge. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php new file mode 100644 index 000000000000..1e8aef659d41 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php @@ -0,0 +1,221 @@ +google.cloud.support.v2beta.FeedItem + */ +class FeedItem extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Time corresponding to the event of this item. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $event_time = null; + protected $event_object; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Support\V2beta\Comment $comment + * Output only. A comment added to the case. + * @type \Google\Cloud\Support\V2beta\Attachment $attachment + * Output only. An attachment attached to the case. + * @type \Google\Cloud\Support\V2beta\EmailMessage $email_message + * Output only. An email message received in reply to the case. + * @type \Google\Cloud\Support\V2beta\Attachment $deleted_attachment + * Output only. A deleted attachment that used to be associated with the + * support case. + * @type \Google\Protobuf\Timestamp $event_time + * Output only. Time corresponding to the event of this item. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\FeedItem::initOnce(); + parent::__construct($data); + } + + /** + * Output only. A comment added to the case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\Comment|null + */ + public function getComment() + { + return $this->readOneof(100); + } + + public function hasComment() + { + return $this->hasOneof(100); + } + + /** + * Output only. A comment added to the case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\Comment $var + * @return $this + */ + public function setComment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Comment::class); + $this->writeOneof(100, $var); + + return $this; + } + + /** + * Output only. An attachment attached to the case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Attachment attachment = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\Attachment|null + */ + public function getAttachment() + { + return $this->readOneof(101); + } + + public function hasAttachment() + { + return $this->hasOneof(101); + } + + /** + * Output only. An attachment attached to the case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Attachment attachment = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\Attachment $var + * @return $this + */ + public function setAttachment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Attachment::class); + $this->writeOneof(101, $var); + + return $this; + } + + /** + * Output only. An email message received in reply to the case. + * + * Generated from protobuf field .google.cloud.support.v2beta.EmailMessage email_message = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\EmailMessage|null + */ + public function getEmailMessage() + { + return $this->readOneof(102); + } + + public function hasEmailMessage() + { + return $this->hasOneof(102); + } + + /** + * Output only. An email message received in reply to the case. + * + * Generated from protobuf field .google.cloud.support.v2beta.EmailMessage email_message = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\EmailMessage $var + * @return $this + */ + public function setEmailMessage($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\EmailMessage::class); + $this->writeOneof(102, $var); + + return $this; + } + + /** + * Output only. A deleted attachment that used to be associated with the + * support case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Attachment deleted_attachment = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Cloud\Support\V2beta\Attachment|null + */ + public function getDeletedAttachment() + { + return $this->readOneof(103); + } + + public function hasDeletedAttachment() + { + return $this->hasOneof(103); + } + + /** + * Output only. A deleted attachment that used to be associated with the + * support case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Attachment deleted_attachment = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Cloud\Support\V2beta\Attachment $var + * @return $this + */ + public function setDeletedAttachment($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Attachment::class); + $this->writeOneof(103, $var); + + return $this; + } + + /** + * Output only. Time corresponding to the event of this item. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEventTime() + { + return $this->event_time; + } + + public function hasEventTime() + { + return isset($this->event_time); + } + + public function clearEventTime() + { + unset($this->event_time); + } + + /** + * Output only. Time corresponding to the event of this item. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getEventObject() + { + return $this->whichOneof("event_object"); + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php new file mode 100644 index 000000000000..579ba88a3902 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2beta.GetAttachmentRequest + */ +class GetAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the attachment to get. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the attachment to get. Please see + * {@see CaseAttachmentServiceClient::attachmentName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\GetAttachmentRequest + * + * @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 name of the attachment to get. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the attachment to get. + * + * 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 name of the attachment to get. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php new file mode 100644 index 000000000000..ff14ec737b03 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2beta.GetCaseRequest + */ +class GetCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The full name of a case to be retrieved. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The full name of a case to be retrieved. Please see + * {@see CaseServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\GetCaseRequest + * + * @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 full name of a case to be retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The full name of a case to be retrieved. + * + * 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 full name of a case to be retrieved. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php new file mode 100644 index 000000000000..32f4fe3c943f --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php @@ -0,0 +1,81 @@ +google.cloud.support.v2beta.GetCommentRequest + */ +class GetCommentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the comment to retrieve. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the comment to retrieve. Please see + * {@see CommentServiceClient::commentName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\GetCommentRequest + * + * @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 name of the comment to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the comment to retrieve. + * + * 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 name of the comment to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..ce6febd2d464 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php @@ -0,0 +1,91 @@ +google.cloud.support.v2beta.GetSupportEventSubscriptionRequest + */ +class GetSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\GetSupportEventSubscriptionRequest + * + * @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 name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to retrieve. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php new file mode 100644 index 000000000000..22e0f596a164 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php @@ -0,0 +1,173 @@ +google.cloud.support.v2beta.ListAttachmentsRequest + */ +class ListAttachmentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case for which attachments should be listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the case for which attachments should be listed. Please see + * {@see CaseAttachmentServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\ListAttachmentsRequest + * + * @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 name of the case for which attachments should be listed. + * @type int $page_size + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case for which attachments should be listed. + * + * 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 name of the case for which attachments should be listed. + * + * 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; + } + + /** + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of attachments fetched with each request. + * If not provided, the default is 10. The maximum page size that will be + * returned is 100. + * The size of each page can be smaller than the requested page size and can + * include zero. For example, you could request 100 attachments on one page, + * receive 0, and then on the next page, receive 90. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php new file mode 100644 index 000000000000..8260ee7d199d --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2beta.ListAttachmentsResponse + */ +class ListAttachmentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of attachments associated with a case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Attachment attachments = 1; + */ + private $attachments; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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\Support\V2beta\Attachment[] $attachments + * The list of attachments associated with a case. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\AttachmentService::initOnce(); + parent::__construct($data); + } + + /** + * The list of attachments associated with a case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Attachment attachments = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\Attachment> + */ + public function getAttachments() + { + return $this->attachments; + } + + /** + * The list of attachments associated with a case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Attachment attachments = 1; + * @param \Google\Cloud\Support\V2beta\Attachment[] $var + * @return $this + */ + public function setAttachments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\Attachment::class); + $this->attachments = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.attachments.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php new file mode 100644 index 000000000000..7623afe88571 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php @@ -0,0 +1,287 @@ +google.cloud.support.v2beta.ListCasesRequest + */ +class ListCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of a parent to list cases under. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + */ + protected $filter = ''; + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + /** + * The product line to request cases for. If unspecified, only + * Google Cloud cases will be returned. + * + * Generated from protobuf field optional .google.cloud.support.v2beta.ProductLine product_line = 8; + */ + protected $product_line = null; + + /** + * @param string $parent Required. The name of a parent to list cases under. Please see + * {@see CaseServiceClient::projectName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\ListCasesRequest + * + * @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 name of a parent to list cases under. + * @type string $filter + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * @type int $page_size + * The maximum number of cases fetched with each request. Defaults to 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * @type int $product_line + * The product line to request cases for. If unspecified, only + * Google Cloud cases will be returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of a parent to list cases under. + * + * 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 name of a parent to list cases under. + * + * 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; + } + + /** + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * An expression used to filter cases. + * If it's an empty string, then no filtering happens. Otherwise, the endpoint + * returns the cases that match the filter. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * EXAMPLES: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string filter = 2; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of cases fetched with each request. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 5; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * The product line to request cases for. If unspecified, only + * Google Cloud cases will be returned. + * + * Generated from protobuf field optional .google.cloud.support.v2beta.ProductLine product_line = 8; + * @return int + */ + public function getProductLine() + { + return isset($this->product_line) ? $this->product_line : 0; + } + + public function hasProductLine() + { + return isset($this->product_line); + } + + public function clearProductLine() + { + unset($this->product_line); + } + + /** + * The product line to request cases for. If unspecified, only + * Google Cloud cases will be returned. + * + * Generated from protobuf field optional .google.cloud.support.v2beta.ProductLine product_line = 8; + * @param int $var + * @return $this + */ + public function setProductLine($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\ProductLine::class); + $this->product_line = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php new file mode 100644 index 000000000000..217fcabeaf16 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php @@ -0,0 +1,113 @@ +google.cloud.support.v2beta.ListCasesResponse + */ +class ListCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; + */ + private $cases; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * + * 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\Support\V2beta\PBCase[] $cases + * The list of cases associated with the parent after any + * filters have been applied. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\PBCase> + */ + public function getCases() + { + return $this->cases; + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; + * @param \Google\Cloud\Support\V2beta\PBCase[] $var + * @return $this + */ + public function setCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\PBCase::class); + $this->cases = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.list` requests. If unspecified, there are no + * more results to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php new file mode 100644 index 000000000000..1fee69ba5c52 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php @@ -0,0 +1,153 @@ +google.cloud.support.v2beta.ListCommentsRequest + */ +class ListCommentsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the case for which to list comments. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of comments to fetch. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * + * Generated from protobuf field string page_token = 5; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The name of the case for which to list comments. Please see + * {@see CommentServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\ListCommentsRequest + * + * @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 name of the case for which to list comments. + * @type int $page_size + * The maximum number of comments to fetch. Defaults to 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the case for which to list comments. + * + * 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 name of the case for which to list comments. + * + * 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; + } + + /** + * The maximum number of comments to fetch. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of comments to fetch. Defaults to 10. + * + * Generated from protobuf field int32 page_size = 4; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * + * Generated from protobuf field string page_token = 5; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is returned. + * + * Generated from protobuf field string page_token = 5; + * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php new file mode 100644 index 000000000000..98b78c99579e --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2beta.ListCommentsResponse + */ +class ListCommentsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of the comments associated with the case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Comment comments = 1; + */ + private $comments; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * + * 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\Support\V2beta\Comment[] $comments + * List of the comments associated with the case. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); + parent::__construct($data); + } + + /** + * List of the comments associated with the case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Comment comments = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\Comment> + */ + public function getComments() + { + return $this->comments; + } + + /** + * List of the comments associated with the case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Comment comments = 1; + * @param \Google\Cloud\Support\V2beta\Comment[] $var + * @return $this + */ + public function setComments($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\Comment::class); + $this->comments = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `cases.comments.list` requests. If unspecified, there + * are no more results to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php new file mode 100644 index 000000000000..975a70aa91fc --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php @@ -0,0 +1,274 @@ +google.cloud.support.v2beta.ListSupportEventSubscriptionsRequest + */ +class ListSupportEventSubscriptionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_id} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * + * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_deleted = false; + /** + * Optional. The maximum number of support event subscriptions to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * + * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_id} + * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\ListSupportEventSubscriptionsRequest + * + * @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 fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_id} + * @type string $filter + * Optional. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * @type bool $show_deleted + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * @type int $page_size + * Optional. The maximum number of support event subscriptions to return. + * @type string $page_token + * Optional. A token identifying the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_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 fully qualified name of the Cloud resource to list support + * event subscriptions under. Format: organizations/{organization_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. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. Filter expression based on AIP-160. + * Supported fields: + * - pub_sub_topic + * - state + * Examples: + * - `pub_sub_topic="projects/example-project/topics/example-topic"` + * - `state=WORKING` + * - `pub_sub_topic="projects/example-project/topics/example-topic" AND + * state=WORKING` + * + * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * + * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * Optional. Whether to show deleted subscriptions. By default, deleted + * subscriptions are not returned. + * + * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + + /** + * Optional. The maximum number of support event subscriptions to return. + * + * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of support event subscriptions to return. + * + * 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 the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * + * 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 the page of results to return. If + * unspecified, the first page is retrieved. + * When paginating, all other parameters provided to + * `ListSupportEventSubscriptions` must match the call that provided the page + * token. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php new file mode 100644 index 000000000000..399066f36b1d --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php @@ -0,0 +1,105 @@ +google.cloud.support.v2beta.ListSupportEventSubscriptionsResponse + */ +class ListSupportEventSubscriptionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The support event subscriptions. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.SupportEventSubscription support_event_subscriptions = 1; + */ + private $support_event_subscriptions; + /** + * A token, which can be sent 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\Support\V2beta\SupportEventSubscription[] $support_event_subscriptions + * The support event subscriptions. + * @type string $next_page_token + * A token, which can be sent 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\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * The support event subscriptions. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.SupportEventSubscription support_event_subscriptions = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\SupportEventSubscription> + */ + public function getSupportEventSubscriptions() + { + return $this->support_event_subscriptions; + } + + /** + * The support event subscriptions. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.SupportEventSubscription support_event_subscriptions = 1; + * @param \Google\Cloud\Support\V2beta\SupportEventSubscription[] $var + * @return $this + */ + public function setSupportEventSubscriptions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\SupportEventSubscription::class); + $this->support_event_subscriptions = $arr; + + return $this; + } + + /** + * A token, which can be sent 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, which can be sent 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php new file mode 100644 index 000000000000..fad5de1eb73e --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php @@ -0,0 +1,654 @@ +google.cloud.support.v2beta.Case + */ +class PBCase extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name for the case. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + */ + protected $display_name = ''; + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + */ + protected $description = ''; + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2beta.CaseClassification classification = 4; + */ + protected $classification = null; + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + */ + protected $time_zone = ''; + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + */ + private $subscriber_email_addresses; + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. The time this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 15; + */ + protected $creator = null; + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + */ + protected $contact_email = ''; + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + */ + protected $escalated = false; + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + */ + protected $test_case = false; + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + */ + protected $language_code = ''; + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case.Priority priority = 32; + */ + protected $priority = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name for the case. + * @type string $display_name + * The short summary of the issue reported in this case. + * @type string $description + * A broad description of the issue. + * @type \Google\Cloud\Support\V2beta\CaseClassification $classification + * The issue classification applicable to this case. + * @type string $time_zone + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * @type string[] $subscriber_email_addresses + * The email addresses to receive updates on this case. + * @type int $state + * Output only. The current status of the support case. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time this case was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time this case was last updated. + * @type \Google\Cloud\Support\V2beta\Actor $creator + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * @type string $contact_email + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * @type bool $escalated + * Whether the case is currently escalated. + * @type bool $test_case + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * @type string $language_code + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * @type int $priority + * The priority of this case. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\PBCase::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name for the case. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name for the case. + * + * 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; + } + + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The short summary of the issue reported in this case. + * + * Generated from protobuf field string display_name = 2; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * A broad description of the issue. + * + * Generated from protobuf field string description = 3; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2beta.CaseClassification classification = 4; + * @return \Google\Cloud\Support\V2beta\CaseClassification|null + */ + public function getClassification() + { + return $this->classification; + } + + public function hasClassification() + { + return isset($this->classification); + } + + public function clearClassification() + { + unset($this->classification); + } + + /** + * The issue classification applicable to this case. + * + * Generated from protobuf field .google.cloud.support.v2beta.CaseClassification classification = 4; + * @param \Google\Cloud\Support\V2beta\CaseClassification $var + * @return $this + */ + public function setClassification($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\CaseClassification::class); + $this->classification = $var; + + return $this; + } + + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + * @return string + */ + public function getTimeZone() + { + return $this->time_zone; + } + + /** + * The timezone of the user who created the support case. + * It should be in a format IANA recognizes: https://www.iana.org/time-zones. + * There is no additional validation done by the API. + * + * Generated from protobuf field string time_zone = 8; + * @param string $var + * @return $this + */ + public function setTimeZone($var) + { + GPBUtil::checkString($var, True); + $this->time_zone = $var; + + return $this; + } + + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + * @return RepeatedField + */ + public function getSubscriberEmailAddresses() + { + return $this->subscriber_email_addresses; + } + + /** + * The email addresses to receive updates on this case. + * + * Generated from protobuf field repeated string subscriber_email_addresses = 9; + * @param string[] $var + * @return $this + */ + public function setSubscriberEmailAddresses($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); + $this->subscriber_email_addresses = $arr; + + return $this; + } + + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The current status of the support case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\PBCase\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. The time this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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. The time this case was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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; + } + + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 15; + * @return \Google\Cloud\Support\V2beta\Actor|null + */ + public function getCreator() + { + return $this->creator; + } + + public function hasCreator() + { + return isset($this->creator); + } + + public function clearCreator() + { + unset($this->creator); + } + + /** + * The user who created the case. + * Note: The name and email will be obfuscated if the case was created by + * Google Support. + * + * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 15; + * @param \Google\Cloud\Support\V2beta\Actor $var + * @return $this + */ + public function setCreator($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); + $this->creator = $var; + + return $this; + } + + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + * @return string + */ + public function getContactEmail() + { + return $this->contact_email; + } + + /** + * A user-supplied email address to send case update notifications for. This + * should only be used in BYOID flows, where we cannot infer the user's email + * address directly from their EUCs. + * + * Generated from protobuf field string contact_email = 35; + * @param string $var + * @return $this + */ + public function setContactEmail($var) + { + GPBUtil::checkString($var, True); + $this->contact_email = $var; + + return $this; + } + + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + * @return bool + */ + public function getEscalated() + { + return $this->escalated; + } + + /** + * Whether the case is currently escalated. + * + * Generated from protobuf field bool escalated = 17; + * @param bool $var + * @return $this + */ + public function setEscalated($var) + { + GPBUtil::checkBool($var); + $this->escalated = $var; + + return $this; + } + + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + * @return bool + */ + public function getTestCase() + { + return $this->test_case; + } + + /** + * Whether this case was created for internal API testing and should not be + * acted on by the support team. + * + * Generated from protobuf field bool test_case = 19; + * @param bool $var + * @return $this + */ + public function setTestCase($var) + { + GPBUtil::checkBool($var); + $this->test_case = $var; + + return $this; + } + + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * The language the user has requested to receive support in. This should be a + * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). + * If no language or an unsupported language is specified, this field defaults + * to English (en). + * Language selection during case creation may affect your available support + * options. For a list of supported languages and their support working hours, + * see: https://cloud.google.com/support/docs/language-working-hours + * + * Generated from protobuf field string language_code = 23; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case.Priority priority = 32; + * @return int + */ + public function getPriority() + { + return $this->priority; + } + + /** + * The priority of this case. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case.Priority priority = 32; + * @param int $var + * @return $this + */ + public function setPriority($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\PBCase\Priority::class); + $this->priority = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php new file mode 100644 index 000000000000..051cdb63b60c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php @@ -0,0 +1,85 @@ +google.cloud.support.v2beta.Case.Priority + */ +class Priority +{ + /** + * Priority is undefined or has not been set yet. + * + * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; + */ + const PRIORITY_UNSPECIFIED = 0; + /** + * Extreme impact on a production service. Service is hard down. + * + * Generated from protobuf enum P0 = 1; + */ + const P0 = 1; + /** + * Critical impact on a production service. Service is currently unusable. + * + * Generated from protobuf enum P1 = 2; + */ + const P1 = 2; + /** + * Severe impact on a production service. Service is usable but greatly + * impaired. + * + * Generated from protobuf enum P2 = 3; + */ + const P2 = 3; + /** + * Medium impact on a production service. Service is available, but + * moderately impaired. + * + * Generated from protobuf enum P3 = 4; + */ + const P3 = 4; + /** + * General questions or minor issues. Production service is fully + * available. + * + * Generated from protobuf enum P4 = 5; + */ + const P4 = 5; + + private static $valueToName = [ + self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', + self::P0 => 'P0', + self::P1 => 'P1', + self::P2 => 'P2', + self::P3 => 'P3', + self::P4 => 'P4', + ]; + + 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php new file mode 100644 index 000000000000..29f64a2bed5c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php @@ -0,0 +1,86 @@ +google.cloud.support.v2beta.Case.State + */ +class State +{ + /** + * Case is in an unknown state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * The case has been created but no one is assigned to work on it yet. + * + * Generated from protobuf enum NEW = 1; + */ + const PBNEW = 1; + /** + * The case is currently being handled by Google support. + * + * Generated from protobuf enum IN_PROGRESS_GOOGLE_SUPPORT = 2; + */ + const IN_PROGRESS_GOOGLE_SUPPORT = 2; + /** + * Google is waiting for a response. + * + * Generated from protobuf enum ACTION_REQUIRED = 3; + */ + const ACTION_REQUIRED = 3; + /** + * A solution has been offered for the case, but it isn't yet closed. + * + * Generated from protobuf enum SOLUTION_PROVIDED = 4; + */ + const SOLUTION_PROVIDED = 4; + /** + * The case has been resolved. + * + * Generated from protobuf enum CLOSED = 5; + */ + const CLOSED = 5; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::PBNEW => 'NEW', + self::IN_PROGRESS_GOOGLE_SUPPORT => 'IN_PROGRESS_GOOGLE_SUPPORT', + self::ACTION_REQUIRED => 'ACTION_REQUIRED', + self::SOLUTION_PROVIDED => 'SOLUTION_PROVIDED', + 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)) { + $pbconst = __CLASS__. '::PB' . strtoupper($name); + if (!defined($pbconst)) { + throw new UnexpectedValueException(sprintf( + 'Enum %s has no value defined for name %s', __CLASS__, $name)); + } + return constant($pbconst); + } + return constant($const); + } +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php new file mode 100644 index 000000000000..c3544621a2df --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php @@ -0,0 +1,67 @@ +google.cloud.support.v2beta.Product + */ +class Product extends \Google\Protobuf\Internal\Message +{ + /** + * The product line of the Product. + * + * Generated from protobuf field .google.cloud.support.v2beta.ProductLine product_line = 1; + */ + protected $product_line = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $product_line + * The product line of the Product. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\PBCase::initOnce(); + parent::__construct($data); + } + + /** + * The product line of the Product. + * + * Generated from protobuf field .google.cloud.support.v2beta.ProductLine product_line = 1; + * @return int + */ + public function getProductLine() + { + return $this->product_line; + } + + /** + * The product line of the Product. + * + * Generated from protobuf field .google.cloud.support.v2beta.ProductLine product_line = 1; + * @param int $var + * @return $this + */ + public function setProductLine($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\ProductLine::class); + $this->product_line = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php new file mode 100644 index 000000000000..9df6d79ba10a --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php @@ -0,0 +1,61 @@ +google.cloud.support.v2beta.ProductLine + */ +class ProductLine +{ + /** + * Unknown product type. + * + * Generated from protobuf enum PRODUCT_LINE_UNSPECIFIED = 0; + */ + const PRODUCT_LINE_UNSPECIFIED = 0; + /** + * Google Cloud + * + * Generated from protobuf enum GOOGLE_CLOUD = 1; + */ + const GOOGLE_CLOUD = 1; + /** + * Google Maps + * + * Generated from protobuf enum GOOGLE_MAPS = 2; + */ + const GOOGLE_MAPS = 2; + + private static $valueToName = [ + self::PRODUCT_LINE_UNSPECIFIED => 'PRODUCT_LINE_UNSPECIFIED', + self::GOOGLE_CLOUD => 'GOOGLE_CLOUD', + self::GOOGLE_MAPS => 'GOOGLE_MAPS', + ]; + + 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php new file mode 100644 index 000000000000..8bfcfda2cd22 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php @@ -0,0 +1,191 @@ +google.cloud.support.v2beta.SearchCaseClassificationsRequest + */ +class SearchCaseClassificationsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + /** + * The maximum number of classifications fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. The product to return case classifications for. + * + * Generated from protobuf field .google.cloud.support.v2beta.Product product = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $product = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $query + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * @type int $page_size + * The maximum number of classifications fetched with each request. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * @type \Google\Cloud\Support\V2beta\Product $product + * Optional. The product to return case classifications for. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * An expression used to filter case classifications. + * If it's an empty string, then no filtering happens. Otherwise, case + * classifications will be returned that match the filter. + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The maximum number of classifications fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of classifications fetched with each request. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. The product to return case classifications for. + * + * Generated from protobuf field .google.cloud.support.v2beta.Product product = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Cloud\Support\V2beta\Product|null + */ + public function getProduct() + { + return $this->product; + } + + public function hasProduct() + { + return isset($this->product); + } + + public function clearProduct() + { + unset($this->product); + } + + /** + * Optional. The product to return case classifications for. + * + * Generated from protobuf field .google.cloud.support.v2beta.Product product = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Cloud\Support\V2beta\Product $var + * @return $this + */ + public function setProduct($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Product::class); + $this->product = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php new file mode 100644 index 000000000000..71c9b17fddd7 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2beta.SearchCaseClassificationsResponse + */ +class SearchCaseClassificationsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.CaseClassification case_classifications = 1; + */ + private $case_classifications; + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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\Support\V2beta\CaseClassification[] $case_classifications + * The classifications retrieved. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.CaseClassification case_classifications = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\CaseClassification> + */ + public function getCaseClassifications() + { + return $this->case_classifications; + } + + /** + * The classifications retrieved. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.CaseClassification case_classifications = 1; + * @param \Google\Cloud\Support\V2beta\CaseClassification[] $var + * @return $this + */ + public function setCaseClassifications($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\CaseClassification::class); + $this->case_classifications = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the `page_token` + * field of subsequent `caseClassifications.list` requests. If unspecified, + * there are no more results to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php new file mode 100644 index 000000000000..cfc445fa224a --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php @@ -0,0 +1,317 @@ +google.cloud.support.v2beta.SearchCasesRequest + */ +class SearchCasesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the parent resource to search for cases under. + * + * Generated from protobuf field string parent = 4; + */ + protected $parent = ''; + /** + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + */ + protected $query = ''; + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * The name of the parent resource to search for cases under. + * @type string $query + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * @type int $page_size + * The maximum number of cases fetched with each request. The default page + * size is 10. + * @type string $page_token + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The name of the parent resource to search for cases under. + * + * Generated from protobuf field string parent = 4; + * @return string + */ + public function getParent() + { + return $this->parent; + } + + /** + * The name of the parent resource to search for cases under. + * + * Generated from protobuf field string parent = 4; + * @param string $var + * @return $this + */ + public function setParent($var) + { + GPBUtil::checkString($var, True); + $this->parent = $var; + + return $this; + } + + /** + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * An expression used to filter cases. + * Expressions use the following fields separated by `AND` and specified with + * `=`: + * - `state`: Can be `OPEN` or `CLOSED`. + * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You + * can specify multiple values for priority using the `OR` operator. For + * example, `priority=P1 OR priority=P2`. + * - `creator.email`: The email address of the case creator. + * To search across `displayName`, `description`, and comments, use a global + * restriction with no keyword or operator. For example, `"my search"`. + * To search only cases updated after a certain date, use `update_time` + * restricted with that particular date, time, and timezone in ISO datetime + * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. + * `update_time` only supports the greater than operator (`>`). + * If you are using the `v2` version of the API, you must specify the case + * parent in the `parent` field. If you provide an empty `query`, all cases + * under the parent resource will be returned. + * If you are using the `v2beta` version of the API, you must specify the case + * parent in the `query` field using one of the two fields below, which are + * only available for `v2beta`. The `parent` field will be ignored. + * - `organization`: An organization name in the form + * `organizations/`. + * - `project`: A project name in the form `projects/`. + * Examples: + * For `v2`: + * - `state=CLOSED` + * - `state=OPEN AND creator.email="tester\@example.com"` + * - `state=OPEN AND (priority=P0 OR priority=P1)` + * - `update_time>"2020-01-01T00:00:00-05:00"` + * For `v2beta`: + * - `organization="organizations/123456789"` + * - `project="projects/my-project-id"` + * - `project="projects/123456789"` + * - `organization="organizations/123456789" AND state=CLOSED` + * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` + * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` + * + * Generated from protobuf field string query = 1; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of cases fetched with each request. The default page + * size is 10. + * + * Generated from protobuf field int32 page_size = 2; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token identifying the page of results to return. If unspecified, the + * first page is retrieved. + * + * Generated from protobuf field string page_token = 3; + * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php new file mode 100644 index 000000000000..ee2c8f233996 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php @@ -0,0 +1,113 @@ +google.cloud.support.v2beta.SearchCasesResponse + */ +class SearchCasesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; + */ + private $cases; + /** + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * + * 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\Support\V2beta\PBCase[] $cases + * The list of cases associated with the parent after any + * filters have been applied. + * @type string $next_page_token + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\PBCase> + */ + public function getCases() + { + return $this->cases; + } + + /** + * The list of cases associated with the parent after any + * filters have been applied. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; + * @param \Google\Cloud\Support\V2beta\PBCase[] $var + * @return $this + */ + public function setCases($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\PBCase::class); + $this->cases = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. Set this in the + * `page_token` field of subsequent `cases.search` requests. If unspecified, + * there are no more results to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php new file mode 100644 index 000000000000..f499a100b720 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php @@ -0,0 +1,208 @@ +google.cloud.support.v2beta.ShowFeedRequest + */ +class ShowFeedRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the case for which feed items should be + * listed. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Field to order feed items by, followed by `asc` or `desc` + * postfix. The only valid field is + * `creation_time`. This list is case-insensitive, default sorting order is + * ascending, and the redundant space characters are insignificant. + * Example: `creation_time desc` + * + * Generated from protobuf field string order_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + /** + * Optional. The maximum number of feed items fetched with each request. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A token identifying the page of results to return. If + * unspecified, it retrieves the first page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. The resource name of the case for which feed items should be + * listed. Please see + * {@see FeedServiceClient::caseName()} for help formatting this field. + * + * @return \Google\Cloud\Support\V2beta\ShowFeedRequest + * + * @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 resource name of the case for which feed items should be + * listed. + * @type string $order_by + * Optional. Field to order feed items by, followed by `asc` or `desc` + * postfix. The only valid field is + * `creation_time`. This list is case-insensitive, default sorting order is + * ascending, and the redundant space characters are insignificant. + * Example: `creation_time desc` + * @type int $page_size + * Optional. The maximum number of feed items fetched with each request. + * @type string $page_token + * Optional. A token identifying the page of results to return. If + * unspecified, it retrieves the first page. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\FeedService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the case for which feed items should be + * listed. + * + * 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 resource name of the case for which feed items should be + * listed. + * + * 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. Field to order feed items by, followed by `asc` or `desc` + * postfix. The only valid field is + * `creation_time`. This list is case-insensitive, default sorting order is + * ascending, and the redundant space characters are insignificant. + * Example: `creation_time desc` + * + * Generated from protobuf field string order_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. Field to order feed items by, followed by `asc` or `desc` + * postfix. The only valid field is + * `creation_time`. This list is case-insensitive, default sorting order is + * ascending, and the redundant space characters are insignificant. + * Example: `creation_time desc` + * + * Generated from protobuf field string order_by = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Optional. The maximum number of feed items fetched with each request. + * + * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of feed items fetched with each request. + * + * Generated from protobuf field int32 page_size = 3 [(.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 the page of results to return. If + * unspecified, it retrieves the first page. + * + * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A token identifying the page of results to return. If + * unspecified, it retrieves the first page. + * + * Generated from protobuf field string page_token = 4 [(.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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php new file mode 100644 index 000000000000..a8c8646a2c51 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php @@ -0,0 +1,109 @@ +google.cloud.support.v2beta.ShowFeedResponse + */ +class ShowFeedResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The list of feed items associated with the given Case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.FeedItem feed_items = 1; + */ + private $feed_items; + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `ShowFeedRequests`. + * If unspecified, there are no more results to retrieve. + * + * 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\Support\V2beta\FeedItem[] $feed_items + * The list of feed items associated with the given Case. + * @type string $next_page_token + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `ShowFeedRequests`. + * If unspecified, there are no more results to retrieve. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\FeedService::initOnce(); + parent::__construct($data); + } + + /** + * The list of feed items associated with the given Case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.FeedItem feed_items = 1; + * @return RepeatedField<\Google\Cloud\Support\V2beta\FeedItem> + */ + public function getFeedItems() + { + return $this->feed_items; + } + + /** + * The list of feed items associated with the given Case. + * + * Generated from protobuf field repeated .google.cloud.support.v2beta.FeedItem feed_items = 1; + * @param \Google\Cloud\Support\V2beta\FeedItem[] $var + * @return $this + */ + public function setFeedItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\FeedItem::class); + $this->feed_items = $arr; + + return $this; + } + + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `ShowFeedRequests`. + * If unspecified, there are no more results to retrieve. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * A token to retrieve the next page of results. This should be set in the + * `page_token` field of subsequent `ShowFeedRequests`. + * If unspecified, there are no more results to retrieve. + * + * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php new file mode 100644 index 000000000000..00735a9a48d8 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php @@ -0,0 +1,353 @@ +google.cloud.support.v2beta.SupportEventSubscription + */ +class SupportEventSubscription extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. The resource name of the support event subscription. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Required. The name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * + * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $pub_sub_topic = ''; + /** + * Output only. The state of the subscription. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $failure_reason = 0; + /** + * Output only. The time at which the subscription was created. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $create_time = null; + /** + * Output only. The time at which the subscription was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $update_time = null; + /** + * Output only. The time at which the subscription was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Output only. The time at which the subscription will be purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $purge_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. The resource name of the support event subscription. + * @type string $pub_sub_topic + * Required. The name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * @type int $state + * Output only. The state of the subscription. + * @type int $failure_reason + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * @type \Google\Protobuf\Timestamp $create_time + * Output only. The time at which the subscription was created. + * @type \Google\Protobuf\Timestamp $update_time + * Output only. The time at which the subscription was last updated. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The time at which the subscription was deleted. + * @type \Google\Protobuf\Timestamp $purge_time + * Output only. The time at which the subscription will be purged. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscription::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. The resource name of the support event subscription. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. The resource name of the support event subscription. + * + * 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 name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * + * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getPubSubTopic() + { + return $this->pub_sub_topic; + } + + /** + * Required. The name of the Pub/Sub topic to publish notifications to. + * Format: projects/{project}/topics/{topic} + * + * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setPubSubTopic($var) + { + GPBUtil::checkString($var, True); + $this->pub_sub_topic = $var; + + return $this; + } + + /** + * Output only. The state of the subscription. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. The state of the subscription. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\SupportEventSubscription\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getFailureReason() + { + return $this->failure_reason; + } + + /** + * Output only. Reason why subscription is failing. State of subscription + * must be FAILING in order for this to have a value. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setFailureReason($var) + { + GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\SupportEventSubscription\FailureReason::class); + $this->failure_reason = $var; + + return $this; + } + + /** + * Output only. The time at which the subscription was created. + * + * 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. The time at which the subscription was created. + * + * 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. The time at which the subscription was last updated. + * + * 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. The time at which the subscription was last updated. + * + * 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. The time at which the subscription was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getDeleteTime() + { + return $this->delete_time; + } + + public function hasDeleteTime() + { + return isset($this->delete_time); + } + + public function clearDeleteTime() + { + unset($this->delete_time); + } + + /** + * Output only. The time at which the subscription was deleted. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * Output only. The time at which the subscription will be purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getPurgeTime() + { + return $this->purge_time; + } + + public function hasPurgeTime() + { + return isset($this->purge_time); + } + + public function clearPurgeTime() + { + unset($this->purge_time); + } + + /** + * Output only. The time at which the subscription will be purged. + * + * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setPurgeTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->purge_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php new file mode 100644 index 000000000000..de7f91e52472 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php @@ -0,0 +1,70 @@ +google.cloud.support.v2beta.SupportEventSubscription.FailureReason + */ +class FailureReason +{ + /** + * Unspecified failure reason. + * + * Generated from protobuf enum FAILURE_REASON_UNSPECIFIED = 0; + */ + const FAILURE_REASON_UNSPECIFIED = 0; + /** + * The service account (i.e. + * cloud-support-apievents\@system.gserviceaccount.com) lacks the permission + * to publish to the customer's Pub/Sub topic. + * + * Generated from protobuf enum PERMISSION_DENIED = 1; + */ + const PERMISSION_DENIED = 1; + /** + * The specified Pub/Sub topic does not exist. + * + * Generated from protobuf enum TOPIC_NOT_FOUND = 2; + */ + const TOPIC_NOT_FOUND = 2; + /** + * Message failed to publish due to a system-side error. + * + * Generated from protobuf enum OTHER = 3; + */ + const OTHER = 3; + + private static $valueToName = [ + self::FAILURE_REASON_UNSPECIFIED => 'FAILURE_REASON_UNSPECIFIED', + self::PERMISSION_DENIED => 'PERMISSION_DENIED', + self::TOPIC_NOT_FOUND => 'TOPIC_NOT_FOUND', + self::OTHER => 'OTHER', + ]; + + 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php new file mode 100644 index 000000000000..e4c34e234dc3 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php @@ -0,0 +1,71 @@ +google.cloud.support.v2beta.SupportEventSubscription.State + */ +class State +{ + /** + * Unspecified state. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * Subscription is active and working. + * + * Generated from protobuf enum WORKING = 1; + */ + const WORKING = 1; + /** + * Subscription is failing. Notifications cannot be published for some + * reason. + * + * Generated from protobuf enum FAILING = 2; + */ + const FAILING = 2; + /** + * Subscription has been deleted and is pending purge. Notifications are not + * sent for deleted subscriptions. Deleted subscriptions are purged after + * their `purge_time` has passed. + * + * Generated from protobuf enum DELETED = 3; + */ + const DELETED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::WORKING => 'WORKING', + self::FAILING => 'FAILING', + 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php new file mode 100644 index 000000000000..e34f8aa6e1ae --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php @@ -0,0 +1,67 @@ +google.cloud.support.v2beta.TextContent + */ +class TextContent extends \Google\Protobuf\Internal\Message +{ + /** + * Content in this field should be rendered and interpreted as-is. + * + * Generated from protobuf field string plain_text = 1; + */ + protected $plain_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $plain_text + * Content in this field should be rendered and interpreted as-is. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\Content::initOnce(); + parent::__construct($data); + } + + /** + * Content in this field should be rendered and interpreted as-is. + * + * Generated from protobuf field string plain_text = 1; + * @return string + */ + public function getPlainText() + { + return $this->plain_text; + } + + /** + * Content in this field should be rendered and interpreted as-is. + * + * Generated from protobuf field string plain_text = 1; + * @param string $var + * @return $this + */ + public function setPlainText($var) + { + GPBUtil::checkString($var, True); + $this->plain_text = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..82aa755ae583 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php @@ -0,0 +1,75 @@ +google.cloud.support.v2beta.UndeleteSupportEventSubscriptionRequest + */ +class UndeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. The name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to undelete. + * Format: + * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php new file mode 100644 index 000000000000..00144f33d32c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php @@ -0,0 +1,167 @@ +google.cloud.support.v2beta.UpdateCaseRequest + */ +class UpdateCaseRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The case to update. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $case = null; + /** + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Support\V2beta\PBCase $case Required. The case to update. + * @param \Google\Protobuf\FieldMask $updateMask A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * @return \Google\Cloud\Support\V2beta\UpdateCaseRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Support\V2beta\PBCase $case, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setCase($case) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Support\V2beta\PBCase $case + * Required. The case to update. + * @type \Google\Protobuf\FieldMask $update_mask + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The case to update. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2beta\PBCase|null + */ + public function getCase() + { + return $this->case; + } + + public function hasCase() + { + return isset($this->case); + } + + public function clearCase() + { + unset($this->case); + } + + /** + * Required. The case to update. + * + * Generated from protobuf field .google.cloud.support.v2beta.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2beta\PBCase $var + * @return $this + */ + public function setCase($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\PBCase::class); + $this->case = $var; + + return $this; + } + + /** + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @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); + } + + /** + * A list of attributes of the case that should be updated. Supported values + * are `priority`, `display_name`, and `subscriber_email_addresses`. If no + * fields are specified, all supported fields are updated. + * Be careful - if you do not provide a field mask, then you might + * accidentally clear some fields. For example, if you leave the field mask + * empty and do not provide a value for `subscriber_email_addresses`, then + * `subscriber_email_addresses` is updated to empty. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php new file mode 100644 index 000000000000..25630369d25c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php @@ -0,0 +1,146 @@ +google.cloud.support.v2beta.UpdateSupportEventSubscriptionRequest + */ +class UpdateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $support_event_subscription = null; + /** + * Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * @return \Google\Cloud\Support\V2beta\UpdateSupportEventSubscriptionRequest + * + * @experimental + */ + public static function build(\Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSupportEventSubscription($supportEventSubscription) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Cloud\Support\V2beta\SupportEventSubscription $support_event_subscription + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); + parent::__construct($data); + } + + /** + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Cloud\Support\V2beta\SupportEventSubscription|null + */ + public function getSupportEventSubscription() + { + return $this->support_event_subscription; + } + + public function hasSupportEventSubscription() + { + return isset($this->support_event_subscription); + } + + public function clearSupportEventSubscription() + { + unset($this->support_event_subscription); + } + + /** + * Required. The support event subscription to update. + * The `name` field is used to identify the configuration to update. + * + * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $var + * @return $this + */ + public function setSupportEventSubscription($var) + { + GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\SupportEventSubscription::class); + $this->support_event_subscription = $var; + + return $this; + } + + /** + * Optional. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * 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. The list of fields to update. The only supported value is + * pub_sub_topic. + * + * 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/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php new file mode 100644 index 000000000000..2e1f084ac7a8 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Attachment $response */ + $response = $caseAttachmentServiceClient->getAttachment($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 = CaseAttachmentServiceClient::attachmentName( + '[ORGANIZATION]', + '[CASE]', + '[ATTACHMENT_ID]' + ); + + get_attachment_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_CaseAttachmentService_GetAttachment_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php new file mode 100644 index 000000000000..f4eae9af7556 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseAttachmentServiceClient->listAttachments($request); + + /** @var Attachment $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 = CaseAttachmentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + list_attachments_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_CaseAttachmentService_ListAttachments_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php new file mode 100644 index 000000000000..872794606f3c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->closeCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + close_case_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_CaseService_CloseCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php new file mode 100644 index 000000000000..e6b2fb4d5f8d --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php @@ -0,0 +1,77 @@ +setParent($formattedParent) + ->setCase($case); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->createCase($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 +{ + $formattedParent = CaseServiceClient::projectName('[PROJECT]'); + + create_case_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_CaseService_CreateCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php new file mode 100644 index 000000000000..7e040cb9b05e --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php @@ -0,0 +1,77 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->escalateCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + escalate_case_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_CaseService_EscalateCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php new file mode 100644 index 000000000000..46c7e7f725bc --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->getCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + get_case_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_CaseService_GetCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php new file mode 100644 index 000000000000..c8001c3a45bc --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseServiceClient->listCases($request); + + /** @var PBCase $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 = CaseServiceClient::projectName('[PROJECT]'); + + list_cases_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_CaseService_ListCases_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php new file mode 100644 index 000000000000..d22043d60a9a --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php @@ -0,0 +1,71 @@ + "`. For example, + * `"Technical Issue > Compute > Compute Engine"`. + * + * Classification IDs returned by this endpoint are valid for at least six + * months. When a classification is deactivated, this endpoint immediately + * stops returning it. After six months, `case.create` requests using the + * classification will fail. + * + * 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 search_case_classifications_sample(): void +{ + // Create a client. + $caseServiceClient = new CaseServiceClient(); + + // Prepare the request message. + $request = new SearchCaseClassificationsRequest(); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $caseServiceClient->searchCaseClassifications($request); + + /** @var CaseClassification $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 cloudsupport_v2beta_generated_CaseService_SearchCaseClassifications_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php new file mode 100644 index 000000000000..57e95d86f279 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php @@ -0,0 +1,62 @@ +searchCases($request); + + /** @var PBCase $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 cloudsupport_v2beta_generated_CaseService_SearchCases_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php new file mode 100644 index 000000000000..5d6da5dda2bc --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php @@ -0,0 +1,59 @@ +setCase($case); + + // Call the API and handle any network failures. + try { + /** @var PBCase $response */ + $response = $caseServiceClient->updateCase($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END cloudsupport_v2beta_generated_CaseService_UpdateCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php new file mode 100644 index 000000000000..a4c6bc8eaf58 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php @@ -0,0 +1,75 @@ +setParent($formattedParent) + ->setComment($comment); + + // Call the API and handle any network failures. + try { + /** @var Comment $response */ + $response = $commentServiceClient->createComment($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 +{ + $formattedParent = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + create_comment_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_CommentService_CreateComment_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php new file mode 100644 index 000000000000..05fa2f51eaed --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Comment $response */ + $response = $commentServiceClient->getComment($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 = CommentServiceClient::commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); + + get_comment_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_CommentService_GetComment_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php new file mode 100644 index 000000000000..2549f5508593 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php @@ -0,0 +1,76 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $commentServiceClient->listComments($request); + + /** @var Comment $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 = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + list_comments_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_CommentService_ListComments_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php b/owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php new file mode 100644 index 000000000000..98c127e2a626 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php @@ -0,0 +1,78 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $feedServiceClient->showFeed($request); + + /** @var FeedItem $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 = FeedServiceClient::caseName('[ORGANIZATION]', '[CASE]'); + + show_feed_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_FeedService_ShowFeed_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php new file mode 100644 index 000000000000..08c3cfecd28b --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php @@ -0,0 +1,80 @@ +setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->createSupportEventSubscription($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 +{ + $formattedParent = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); + $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; + + create_support_event_subscription_sample($formattedParent, $supportEventSubscriptionPubSubTopic); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_CreateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php new file mode 100644 index 000000000000..2b80c814cb7c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->deleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + delete_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_DeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php new file mode 100644 index 000000000000..5c6233b33634 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php @@ -0,0 +1,104 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $supportEventSubscriptionServiceClient->expungeSupportEventSubscription($request); + printf('Call completed successfully.' . PHP_EOL); + } 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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + expunge_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_ExpungeSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php new file mode 100644 index 000000000000..aa5b9e21636f --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->getSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + get_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_GetSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php new file mode 100644 index 000000000000..1c367aca9d11 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $supportEventSubscriptionServiceClient->listSupportEventSubscriptions($request); + + /** @var SupportEventSubscription $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 = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); + + list_support_event_subscriptions_sample($formattedParent); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_ListSupportEventSubscriptions_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php new file mode 100644 index 000000000000..2177e3aecaa9 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->undeleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( + '[ORGANIZATION]', + '[SUPPORT_EVENT_SUBSCRIPTION]' + ); + + undelete_support_event_subscription_sample($formattedName); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_UndeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php new file mode 100644 index 000000000000..690560ac45b7 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php @@ -0,0 +1,74 @@ +setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new UpdateSupportEventSubscriptionRequest()) + ->setSupportEventSubscription($supportEventSubscription); + + // Call the API and handle any network failures. + try { + /** @var SupportEventSubscription $response */ + $response = $supportEventSubscriptionServiceClient->updateSupportEventSubscription($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 +{ + $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; + + update_support_event_subscription_sample($supportEventSubscriptionPubSubTopic); +} +// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_UpdateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php new file mode 100644 index 000000000000..d08be6f860e0 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php @@ -0,0 +1,403 @@ + getAttachmentAsync(GetAttachmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listAttachmentsAsync(ListAttachmentsRequest $request, array $optionalArgs = []) + */ +final class CaseAttachmentServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2beta.CaseAttachmentService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/case_attachment_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/case_attachment_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/case_attachment_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/case_attachment_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a attachment + * resource. + * + * @param string $organization + * @param string $case + * @param string $attachmentId + * + * @return string The formatted attachment resource. + * + * @experimental + */ + public static function attachmentName(string $organization, string $case, string $attachmentId): string + { + return self::getPathTemplate('attachment')->render([ + 'organization' => $organization, + 'case' => $case, + 'attachment_id' => $attachmentId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + * + * @experimental + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + * + * @experimental + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case_attachment_id resource. + * + * @param string $organization + * @param string $case + * @param string $attachmentId + * + * @return string The formatted organization_case_attachment_id resource. + * + * @experimental + */ + public static function organizationCaseAttachmentIdName(string $organization, string $case, string $attachmentId): string + { + return self::getPathTemplate('organizationCaseAttachmentId')->render([ + 'organization' => $organization, + 'case' => $case, + 'attachment_id' => $attachmentId, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + * + * @experimental + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_case_attachment_id resource. + * + * @param string $project + * @param string $case + * @param string $attachmentId + * + * @return string The formatted project_case_attachment_id resource. + * + * @experimental + */ + public static function projectCaseAttachmentIdName(string $project, string $case, string $attachmentId): string + { + return self::getPathTemplate('projectCaseAttachmentId')->render([ + 'project' => $project, + 'case' => $case, + 'attachment_id' => $attachmentId, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - attachment: organizations/{organization}/cases/{case}/attachments/{attachment_id} + * - case: organizations/{organization}/cases/{case} + * - organizationCase: organizations/{organization}/cases/{case} + * - organizationCaseAttachmentId: organizations/{organization}/cases/{case}/attachments/{attachment_id} + * - projectCase: projects/{project}/cases/{case} + * - projectCaseAttachmentId: projects/{project}/cases/{case}/attachments/{attachment_id} + * + * 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. + * + * @experimental + */ + 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 'cloudsupport.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\Support\V2beta\CaseAttachmentServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CaseAttachmentServiceClient(['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 + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Retrieve an attachment. + * + * The async variant is {@see CaseAttachmentServiceClient::getAttachmentAsync()} . + * + * @example samples/V2beta/CaseAttachmentServiceClient/get_attachment.php + * + * @param GetAttachmentRequest $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 Attachment + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getAttachment(GetAttachmentRequest $request, array $callOptions = []): Attachment + { + return $this->startApiCall('GetAttachment', $request, $callOptions)->wait(); + } + + /** + * List all the attachments associated with a support case. + * + * The async variant is {@see CaseAttachmentServiceClient::listAttachmentsAsync()} + * . + * + * @example samples/V2beta/CaseAttachmentServiceClient/list_attachments.php + * + * @param ListAttachmentsRequest $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. + * + * @experimental + */ + public function listAttachments(ListAttachmentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListAttachments', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php new file mode 100644 index 000000000000..1ee28a54ab51 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php @@ -0,0 +1,576 @@ + closeCaseAsync(CloseCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface createCaseAsync(CreateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface escalateCaseAsync(EscalateCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCaseAsync(GetCaseRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCasesAsync(ListCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchCaseClassificationsAsync(SearchCaseClassificationsRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchCasesAsync(SearchCasesRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateCaseAsync(UpdateCaseRequest $request, array $optionalArgs = []) + */ +final class CaseServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2beta.CaseService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/case_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/case_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/case_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/case_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + * + * @experimental + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + * + * @experimental + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + * + * @experimental + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project + * resource. + * + * @param string $project + * + * @return string The formatted project resource. + * + * @experimental + */ + public static function projectName(string $project): string + { + return self::getPathTemplate('project')->render([ + 'project' => $project, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + * + * @experimental + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - organization: organizations/{organization} + * - organizationCase: organizations/{organization}/cases/{case} + * - project: projects/{project} + * - projectCase: projects/{project}/cases/{case} + * + * 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. + * + * @experimental + */ + 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 'cloudsupport.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\Support\V2beta\CaseServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CaseServiceClient(['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 + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Close a case. + * + * The async variant is {@see CaseServiceClient::closeCaseAsync()} . + * + * @example samples/V2beta/CaseServiceClient/close_case.php + * + * @param CloseCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function closeCase(CloseCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('CloseCase', $request, $callOptions)->wait(); + } + + /** + * Create a new case and associate it with a parent. + * + * It must have the following fields set: `display_name`, `description`, + * `classification`, and `priority`. If you're just testing the API and don't + * want to route your case to an agent, set `testCase=true`. + * + * The async variant is {@see CaseServiceClient::createCaseAsync()} . + * + * @example samples/V2beta/CaseServiceClient/create_case.php + * + * @param CreateCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createCase(CreateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('CreateCase', $request, $callOptions)->wait(); + } + + /** + * Escalate a case, starting the Google Cloud Support escalation management + * process. + * + * This operation is only available for some support services. Go to + * https://cloud.google.com/support and look for 'Technical support + * escalations' in the feature list to find out which ones let you + * do that. + * + * The async variant is {@see CaseServiceClient::escalateCaseAsync()} . + * + * @example samples/V2beta/CaseServiceClient/escalate_case.php + * + * @param EscalateCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function escalateCase(EscalateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('EscalateCase', $request, $callOptions)->wait(); + } + + /** + * Retrieve a case. + * + * The async variant is {@see CaseServiceClient::getCaseAsync()} . + * + * @example samples/V2beta/CaseServiceClient/get_case.php + * + * @param GetCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getCase(GetCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('GetCase', $request, $callOptions)->wait(); + } + + /** + * Retrieve all cases under a parent, but not its children. + * + * For example, listing cases under an organization only returns the cases + * that are directly parented by that organization. To retrieve cases + * under an organization and its projects, use `cases.search`. + * + * The async variant is {@see CaseServiceClient::listCasesAsync()} . + * + * @example samples/V2beta/CaseServiceClient/list_cases.php + * + * @param ListCasesRequest $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. + * + * @experimental + */ + public function listCases(ListCasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListCases', $request, $callOptions); + } + + /** + * Retrieve valid classifications to use when creating a support case. + * + * Classifications are hierarchical. Each classification is a string + * containing all levels of the hierarchy separated by `" > "`. For example, + * `"Technical Issue > Compute > Compute Engine"`. + * + * Classification IDs returned by this endpoint are valid for at least six + * months. When a classification is deactivated, this endpoint immediately + * stops returning it. After six months, `case.create` requests using the + * classification will fail. + * + * The async variant is {@see CaseServiceClient::searchCaseClassificationsAsync()} + * . + * + * @example samples/V2beta/CaseServiceClient/search_case_classifications.php + * + * @param SearchCaseClassificationsRequest $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. + * + * @experimental + */ + public function searchCaseClassifications(SearchCaseClassificationsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchCaseClassifications', $request, $callOptions); + } + + /** + * Search for cases using a query. + * + * The async variant is {@see CaseServiceClient::searchCasesAsync()} . + * + * @example samples/V2beta/CaseServiceClient/search_cases.php + * + * @param SearchCasesRequest $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. + * + * @experimental + */ + public function searchCases(SearchCasesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchCases', $request, $callOptions); + } + + /** + * Update a case. Only some fields can be updated. + * + * The async variant is {@see CaseServiceClient::updateCaseAsync()} . + * + * @example samples/V2beta/CaseServiceClient/update_case.php + * + * @param UpdateCaseRequest $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 PBCase + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateCase(UpdateCaseRequest $request, array $callOptions = []): PBCase + { + return $this->startApiCall('UpdateCase', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php new file mode 100644 index 000000000000..31930ea0515d --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php @@ -0,0 +1,434 @@ + createCommentAsync(CreateCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getCommentAsync(GetCommentRequest $request, array $optionalArgs = []) + * @method PromiseInterface listCommentsAsync(ListCommentsRequest $request, array $optionalArgs = []) + */ +final class CommentServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2beta.CommentService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/comment_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/comment_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/comment_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/comment_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + * + * @experimental + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a comment + * resource. + * + * @param string $organization + * @param string $case + * @param string $comment + * + * @return string The formatted comment resource. + * + * @experimental + */ + public static function commentName(string $organization, string $case, string $comment): string + { + return self::getPathTemplate('comment')->render([ + 'organization' => $organization, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + * + * @experimental + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case_comment resource. + * + * @param string $organization + * @param string $case + * @param string $comment + * + * @return string The formatted organization_case_comment resource. + * + * @experimental + */ + public static function organizationCaseCommentName(string $organization, string $case, string $comment): string + { + return self::getPathTemplate('organizationCaseComment')->render([ + 'organization' => $organization, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + * + * @experimental + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * project_case_comment resource. + * + * @param string $project + * @param string $case + * @param string $comment + * + * @return string The formatted project_case_comment resource. + * + * @experimental + */ + public static function projectCaseCommentName(string $project, string $case, string $comment): string + { + return self::getPathTemplate('projectCaseComment')->render([ + 'project' => $project, + 'case' => $case, + 'comment' => $comment, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - comment: organizations/{organization}/cases/{case}/comments/{comment} + * - organizationCase: organizations/{organization}/cases/{case} + * - organizationCaseComment: organizations/{organization}/cases/{case}/comments/{comment} + * - projectCase: projects/{project}/cases/{case} + * - projectCaseComment: projects/{project}/cases/{case}/comments/{comment} + * + * 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. + * + * @experimental + */ + 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 'cloudsupport.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\Support\V2beta\CommentServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new CommentServiceClient(['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 + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Add a new comment to a case. + * + * The comment must have the following fields set: `body`. + * + * The async variant is {@see CommentServiceClient::createCommentAsync()} . + * + * @example samples/V2beta/CommentServiceClient/create_comment.php + * + * @param CreateCommentRequest $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 Comment + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createComment(CreateCommentRequest $request, array $callOptions = []): Comment + { + return $this->startApiCall('CreateComment', $request, $callOptions)->wait(); + } + + /** + * Retrieve a comment. + * + * The async variant is {@see CommentServiceClient::getCommentAsync()} . + * + * @example samples/V2beta/CommentServiceClient/get_comment.php + * + * @param GetCommentRequest $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 Comment + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getComment(GetCommentRequest $request, array $callOptions = []): Comment + { + return $this->startApiCall('GetComment', $request, $callOptions)->wait(); + } + + /** + * List all the comments associated with a case. + * + * The async variant is {@see CommentServiceClient::listCommentsAsync()} . + * + * @example samples/V2beta/CommentServiceClient/list_comments.php + * + * @param ListCommentsRequest $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. + * + * @experimental + */ + public function listComments(ListCommentsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListComments', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php new file mode 100644 index 000000000000..bd9204cb0a37 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php @@ -0,0 +1,306 @@ + showFeedAsync(ShowFeedRequest $request, array $optionalArgs = []) + */ +final class FeedServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2beta.FeedService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/feed_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/feed_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/feed_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/feed_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a case + * resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted case resource. + * + * @experimental + */ + public static function caseName(string $organization, string $case): string + { + return self::getPathTemplate('case')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * organization_case resource. + * + * @param string $organization + * @param string $case + * + * @return string The formatted organization_case resource. + * + * @experimental + */ + public static function organizationCaseName(string $organization, string $case): string + { + return self::getPathTemplate('organizationCase')->render([ + 'organization' => $organization, + 'case' => $case, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a project_case + * resource. + * + * @param string $project + * @param string $case + * + * @return string The formatted project_case resource. + * + * @experimental + */ + public static function projectCaseName(string $project, string $case): string + { + return self::getPathTemplate('projectCase')->render([ + 'project' => $project, + 'case' => $case, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - case: organizations/{organization}/cases/{case} + * - organizationCase: organizations/{organization}/cases/{case} + * - projectCase: projects/{project}/cases/{case} + * + * 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. + * + * @experimental + */ + 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 'cloudsupport.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\Support\V2beta\FeedServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new FeedServiceClient(['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 + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Show items in the feed of this case, including case emails, + * attachments, and comments. + * + * The async variant is {@see FeedServiceClient::showFeedAsync()} . + * + * @example samples/V2beta/FeedServiceClient/show_feed.php + * + * @param ShowFeedRequest $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. + * + * @experimental + */ + public function showFeed(ShowFeedRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ShowFeed', $request, $callOptions); + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php new file mode 100644 index 000000000000..02add02328c2 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php @@ -0,0 +1,506 @@ + createSupportEventSubscriptionAsync(CreateSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSupportEventSubscriptionAsync(DeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface expungeSupportEventSubscriptionAsync(ExpungeSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSupportEventSubscriptionAsync(GetSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSupportEventSubscriptionsAsync(ListSupportEventSubscriptionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface undeleteSupportEventSubscriptionAsync(UndeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSupportEventSubscriptionAsync(UpdateSupportEventSubscriptionRequest $request, array $optionalArgs = []) + */ +final class SupportEventSubscriptionServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.cloud.support.v2beta.SupportEventSubscriptionService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/support_event_subscription_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a organization + * resource. + * + * @param string $organization + * + * @return string The formatted organization resource. + * + * @experimental + */ + public static function organizationName(string $organization): string + { + return self::getPathTemplate('organization')->render([ + 'organization' => $organization, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * support_event_subscription resource. + * + * @param string $organization + * @param string $supportEventSubscription + * + * @return string The formatted support_event_subscription resource. + * + * @experimental + */ + public static function supportEventSubscriptionName(string $organization, string $supportEventSubscription): string + { + return self::getPathTemplate('supportEventSubscription')->render([ + 'organization' => $organization, + 'support_event_subscription' => $supportEventSubscription, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - organization: organizations/{organization} + * - supportEventSubscription: organizations/{organization}/supportEventSubscriptions/{support_event_subscription} + * + * 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. + * + * @experimental + */ + 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 'cloudsupport.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\Support\V2beta\SupportEventSubscriptionServiceClient; + * $creds = new ServiceAccountCredentials($scopes, $json); + * $options = new SupportEventSubscriptionServiceClient(['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 + * + * @experimental + */ + public function __construct(array|ClientOptions $options = []) + { + $clientOptions = $this->buildClientOptions($options); + $this->setClientOptions($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); + } + + /** + * Creates a support event subscription for an organization. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::createSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php + * + * @param CreateSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function createSupportEventSubscription(CreateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('CreateSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Soft deletes a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::deleteSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php + * + * @param DeleteSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function deleteSupportEventSubscription(DeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('DeleteSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Expunges a support event subscription. + * + * EXAMPLES: + * + * cURL: + * + * ```shell + * support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" + * curl \ + * --request POST \ + * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ + * "https://cloudsupport.googleapis.com/v2beta/$support_event_subscription:expunge" + * ``` + * + * Python: + * + * ```python + * import googleapiclient.discovery + * + * api_version = "v2beta" + * supportApiService = googleapiclient.discovery.build( + * serviceName="cloudsupport", + * version=api_version, + * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", + * ) + * + * request = supportApiService.supportEventSubscriptions().expunge( + * name="organizations/123456789/supportEventSubscriptions/abcdef123456" + * ) + * print(request.execute()) + * ``` + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::expungeSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php + * + * @param ExpungeSupportEventSubscriptionRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function expungeSupportEventSubscription(ExpungeSupportEventSubscriptionRequest $request, array $callOptions = []): void + { + $this->startApiCall('ExpungeSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Gets a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::getSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php + * + * @param GetSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function getSupportEventSubscription(GetSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('GetSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Lists support event subscriptions for an organization. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::listSupportEventSubscriptionsAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php + * + * @param ListSupportEventSubscriptionsRequest $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. + * + * @experimental + */ + public function listSupportEventSubscriptions(ListSupportEventSubscriptionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSupportEventSubscriptions', $request, $callOptions); + } + + /** + * Undeletes a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::undeleteSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php + * + * @param UndeleteSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function undeleteSupportEventSubscription(UndeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('UndeleteSupportEventSubscription', $request, $callOptions)->wait(); + } + + /** + * Updates a support event subscription. + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::updateSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php + * + * @param UpdateSupportEventSubscriptionRequest $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 SupportEventSubscription + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function updateSupportEventSubscription(UpdateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription + { + return $this->startApiCall('UpdateSupportEventSubscription', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json b/owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json new file mode 100644 index 000000000000..5390be3dd93c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json @@ -0,0 +1,159 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.cloud.support.v2beta", + "libraryPackage": "Google\\Cloud\\Support\\V2beta", + "services": { + "CaseAttachmentService": { + "clients": { + "grpc": { + "libraryClient": "CaseAttachmentServiceGapicClient", + "rpcs": { + "GetAttachment": { + "methods": [ + "getAttachment" + ] + }, + "ListAttachments": { + "methods": [ + "listAttachments" + ] + } + } + } + } + }, + "CaseService": { + "clients": { + "grpc": { + "libraryClient": "CaseServiceGapicClient", + "rpcs": { + "CloseCase": { + "methods": [ + "closeCase" + ] + }, + "CreateCase": { + "methods": [ + "createCase" + ] + }, + "EscalateCase": { + "methods": [ + "escalateCase" + ] + }, + "GetCase": { + "methods": [ + "getCase" + ] + }, + "ListCases": { + "methods": [ + "listCases" + ] + }, + "SearchCaseClassifications": { + "methods": [ + "searchCaseClassifications" + ] + }, + "SearchCases": { + "methods": [ + "searchCases" + ] + }, + "UpdateCase": { + "methods": [ + "updateCase" + ] + } + } + } + } + }, + "CommentService": { + "clients": { + "grpc": { + "libraryClient": "CommentServiceGapicClient", + "rpcs": { + "CreateComment": { + "methods": [ + "createComment" + ] + }, + "GetComment": { + "methods": [ + "getComment" + ] + }, + "ListComments": { + "methods": [ + "listComments" + ] + } + } + } + } + }, + "FeedService": { + "clients": { + "grpc": { + "libraryClient": "FeedServiceGapicClient", + "rpcs": { + "ShowFeed": { + "methods": [ + "showFeed" + ] + } + } + } + } + }, + "SupportEventSubscriptionService": { + "clients": { + "grpc": { + "libraryClient": "SupportEventSubscriptionServiceGapicClient", + "rpcs": { + "CreateSupportEventSubscription": { + "methods": [ + "createSupportEventSubscription" + ] + }, + "DeleteSupportEventSubscription": { + "methods": [ + "deleteSupportEventSubscription" + ] + }, + "ExpungeSupportEventSubscription": { + "methods": [ + "expungeSupportEventSubscription" + ] + }, + "GetSupportEventSubscription": { + "methods": [ + "getSupportEventSubscription" + ] + }, + "ListSupportEventSubscriptions": { + "methods": [ + "listSupportEventSubscriptions" + ] + }, + "UndeleteSupportEventSubscription": { + "methods": [ + "undeleteSupportEventSubscription" + ] + }, + "UpdateSupportEventSubscription": { + "methods": [ + "updateSupportEventSubscription" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json new file mode 100644 index 000000000000..f19639a4ac33 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json @@ -0,0 +1,44 @@ +{ + "interfaces": { + "google.cloud.support.v2beta.CaseAttachmentService": { + "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": { + "GetAttachment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListAttachments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php new file mode 100644 index 000000000000..287ae1c56302 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php @@ -0,0 +1,68 @@ + [ + 'google.cloud.support.v2beta.CaseAttachmentService' => [ + 'GetAttachment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\Attachment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListAttachments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getAttachments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\ListAttachmentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'attachment' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', + 'case' => 'organizations/{organization}/cases/{case}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'organizationCaseAttachmentId' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', + 'projectCase' => 'projects/{project}/cases/{case}', + 'projectCaseAttachmentId' => 'projects/{project}/cases/{case}/attachments/{attachment_id}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php new file mode 100644 index 000000000000..6622e38fed04 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php @@ -0,0 +1,57 @@ + [ + 'google.cloud.support.v2beta.CaseAttachmentService' => [ + 'GetAttachment' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{name=*/*/cases/*/attachments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListAttachments' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}/attachments', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}/attachments', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json new file mode 100644 index 000000000000..110f290f14da --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json @@ -0,0 +1,84 @@ +{ + "interfaces": { + "google.cloud.support.v2beta.CaseService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "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 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CloseCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "CreateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EscalateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetCase": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchCaseClassifications": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchCases": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateCase": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php new file mode 100644 index 000000000000..e197c704af4b --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php @@ -0,0 +1,148 @@ + [ + 'google.cloud.support.v2beta.CaseService' => [ + 'CloseCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'EscalateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListCases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\ListCasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'SearchCaseClassifications' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCaseClassifications', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SearchCaseClassificationsResponse', + ], + 'SearchCases' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getCases', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SearchCasesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCase' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', + 'headerParams' => [ + [ + 'keyName' => 'case.name', + 'fieldAccessors' => [ + 'getCase', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'organization' => 'organizations/{organization}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'project' => 'projects/{project}', + 'projectCase' => 'projects/{project}/cases/{case}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php new file mode 100644 index 000000000000..14753e7f357c --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php @@ -0,0 +1,161 @@ + [ + 'google.cloud.support.v2beta.CaseService' => [ + 'CloseCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{name=projects/*/cases/*}:close', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{name=organizations/*/cases/*}:close', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{parent=projects/*}/cases', + 'body' => 'case', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{parent=organizations/*}/cases', + 'body' => 'case', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'EscalateCase' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{name=projects/*/cases/*}:escalate', + 'body' => '*', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{name=organizations/*/cases/*}:escalate', + 'body' => '*', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetCase' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{name=projects/*/cases/*}', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{name=organizations/*/cases/*}', + ], + ], + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListCases' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=projects/*}/cases', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=organizations/*}/cases', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'SearchCaseClassifications' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/caseClassifications:search', + ], + 'SearchCases' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=projects/*}/cases:search', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=organizations/*}/cases:search', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UpdateCase' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2beta/{case.name=projects/*/cases/*}', + 'body' => 'case', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v2beta/{case.name=organizations/*/cases/*}', + 'body' => 'case', + ], + ], + 'placeholders' => [ + 'case.name' => [ + 'getters' => [ + 'getCase', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json new file mode 100644 index 000000000000..a12278e1bc21 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json @@ -0,0 +1,59 @@ +{ + "interfaces": { + "google.cloud.support.v2beta.CommentService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "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 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetComment": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListComments": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php new file mode 100644 index 000000000000..615a3a58f6b9 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php @@ -0,0 +1,80 @@ + [ + 'google.cloud.support.v2beta.CommentService' => [ + 'CreateComment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\Comment', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'GetComment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\Comment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListComments' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getComments', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\ListCommentsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'comment' => 'organizations/{organization}/cases/{case}/comments/{comment}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'organizationCaseComment' => 'organizations/{organization}/cases/{case}/comments/{comment}', + 'projectCase' => 'projects/{project}/cases/{case}', + 'projectCaseComment' => 'projects/{project}/cases/{case}/comments/{comment}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php new file mode 100644 index 000000000000..29cc3af0ddb0 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php @@ -0,0 +1,76 @@ + [ + 'google.cloud.support.v2beta.CommentService' => [ + 'CreateComment' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}/comments', + 'body' => 'comment', + 'additionalBindings' => [ + [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}/comments', + 'body' => 'comment', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'GetComment' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{name=*/*/cases/*/comments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListComments' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}/comments', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}/comments', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json new file mode 100644 index 000000000000..04b964759795 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json @@ -0,0 +1,39 @@ +{ + "interfaces": { + "google.cloud.support.v2beta.FeedService": { + "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": { + "ShowFeed": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php new file mode 100644 index 000000000000..d71f2a17c867 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php @@ -0,0 +1,53 @@ + [ + 'google.cloud.support.v2beta.FeedService' => [ + 'ShowFeed' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getFeedItems', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\ShowFeedResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'case' => 'organizations/{organization}/cases/{case}', + 'organizationCase' => 'organizations/{organization}/cases/{case}', + 'projectCase' => 'projects/{project}/cases/{case}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php new file mode 100644 index 000000000000..e5d5d3336a27 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php @@ -0,0 +1,46 @@ + [ + 'google.cloud.support.v2beta.FeedService' => [ + 'ShowFeed' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}:showFeed', + 'additionalBindings' => [ + [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}:showFeed', + ], + ], + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json new file mode 100644 index 000000000000..619d72fecb7f --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json @@ -0,0 +1,57 @@ +{ + "interfaces": { + "google.cloud.support.v2beta.SupportEventSubscriptionService": { + "retry_codes": { + "no_retry_codes": [] + }, + "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 + } + }, + "methods": { + "CreateSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "DeleteSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ExpungeSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "GetSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "ListSupportEventSubscriptions": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UndeleteSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, + "UpdateSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + } + } + } + } +} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php new file mode 100644 index 000000000000..bd1cf86bccc1 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php @@ -0,0 +1,125 @@ + [ + 'google.cloud.support.v2beta.SupportEventSubscriptionService' => [ + 'CreateSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ExpungeSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListSupportEventSubscriptions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSupportEventSubscriptions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\ListSupportEventSubscriptionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'UndeleteSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', + 'headerParams' => [ + [ + 'keyName' => 'support_event_subscription.name', + 'fieldAccessors' => [ + 'getSupportEventSubscription', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'organization' => 'organizations/{organization}', + 'supportEventSubscription' => 'organizations/{organization}/supportEventSubscriptions/{support_event_subscription}', + ], + ], + ], +]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php new file mode 100644 index 000000000000..23433e486f8e --- /dev/null +++ b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php @@ -0,0 +1,111 @@ + [ + 'google.cloud.support.v2beta.SupportEventSubscriptionService' => [ + 'CreateSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{parent=organizations/*}/supportEventSubscriptions', + 'body' => 'support_event_subscription', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'DeleteSupportEventSubscription' => [ + 'method' => 'delete', + 'uriTemplate' => '/v2beta/{name=organizations/*/supportEventSubscriptions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExpungeSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{name=organizations/*/supportEventSubscriptions/*}:expunge', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSupportEventSubscription' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{name=organizations/*/supportEventSubscriptions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListSupportEventSubscriptions' => [ + 'method' => 'get', + 'uriTemplate' => '/v2beta/{parent=organizations/*}/supportEventSubscriptions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'UndeleteSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{name=organizations/*/supportEventSubscriptions/*}:undelete', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSupportEventSubscription' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2beta/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}', + 'body' => 'support_event_subscription', + 'placeholders' => [ + 'support_event_subscription.name' => [ + 'getters' => [ + 'getSupportEventSubscription', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php new file mode 100644 index 000000000000..5e7448a0adcd --- /dev/null +++ b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php @@ -0,0 +1,241 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CaseAttachmentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CaseAttachmentServiceClient($options); + } + + /** @test */ + public function getAttachmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $filename = 'filename-734768633'; + $mimeType = 'mimeType-196041627'; + $sizeBytes = 1796325715; + $expectedResponse = new Attachment(); + $expectedResponse->setName($name2); + $expectedResponse->setFilename($filename); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setSizeBytes($sizeBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); + $request = (new GetAttachmentRequest()) + ->setName($formattedName); + $response = $gapicClient->getAttachment($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.support.v2beta.CaseAttachmentService/GetAttachment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getAttachmentExceptionTest() + { + $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->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); + $request = (new GetAttachmentRequest()) + ->setName($formattedName); + try { + $gapicClient->getAttachment($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 listAttachmentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $attachmentsElement = new Attachment(); + $attachments = [ + $attachmentsElement, + ]; + $expectedResponse = new ListAttachmentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setAttachments($attachments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListAttachmentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listAttachments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getAttachments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CaseAttachmentService/ListAttachments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listAttachmentsExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListAttachmentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listAttachments($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 getAttachmentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $filename = 'filename-734768633'; + $mimeType = 'mimeType-196041627'; + $sizeBytes = 1796325715; + $expectedResponse = new Attachment(); + $expectedResponse->setName($name2); + $expectedResponse->setFilename($filename); + $expectedResponse->setMimeType($mimeType); + $expectedResponse->setSizeBytes($sizeBytes); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); + $request = (new GetAttachmentRequest()) + ->setName($formattedName); + $response = $gapicClient->getAttachmentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CaseAttachmentService/GetAttachment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php new file mode 100644 index 000000000000..64d4d93e4b7b --- /dev/null +++ b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php @@ -0,0 +1,712 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CaseServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CaseServiceClient($options); + } + + /** @test */ + public function closeCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->closeCase($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.support.v2beta.CaseService/CloseCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function closeCaseExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->closeCase($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 createCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $case = new PBCase(); + $request = (new CreateCaseRequest()) + ->setParent($formattedParent) + ->setCase($case); + $response = $gapicClient->createCase($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.support.v2beta.CaseService/CreateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getCase(); + $this->assertProtobufEquals($case, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCaseExceptionTest() + { + $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->projectName('[PROJECT]'); + $case = new PBCase(); + $request = (new CreateCaseRequest()) + ->setParent($formattedParent) + ->setCase($case); + try { + $gapicClient->createCase($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 escalateCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new EscalateCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->escalateCase($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.support.v2beta.CaseService/EscalateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function escalateCaseExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new EscalateCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->escalateCase($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 getCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new GetCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->getCase($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.support.v2beta.CaseService/GetCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCaseExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new GetCaseRequest()) + ->setName($formattedName); + try { + $gapicClient->getCase($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 listCasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $casesElement = new PBCase(); + $cases = [ + $casesElement, + ]; + $expectedResponse = new ListCasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCases($cases); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->projectName('[PROJECT]'); + $request = (new ListCasesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listCases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CaseService/ListCases', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCasesExceptionTest() + { + $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->projectName('[PROJECT]'); + $request = (new ListCasesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listCases($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 searchCaseClassificationsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $caseClassificationsElement = new CaseClassification(); + $caseClassifications = [ + $caseClassificationsElement, + ]; + $expectedResponse = new SearchCaseClassificationsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCaseClassifications($caseClassifications); + $transport->addResponse($expectedResponse); + $request = new SearchCaseClassificationsRequest(); + $response = $gapicClient->searchCaseClassifications($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCaseClassifications()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CaseService/SearchCaseClassifications', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCaseClassificationsExceptionTest() + { + $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 SearchCaseClassificationsRequest(); + try { + $gapicClient->searchCaseClassifications($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 searchCasesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $casesElement = new PBCase(); + $cases = [ + $casesElement, + ]; + $expectedResponse = new SearchCasesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setCases($cases); + $transport->addResponse($expectedResponse); + $request = new SearchCasesRequest(); + $response = $gapicClient->searchCases($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CaseService/SearchCases', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchCasesExceptionTest() + { + $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 SearchCasesRequest(); + try { + $gapicClient->searchCases($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 updateCaseTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $case = new PBCase(); + $request = (new UpdateCaseRequest()) + ->setCase($case); + $response = $gapicClient->updateCase($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.support.v2beta.CaseService/UpdateCase', $actualFuncCall); + $actualValue = $actualRequestObject->getCase(); + $this->assertProtobufEquals($case, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateCaseExceptionTest() + { + $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 + $case = new PBCase(); + $request = (new UpdateCaseRequest()) + ->setCase($case); + try { + $gapicClient->updateCase($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 closeCaseAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $displayName = 'displayName1615086568'; + $description = 'description-1724546052'; + $timeZone = 'timeZone36848094'; + $contactEmail = 'contactEmail947010237'; + $escalated = true; + $testCase = false; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new PBCase(); + $expectedResponse->setName($name2); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setDescription($description); + $expectedResponse->setTimeZone($timeZone); + $expectedResponse->setContactEmail($contactEmail); + $expectedResponse->setEscalated($escalated); + $expectedResponse->setTestCase($testCase); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new CloseCaseRequest()) + ->setName($formattedName); + $response = $gapicClient->closeCaseAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CaseService/CloseCase', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php new file mode 100644 index 000000000000..0e38fc9ee9d2 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php @@ -0,0 +1,316 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return CommentServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new CommentServiceClient($options); + } + + /** @test */ + public function createCommentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + $response = $gapicClient->createComment($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.support.v2beta.CommentService/CreateComment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getComment(); + $this->assertProtobufEquals($comment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createCommentExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + try { + $gapicClient->createComment($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 getCommentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name2); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); + $request = (new GetCommentRequest()) + ->setName($formattedName); + $response = $gapicClient->getComment($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.support.v2beta.CommentService/GetComment', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getCommentExceptionTest() + { + $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->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); + $request = (new GetCommentRequest()) + ->setName($formattedName); + try { + $gapicClient->getComment($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 listCommentsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $commentsElement = new Comment(); + $comments = [ + $commentsElement, + ]; + $expectedResponse = new ListCommentsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setComments($comments); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListCommentsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listComments($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getComments()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CommentService/ListComments', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listCommentsExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ListCommentsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listComments($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 createCommentAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $body = 'body3029410'; + $plainTextBody = 'plainTextBody-2068348609'; + $expectedResponse = new Comment(); + $expectedResponse->setName($name); + $expectedResponse->setBody($body); + $expectedResponse->setPlainTextBody($plainTextBody); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $comment = new Comment(); + $request = (new CreateCommentRequest()) + ->setParent($formattedParent) + ->setComment($comment); + $response = $gapicClient->createCommentAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.CommentService/CreateComment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getComment(); + $this->assertProtobufEquals($comment, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php new file mode 100644 index 000000000000..303a6a57e9b5 --- /dev/null +++ b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php @@ -0,0 +1,172 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return FeedServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new FeedServiceClient($options); + } + + /** @test */ + public function showFeedTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $feedItemsElement = new FeedItem(); + $feedItems = [ + $feedItemsElement, + ]; + $expectedResponse = new ShowFeedResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFeedItems($feedItems); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ShowFeedRequest()) + ->setParent($formattedParent); + $response = $gapicClient->showFeed($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFeedItems()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.FeedService/ShowFeed', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function showFeedExceptionTest() + { + $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->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ShowFeedRequest()) + ->setParent($formattedParent); + try { + $gapicClient->showFeed($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 showFeedAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $feedItemsElement = new FeedItem(); + $feedItems = [ + $feedItemsElement, + ]; + $expectedResponse = new ShowFeedResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setFeedItems($feedItems); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); + $request = (new ShowFeedRequest()) + ->setParent($formattedParent); + $response = $gapicClient->showFeedAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getFeedItems()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.FeedService/ShowFeed', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php new file mode 100644 index 000000000000..89b9140cdb6e --- /dev/null +++ b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php @@ -0,0 +1,584 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return SupportEventSubscriptionServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SupportEventSubscriptionServiceClient($options); + } + + /** @test */ + public function createSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + $response = $gapicClient->createSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSupportEventSubscription(); + $this->assertProtobufEquals($supportEventSubscription, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSupportEventSubscriptionExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + try { + $gapicClient->createSupportEventSubscription($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 deleteSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name2); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new DeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/DeleteSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new DeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSupportEventSubscription($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 expungeSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new ExpungeSupportEventSubscriptionRequest()) + ->setName($formattedName); + $gapicClient->expungeSupportEventSubscription($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.SupportEventSubscriptionService/ExpungeSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function expungeSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new ExpungeSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->expungeSupportEventSubscription($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 getSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name2); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new GetSupportEventSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->getSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/GetSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new GetSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->getSupportEventSubscription($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 listSupportEventSubscriptionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $supportEventSubscriptionsElement = new SupportEventSubscription(); + $supportEventSubscriptions = [ + $supportEventSubscriptionsElement, + ]; + $expectedResponse = new ListSupportEventSubscriptionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSupportEventSubscriptions($supportEventSubscriptions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $request = (new ListSupportEventSubscriptionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listSupportEventSubscriptions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSupportEventSubscriptions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.SupportEventSubscriptionService/ListSupportEventSubscriptions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSupportEventSubscriptionsExceptionTest() + { + $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->organizationName('[ORGANIZATION]'); + $request = (new ListSupportEventSubscriptionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listSupportEventSubscriptions($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 undeleteSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name2); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new UndeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + $response = $gapicClient->undeleteSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/UndeleteSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function undeleteSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new UndeleteSupportEventSubscriptionRequest()) + ->setName($formattedName); + try { + $gapicClient->undeleteSupportEventSubscription($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 updateSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new UpdateSupportEventSubscriptionRequest()) + ->setSupportEventSubscription($supportEventSubscription); + $response = $gapicClient->updateSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/UpdateSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getSupportEventSubscription(); + $this->assertProtobufEquals($supportEventSubscription, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSupportEventSubscriptionExceptionTest() + { + $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 + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new UpdateSupportEventSubscriptionRequest()) + ->setSupportEventSubscription($supportEventSubscription); + try { + $gapicClient->updateSupportEventSubscription($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 createSupportEventSubscriptionAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $pubSubTopic = 'pubSubTopic-2117200978'; + $expectedResponse = new SupportEventSubscription(); + $expectedResponse->setName($name); + $expectedResponse->setPubSubTopic($pubSubTopic); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); + $supportEventSubscription = new SupportEventSubscription(); + $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; + $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); + $request = (new CreateSupportEventSubscriptionRequest()) + ->setParent($formattedParent) + ->setSupportEventSubscription($supportEventSubscription); + $response = $gapicClient->createSupportEventSubscriptionAsync($request)->wait(); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.cloud.support.v2beta.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getSupportEventSubscription(); + $this->assertProtobufEquals($supportEventSubscription, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From b7f274c43e8116f33bd885dda60ace63f9f7b0e4 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Fri, 24 Jul 2026 22:03:24 +0000 Subject: [PATCH 4/4] =?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 --- .../SupportEventSubscriptionService.php | 3 +- .../expunge_support_event_subscription.php | 0 .../list_support_event_subscriptions.php | 2 +- .../SupportEventSubscriptionServiceClient.php | 64 +- ...ExpungeSupportEventSubscriptionRequest.php | 0 Support/src/V2beta/gapic_metadata.json | 5 + ...nt_subscription_service_client_config.json | 5 + ...subscription_service_descriptor_config.php | 12 + ...ubscription_service_rest_client_config.php | 24 +- ...portEventSubscriptionServiceClientTest.php | 67 ++ .../Google/Cloud/Support/V2/Actor.php | 25 - .../Google/Cloud/Support/V2/Attachment.php | 28 - .../Cloud/Support/V2/AttachmentService.php | 29 - .../Google/Cloud/Support/V2/CaseService.php | 31 - .../Google/Cloud/Support/V2/Comment.php | 28 - .../Cloud/Support/V2/CommentService.php | 29 - .../Google/Cloud/Support/V2/Escalation.php | 25 - .../Google/Cloud/Support/V2/PBCase.php | 28 - .../Support/V2/SupportEventSubscription.php | 27 - .../V2/SupportEventSubscriptionService.php | 31 - .../src/Google/Cloud/Support/V2/Actor.php | 222 ------ .../Google/Cloud/Support/V2/Attachment.php | 267 ------- .../Cloud/Support/V2/CaseClassification.php | 137 ---- .../Cloud/Support/V2/CloseCaseRequest.php | 67 -- .../src/Google/Cloud/Support/V2/Comment.php | 245 ------ .../Cloud/Support/V2/CreateCaseRequest.php | 127 ---- .../Cloud/Support/V2/CreateCommentRequest.php | 127 ---- .../CreateSupportEventSubscriptionRequest.php | 132 ---- .../DeleteSupportEventSubscriptionRequest.php | 91 --- .../Cloud/Support/V2/EscalateCaseRequest.php | 111 --- .../Google/Cloud/Support/V2/Escalation.php | 105 --- .../Cloud/Support/V2/Escalation/Reason.php | 69 -- ...ExpungeSupportEventSubscriptionRequest.php | 91 --- .../Cloud/Support/V2/GetAttachmentRequest.php | 81 -- .../Cloud/Support/V2/GetCaseRequest.php | 81 -- .../Cloud/Support/V2/GetCommentRequest.php | 81 -- .../V2/GetSupportEventSubscriptionRequest.php | 91 --- .../Support/V2/ListAttachmentsRequest.php | 173 ----- .../Support/V2/ListAttachmentsResponse.php | 109 --- .../Cloud/Support/V2/ListCasesRequest.php | 239 ------ .../Cloud/Support/V2/ListCasesResponse.php | 113 --- .../Cloud/Support/V2/ListCommentsRequest.php | 153 ---- .../Cloud/Support/V2/ListCommentsResponse.php | 109 --- .../ListSupportEventSubscriptionsRequest.php | 274 ------- .../ListSupportEventSubscriptionsResponse.php | 105 --- .../src/Google/Cloud/Support/V2/PBCase.php | 654 ---------------- .../Cloud/Support/V2/PBCase/Priority.php | 85 --- .../Google/Cloud/Support/V2/PBCase/State.php | 86 --- .../V2/SearchCaseClassificationsRequest.php | 147 ---- .../V2/SearchCaseClassificationsResponse.php | 109 --- .../Cloud/Support/V2/SearchCasesRequest.php | 317 -------- .../Cloud/Support/V2/SearchCasesResponse.php | 113 --- .../Support/V2/SupportEventSubscription.php | 353 --------- .../FailureReason.php | 70 -- .../V2/SupportEventSubscription/State.php | 71 -- ...ndeleteSupportEventSubscriptionRequest.php | 75 -- .../Cloud/Support/V2/UpdateCaseRequest.php | 167 ---- .../UpdateSupportEventSubscriptionRequest.php | 146 ---- .../get_attachment.php | 105 --- .../list_attachments.php | 76 -- .../V2/CaseServiceClient/close_case.php | 71 -- .../V2/CaseServiceClient/create_case.php | 77 -- .../V2/CaseServiceClient/escalate_case.php | 77 -- .../samples/V2/CaseServiceClient/get_case.php | 71 -- .../V2/CaseServiceClient/list_cases.php | 80 -- .../search_case_classifications.php | 71 -- .../V2/CaseServiceClient/search_cases.php | 62 -- .../V2/CaseServiceClient/update_case.php | 59 -- .../CommentServiceClient/create_comment.php | 75 -- .../V2/CommentServiceClient/get_comment.php | 100 --- .../V2/CommentServiceClient/list_comments.php | 76 -- .../create_support_event_subscription.php | 80 -- .../delete_support_event_subscription.php | 76 -- .../expunge_support_event_subscription.php | 104 --- .../get_support_event_subscription.php | 76 -- .../list_support_event_subscriptions.php | 77 -- .../undelete_support_event_subscription.php | 76 -- .../update_support_event_subscription.php | 74 -- .../V2/Client/CaseAttachmentServiceClient.php | 409 ---------- .../v2/src/V2/Client/CaseServiceClient.php | 542 ------------- .../v2/src/V2/Client/CommentServiceClient.php | 437 ----------- .../SupportEventSubscriptionServiceClient.php | 480 ------------ .../Support/v2/src/V2/gapic_metadata.json | 145 ---- ...case_attachment_service_client_config.json | 44 -- ...e_attachment_service_descriptor_config.php | 68 -- ..._attachment_service_rest_client_config.php | 57 -- .../resources/case_service_client_config.json | 84 --- .../case_service_descriptor_config.php | 148 ---- .../case_service_rest_client_config.php | 161 ---- .../comment_service_client_config.json | 59 -- .../comment_service_descriptor_config.php | 80 -- .../comment_service_rest_client_config.php | 76 -- ...nt_subscription_service_client_config.json | 57 -- ...subscription_service_descriptor_config.php | 125 --- ...ubscription_service_rest_client_config.php | 111 --- .../CaseAttachmentServiceClientTest.php | 241 ------ .../Unit/V2/Client/CaseServiceClientTest.php | 712 ------------------ .../V2/Client/CommentServiceClientTest.php | 316 -------- ...portEventSubscriptionServiceClientTest.php | 584 -------------- .../Google/Cloud/Support/V2Beta/Actor.php | 25 - .../Cloud/Support/V2Beta/Attachment.php | 28 - .../Support/V2Beta/AttachmentService.php | 29 - .../Cloud/Support/V2Beta/CaseService.php | 31 - .../Google/Cloud/Support/V2Beta/Comment.php | 28 - .../Cloud/Support/V2Beta/CommentService.php | 29 - .../Google/Cloud/Support/V2Beta/Content.php | 24 - .../Cloud/Support/V2Beta/EmailMessage.php | 29 - .../Cloud/Support/V2Beta/Escalation.php | 25 - .../Google/Cloud/Support/V2Beta/FeedItem.php | 29 - .../Cloud/Support/V2Beta/FeedService.php | 29 - .../Google/Cloud/Support/V2Beta/PBCase.php | 28 - .../V2Beta/SupportEventSubscription.php | 27 - .../SupportEventSubscriptionService.php | 31 - .../src/Google/Cloud/Support/V2beta/Actor.php | 222 ------ .../Cloud/Support/V2beta/Attachment.php | 267 ------- .../Support/V2beta/CaseClassification.php | 181 ----- .../Cloud/Support/V2beta/CloseCaseRequest.php | 67 -- .../Google/Cloud/Support/V2beta/Comment.php | 245 ------ .../Support/V2beta/CreateCaseRequest.php | 127 ---- .../Support/V2beta/CreateCommentRequest.php | 127 ---- .../CreateSupportEventSubscriptionRequest.php | 132 ---- .../DeleteSupportEventSubscriptionRequest.php | 91 --- .../Cloud/Support/V2beta/EmailMessage.php | 309 -------- .../Support/V2beta/EscalateCaseRequest.php | 111 --- .../Cloud/Support/V2beta/Escalation.php | 105 --- .../Support/V2beta/Escalation/Reason.php | 69 -- .../Google/Cloud/Support/V2beta/FeedItem.php | 221 ------ .../Support/V2beta/GetAttachmentRequest.php | 81 -- .../Cloud/Support/V2beta/GetCaseRequest.php | 81 -- .../Support/V2beta/GetCommentRequest.php | 81 -- .../GetSupportEventSubscriptionRequest.php | 91 --- .../Support/V2beta/ListAttachmentsRequest.php | 173 ----- .../V2beta/ListAttachmentsResponse.php | 109 --- .../Cloud/Support/V2beta/ListCasesRequest.php | 287 ------- .../Support/V2beta/ListCasesResponse.php | 113 --- .../Support/V2beta/ListCommentsRequest.php | 153 ---- .../Support/V2beta/ListCommentsResponse.php | 109 --- .../ListSupportEventSubscriptionsRequest.php | 274 ------- .../ListSupportEventSubscriptionsResponse.php | 105 --- .../Google/Cloud/Support/V2beta/PBCase.php | 654 ---------------- .../Cloud/Support/V2beta/PBCase/Priority.php | 85 --- .../Cloud/Support/V2beta/PBCase/State.php | 86 --- .../Google/Cloud/Support/V2beta/Product.php | 67 -- .../Cloud/Support/V2beta/ProductLine.php | 61 -- .../SearchCaseClassificationsRequest.php | 191 ----- .../SearchCaseClassificationsResponse.php | 109 --- .../Support/V2beta/SearchCasesRequest.php | 317 -------- .../Support/V2beta/SearchCasesResponse.php | 113 --- .../Cloud/Support/V2beta/ShowFeedRequest.php | 208 ----- .../Cloud/Support/V2beta/ShowFeedResponse.php | 109 --- .../V2beta/SupportEventSubscription.php | 353 --------- .../FailureReason.php | 70 -- .../V2beta/SupportEventSubscription/State.php | 71 -- .../Cloud/Support/V2beta/TextContent.php | 67 -- ...ndeleteSupportEventSubscriptionRequest.php | 75 -- .../Support/V2beta/UpdateCaseRequest.php | 167 ---- .../UpdateSupportEventSubscriptionRequest.php | 146 ---- .../get_attachment.php | 75 -- .../list_attachments.php | 76 -- .../V2beta/CaseServiceClient/close_case.php | 71 -- .../V2beta/CaseServiceClient/create_case.php | 77 -- .../CaseServiceClient/escalate_case.php | 77 -- .../V2beta/CaseServiceClient/get_case.php | 71 -- .../V2beta/CaseServiceClient/list_cases.php | 80 -- .../search_case_classifications.php | 71 -- .../V2beta/CaseServiceClient/search_cases.php | 62 -- .../V2beta/CaseServiceClient/update_case.php | 59 -- .../CommentServiceClient/create_comment.php | 75 -- .../CommentServiceClient/get_comment.php | 71 -- .../CommentServiceClient/list_comments.php | 76 -- .../V2beta/FeedServiceClient/show_feed.php | 78 -- .../create_support_event_subscription.php | 80 -- .../delete_support_event_subscription.php | 76 -- .../get_support_event_subscription.php | 76 -- .../list_support_event_subscriptions.php | 77 -- .../undelete_support_event_subscription.php | 76 -- .../update_support_event_subscription.php | 74 -- .../Client/CaseAttachmentServiceClient.php | 403 ---------- .../src/V2beta/Client/CaseServiceClient.php | 576 -------------- .../V2beta/Client/CommentServiceClient.php | 434 ----------- .../src/V2beta/Client/FeedServiceClient.php | 306 -------- .../SupportEventSubscriptionServiceClient.php | 506 ------------- .../v2beta/src/V2beta/gapic_metadata.json | 159 ---- ...case_attachment_service_client_config.json | 44 -- ...e_attachment_service_descriptor_config.php | 68 -- ..._attachment_service_rest_client_config.php | 57 -- .../resources/case_service_client_config.json | 84 --- .../case_service_descriptor_config.php | 148 ---- .../case_service_rest_client_config.php | 161 ---- .../comment_service_client_config.json | 59 -- .../comment_service_descriptor_config.php | 80 -- .../comment_service_rest_client_config.php | 76 -- .../resources/feed_service_client_config.json | 39 - .../feed_service_descriptor_config.php | 53 -- .../feed_service_rest_client_config.php | 46 -- ...nt_subscription_service_client_config.json | 57 -- ...subscription_service_descriptor_config.php | 125 --- ...ubscription_service_rest_client_config.php | 111 --- .../CaseAttachmentServiceClientTest.php | 241 ------ .../V2beta/Client/CaseServiceClientTest.php | 712 ------------------ .../Client/CommentServiceClientTest.php | 316 -------- .../V2beta/Client/FeedServiceClientTest.php | 172 ----- ...portEventSubscriptionServiceClientTest.php | 584 -------------- 203 files changed, 173 insertions(+), 26949 deletions(-) rename {owl-bot-staging/Support/v2beta => Support}/samples/V2beta/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php (100%) rename {owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support => Support/src}/V2beta/ExpungeSupportEventSubscriptionRequest.php (100%) delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CommentService.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/gapic_metadata.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CommentService.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscriptionService.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Actor.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php delete mode 100644 owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php delete mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php delete mode 100644 owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php diff --git a/Support/metadata/V2Beta/SupportEventSubscriptionService.php b/Support/metadata/V2Beta/SupportEventSubscriptionService.php index a679ac8e4f9f..5759072393f7 100644 --- a/Support/metadata/V2Beta/SupportEventSubscriptionService.php +++ b/Support/metadata/V2Beta/SupportEventSubscriptionService.php @@ -19,9 +19,10 @@ public static function initOnce() { \GPBMetadata\Google\Api\FieldBehavior::initOnce(); \GPBMetadata\Google\Api\Resource::initOnce(); \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscription::initOnce(); + \GPBMetadata\Google\Protobuf\GPBEmpty::initOnce(); \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xB7\x19\x0ADgoogle/cloud/support/v2beta/support_event_subscription_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A createSupportEventSubscriptionAsync(CreateSupportEventSubscriptionRequest $request, array $optionalArgs = []) * @method PromiseInterface deleteSupportEventSubscriptionAsync(DeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) + * @method PromiseInterface expungeSupportEventSubscriptionAsync(ExpungeSupportEventSubscriptionRequest $request, array $optionalArgs = []) * @method PromiseInterface getSupportEventSubscriptionAsync(GetSupportEventSubscriptionRequest $request, array $optionalArgs = []) * @method PromiseInterface listSupportEventSubscriptionsAsync(ListSupportEventSubscriptionsRequest $request, array $optionalArgs = []) * @method PromiseInterface undeleteSupportEventSubscriptionAsync(UndeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) @@ -328,6 +330,66 @@ public function deleteSupportEventSubscription( return $this->startApiCall('DeleteSupportEventSubscription', $request, $callOptions)->wait(); } + /** + * Expunges a support event subscription. + * + * EXAMPLES: + * + * cURL: + * + * ```shell + * support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" + * curl \ + * --request POST \ + * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ + * "https://cloudsupport.googleapis.com/v2beta/$support_event_subscription:expunge" + * ``` + * + * Python: + * + * ```python + * import googleapiclient.discovery + * + * api_version = "v2beta" + * supportApiService = googleapiclient.discovery.build( + * serviceName="cloudsupport", + * version=api_version, + * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", + * ) + * + * request = supportApiService.supportEventSubscriptions().expunge( + * name="organizations/123456789/supportEventSubscriptions/abcdef123456" + * ) + * print(request.execute()) + * ``` + * + * The async variant is + * {@see SupportEventSubscriptionServiceClient::expungeSupportEventSubscriptionAsync()} + * . + * + * @example samples/V2beta/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php + * + * @param ExpungeSupportEventSubscriptionRequest $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. + * } + * + * @throws ApiException Thrown if the API call fails. + * + * @experimental + */ + public function expungeSupportEventSubscription( + ExpungeSupportEventSubscriptionRequest $request, + array $callOptions = [] + ): void { + $this->startApiCall('ExpungeSupportEventSubscription', $request, $callOptions)->wait(); + } + /** * Gets a support event subscription. * @@ -361,7 +423,7 @@ public function getSupportEventSubscription( } /** - * Lists support event subscriptions. + * Lists support event subscriptions for an organization. * * The async variant is * {@see SupportEventSubscriptionServiceClient::listSupportEventSubscriptionsAsync()} diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ExpungeSupportEventSubscriptionRequest.php b/Support/src/V2beta/ExpungeSupportEventSubscriptionRequest.php similarity index 100% rename from owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ExpungeSupportEventSubscriptionRequest.php rename to Support/src/V2beta/ExpungeSupportEventSubscriptionRequest.php diff --git a/Support/src/V2beta/gapic_metadata.json b/Support/src/V2beta/gapic_metadata.json index f91cf79c6b4d..5390be3dd93c 100644 --- a/Support/src/V2beta/gapic_metadata.json +++ b/Support/src/V2beta/gapic_metadata.json @@ -126,6 +126,11 @@ "deleteSupportEventSubscription" ] }, + "ExpungeSupportEventSubscription": { + "methods": [ + "expungeSupportEventSubscription" + ] + }, "GetSupportEventSubscription": { "methods": [ "getSupportEventSubscription" diff --git a/Support/src/V2beta/resources/support_event_subscription_service_client_config.json b/Support/src/V2beta/resources/support_event_subscription_service_client_config.json index b40a371728ef..619d72fecb7f 100644 --- a/Support/src/V2beta/resources/support_event_subscription_service_client_config.json +++ b/Support/src/V2beta/resources/support_event_subscription_service_client_config.json @@ -26,6 +26,11 @@ "retry_codes_name": "no_retry_codes", "retry_params_name": "no_retry_params" }, + "ExpungeSupportEventSubscription": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_codes", + "retry_params_name": "no_retry_params" + }, "GetSupportEventSubscription": { "timeout_millis": 60000, "retry_codes_name": "no_retry_codes", diff --git a/Support/src/V2beta/resources/support_event_subscription_service_descriptor_config.php b/Support/src/V2beta/resources/support_event_subscription_service_descriptor_config.php index 824f8c5dabe9..bd1cf86bccc1 100644 --- a/Support/src/V2beta/resources/support_event_subscription_service_descriptor_config.php +++ b/Support/src/V2beta/resources/support_event_subscription_service_descriptor_config.php @@ -47,6 +47,18 @@ ], ], ], + 'ExpungeSupportEventSubscription' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], 'GetSupportEventSubscription' => [ 'callType' => \Google\ApiCore\Call::UNARY_CALL, 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', diff --git a/Support/src/V2beta/resources/support_event_subscription_service_rest_client_config.php b/Support/src/V2beta/resources/support_event_subscription_service_rest_client_config.php index 78d090501dce..23433e486f8e 100644 --- a/Support/src/V2beta/resources/support_event_subscription_service_rest_client_config.php +++ b/Support/src/V2beta/resources/support_event_subscription_service_rest_client_config.php @@ -25,7 +25,7 @@ 'google.cloud.support.v2beta.SupportEventSubscriptionService' => [ 'CreateSupportEventSubscription' => [ 'method' => 'post', - 'uriTemplate' => '/v2beta/{parent=*/*}/supportEventSubscriptions', + 'uriTemplate' => '/v2beta/{parent=organizations/*}/supportEventSubscriptions', 'body' => 'support_event_subscription', 'placeholders' => [ 'parent' => [ @@ -37,7 +37,19 @@ ], 'DeleteSupportEventSubscription' => [ 'method' => 'delete', - 'uriTemplate' => '/v2beta/{name=*/*/supportEventSubscriptions/*}', + 'uriTemplate' => '/v2beta/{name=organizations/*/supportEventSubscriptions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ExpungeSupportEventSubscription' => [ + 'method' => 'post', + 'uriTemplate' => '/v2beta/{name=organizations/*/supportEventSubscriptions/*}:expunge', + 'body' => '*', 'placeholders' => [ 'name' => [ 'getters' => [ @@ -48,7 +60,7 @@ ], 'GetSupportEventSubscription' => [ 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=*/*/supportEventSubscriptions/*}', + 'uriTemplate' => '/v2beta/{name=organizations/*/supportEventSubscriptions/*}', 'placeholders' => [ 'name' => [ 'getters' => [ @@ -59,7 +71,7 @@ ], 'ListSupportEventSubscriptions' => [ 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=*/*}/supportEventSubscriptions', + 'uriTemplate' => '/v2beta/{parent=organizations/*}/supportEventSubscriptions', 'placeholders' => [ 'parent' => [ 'getters' => [ @@ -70,7 +82,7 @@ ], 'UndeleteSupportEventSubscription' => [ 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=*/*/supportEventSubscriptions/*}:undelete', + 'uriTemplate' => '/v2beta/{name=organizations/*/supportEventSubscriptions/*}:undelete', 'body' => '*', 'placeholders' => [ 'name' => [ @@ -82,7 +94,7 @@ ], 'UpdateSupportEventSubscription' => [ 'method' => 'patch', - 'uriTemplate' => '/v2beta/{support_event_subscription.name=*/*/supportEventSubscriptions/*}', + 'uriTemplate' => '/v2beta/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}', 'body' => 'support_event_subscription', 'placeholders' => [ 'support_event_subscription.name' => [ diff --git a/Support/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php b/Support/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php index 88bc2a9b4503..323557d556ae 100644 --- a/Support/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php +++ b/Support/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php @@ -29,12 +29,14 @@ use Google\Cloud\Support\V2beta\Client\SupportEventSubscriptionServiceClient; use Google\Cloud\Support\V2beta\CreateSupportEventSubscriptionRequest; use Google\Cloud\Support\V2beta\DeleteSupportEventSubscriptionRequest; +use Google\Cloud\Support\V2beta\ExpungeSupportEventSubscriptionRequest; use Google\Cloud\Support\V2beta\GetSupportEventSubscriptionRequest; use Google\Cloud\Support\V2beta\ListSupportEventSubscriptionsRequest; use Google\Cloud\Support\V2beta\ListSupportEventSubscriptionsResponse; use Google\Cloud\Support\V2beta\SupportEventSubscription; use Google\Cloud\Support\V2beta\UndeleteSupportEventSubscriptionRequest; use Google\Cloud\Support\V2beta\UpdateSupportEventSubscriptionRequest; +use Google\Protobuf\GPBEmpty; use Google\Rpc\Code; use stdClass; @@ -220,6 +222,71 @@ public function deleteSupportEventSubscriptionExceptionTest() $this->assertTrue($transport->isExhausted()); } + /** @test */ + public function expungeSupportEventSubscriptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new ExpungeSupportEventSubscriptionRequest())->setName($formattedName); + $gapicClient->expungeSupportEventSubscription($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame( + '/google.cloud.support.v2beta.SupportEventSubscriptionService/ExpungeSupportEventSubscription', + $actualFuncCall + ); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function expungeSupportEventSubscriptionExceptionTest() + { + $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); + $request = (new ExpungeSupportEventSubscriptionRequest())->setName($formattedName); + try { + $gapicClient->expungeSupportEventSubscription($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 getSupportEventSubscriptionTest() { diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php deleted file mode 100644 index 6a81217bb838..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Actor.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xE2\x02\x0A#google/cloud/support/v2/actor.proto\x12\x17google.cloud.support.v2\"d\x0A\x05Actor\x12\x14\x0A\x0Cdisplay_name\x18\x01 \x01(\x09\x12\x11\x0A\x05email\x18\x02 \x01(\x09B\x02\x18\x01\x12\x1B\x0A\x0Egoogle_support\x18\x04 \x01(\x08B\x03\xE0A\x03\x12\x15\x0A\x08username\x18\x05 \x01(\x09B\x03\xE0A\x03B\xB3\x01\x0A\x1Bcom.google.cloud.support.v2B\x0AActorProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php deleted file mode 100644 index 5c8e5e22e383..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Attachment.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xEE\x05\x0A(google/cloud/support/v2/attachment.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A#google/cloud/support/v2/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x84\x03\x0A\x0AAttachment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x07creator\x18\x03 \x01(\x0B2\x1E.google.cloud.support.v2.ActorB\x03\xE0A\x03\x12\x10\x0A\x08filename\x18\x04 \x01(\x09\x12\x16\x0A\x09mime_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Asize_bytes\x18\x06 \x01(\x03B\x03\xE0A\x03:\xB0\x01\xEAA\xAC\x01\x0A&cloudsupport.googleapis.com/Attachment\x12Eorganizations/{organization}/cases/{case}/attachments/{attachment_id}\x12;projects/{project}/cases/{case}/attachments/{attachment_id}B\xB8\x01\x0A\x1Bcom.google.cloud.support.v2B\x0FAttachmentProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php deleted file mode 100644 index 1516fd0052ef..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/AttachmentService.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC2\x09\x0A0google/cloud/support/v2/attachment_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A(google/cloud/support/v2/attachment.proto\"y\x0A\x16ListAttachmentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"T\x0A\x14GetAttachmentRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&cloudsupport.googleapis.com/Attachment\"l\x0A\x17ListAttachmentsResponse\x128\x0A\x0Battachments\x18\x01 \x03(\x0B2#.google.cloud.support.v2.Attachment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xEC\x03\x0A\x15CaseAttachmentService\x12\xE6\x01\x0A\x0FListAttachments\x12/.google.cloud.support.v2.ListAttachmentsRequest\x1A0.google.cloud.support.v2.ListAttachmentsResponse\"p\xDAA\x06parent\x82\xD3\xE4\x93\x02a\x12+/v2/{parent=projects/*/cases/*}/attachmentsZ2\x120/v2/{parent=organizations/*/cases/*}/attachments\x12\x98\x01\x0A\x0DGetAttachment\x12-.google.cloud.support.v2.GetAttachmentRequest\x1A#.google.cloud.support.v2.Attachment\"3\xDAA\x04name\x82\xD3\xE4\x93\x02&\x12\$/v2/{name=*/*/cases/*/attachments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xBF\x01\x0A\x1Bcom.google.cloud.support.v2B\x16AttachmentServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php deleted file mode 100644 index 5a6996bec887..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/CaseService.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xB8\x19\x0A*google/cloud/support/v2/case_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A\"google/cloud/support/v2/case.proto\x1A(google/cloud/support/v2/escalation.proto\x1A google/protobuf/field_mask.proto\"H\x0A\x0EGetCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"\x7F\x0A\x11CreateCaseRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x120\x0A\x04case\x18\x02 \x01(\x0B2\x1D.google.cloud.support.v2.CaseB\x03\xE0A\x02\"\x83\x01\x0A\x10ListCasesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\"Z\x0A\x11ListCasesResponse\x12,\x0A\x05cases\x18\x01 \x03(\x0B2\x1D.google.cloud.support.v2.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"Z\x0A\x12SearchCasesRequest\x12\x0E\x0A\x06parent\x18\x04 \x01(\x09\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\\\x0A\x13SearchCasesResponse\x12,\x0A\x05cases\x18\x01 \x03(\x0B2\x1D.google.cloud.support.v2.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x86\x01\x0A\x13EscalateCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x127\x0A\x0Aescalation\x18\x02 \x01(\x0B2#.google.cloud.support.v2.Escalation\"v\x0A\x11UpdateCaseRequest\x120\x0A\x04case\x18\x01 \x01(\x0B2\x1D.google.cloud.support.v2.CaseB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"J\x0A\x10CloseCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"X\x0A SearchCaseClassificationsRequest\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"\x87\x01\x0A!SearchCaseClassificationsResponse\x12I\x0A\x14case_classifications\x18\x01 \x03(\x0B2+.google.cloud.support.v2.CaseClassification\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xCF\x0C\x0A\x0BCaseService\x12\xA5\x01\x0A\x07GetCase\x12'.google.cloud.support.v2.GetCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"R\xDAA\x04name\x82\xD3\xE4\x93\x02E\x12\x1D/v2/{name=projects/*/cases/*}Z\$\x12\"/v2/{name=organizations/*/cases/*}\x12\xB8\x01\x0A\x09ListCases\x12).google.cloud.support.v2.ListCasesRequest\x1A*.google.cloud.support.v2.ListCasesResponse\"T\xDAA\x06parent\x82\xD3\xE4\x93\x02E\x12\x1D/v2/{parent=projects/*}/casesZ\$\x12\"/v2/{parent=organizations/*}/cases\x12\xC3\x01\x0A\x0BSearchCases\x12+.google.cloud.support.v2.SearchCasesRequest\x1A,.google.cloud.support.v2.SearchCasesResponse\"Y\x82\xD3\xE4\x93\x02S\x12\$/v2/{parent=projects/*}/cases:searchZ+\x12)/v2/{parent=organizations/*}/cases:search\x12\xBE\x01\x0A\x0ACreateCase\x12*.google.cloud.support.v2.CreateCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"e\xDAA\x0Bparent,case\x82\xD3\xE4\x93\x02Q\"\x1D/v2/{parent=projects/*}/cases:\x04caseZ*\"\"/v2/{parent=organizations/*}/cases:\x04case\x12\xCD\x01\x0A\x0AUpdateCase\x12*.google.cloud.support.v2.UpdateCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"t\xDAA\x10case,update_mask\x82\xD3\xE4\x93\x02[2\"/v2/{case.name=projects/*/cases/*}:\x04caseZ/2'/v2/{case.name=organizations/*/cases/*}:\x04case\x12\xC0\x01\x0A\x0CEscalateCase\x12,.google.cloud.support.v2.EscalateCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"c\x82\xD3\xE4\x93\x02]\"&/v2/{name=projects/*/cases/*}:escalate:\x01*Z0\"+/v2/{name=organizations/*/cases/*}:escalate:\x01*\x12\xB4\x01\x0A\x09CloseCase\x12).google.cloud.support.v2.CloseCaseRequest\x1A\x1D.google.cloud.support.v2.Case\"]\x82\xD3\xE4\x93\x02W\"#/v2/{name=projects/*/cases/*}:close:\x01*Z-\"(/v2/{name=organizations/*/cases/*}:close:\x01*\x12\xBA\x01\x0A\x19SearchCaseClassifications\x129.google.cloud.support.v2.SearchCaseClassificationsRequest\x1A:.google.cloud.support.v2.SearchCaseClassificationsResponse\"&\x82\xD3\xE4\x93\x02 \x12\x1E/v2/caseClassifications:search\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xB9\x01\x0A\x1Bcom.google.cloud.support.v2B\x10CaseServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php deleted file mode 100644 index 18113ad5b3a7..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Comment.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBB\x05\x0A%google/cloud/support/v2/comment.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A#google/cloud/support/v2/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xD7\x02\x0A\x07Comment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x07creator\x18\x03 \x01(\x0B2\x1E.google.cloud.support.v2.ActorB\x03\xE0A\x03\x12\x0C\x0A\x04body\x18\x04 \x01(\x09\x12\x1E\x0A\x0Fplain_text_body\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03:\x9B\x01\xEAA\x97\x01\x0A#cloudsupport.googleapis.com/Comment\x12internalAddGeneratedFile( - "\x0A\xFA\x0B\x0A-google/cloud/support/v2/comment_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A%google/cloud/support/v2/comment.proto\"v\x0A\x13ListCommentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\"c\x0A\x14ListCommentsResponse\x122\x0A\x08comments\x18\x01 \x03(\x0B2 .google.cloud.support.v2.Comment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x88\x01\x0A\x14CreateCommentRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x126\x0A\x07comment\x18\x02 \x01(\x0B2 .google.cloud.support.v2.CommentB\x03\xE0A\x02\"N\x0A\x11GetCommentRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#cloudsupport.googleapis.com/Comment2\xB4\x05\x0A\x0ECommentService\x12\xD7\x01\x0A\x0CListComments\x12,.google.cloud.support.v2.ListCommentsRequest\x1A-.google.cloud.support.v2.ListCommentsResponse\"j\xDAA\x06parent\x82\xD3\xE4\x93\x02[\x12(/v2/{parent=projects/*/cases/*}/commentsZ/\x12-/v2/{parent=organizations/*/cases/*}/comments\x12\xE7\x01\x0A\x0DCreateComment\x12-.google.cloud.support.v2.CreateCommentRequest\x1A .google.cloud.support.v2.Comment\"\x84\x01\xDAA\x0Eparent,comment\x82\xD3\xE4\x93\x02m\"(/v2/{parent=projects/*/cases/*}/comments:\x07commentZ8\"-/v2/{parent=organizations/*/cases/*}/comments:\x07comment\x12\x8C\x01\x0A\x0AGetComment\x12*.google.cloud.support.v2.GetCommentRequest\x1A .google.cloud.support.v2.Comment\"0\xDAA\x04name\x82\xD3\xE4\x93\x02#\x12!/v2/{name=*/*/cases/*/comments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xBC\x01\x0A\x1Bcom.google.cloud.support.v2B\x13CommentServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php deleted file mode 100644 index 3fe62b602963..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/Escalation.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xD7\x03\x0A(google/cloud/support/v2/escalation.proto\x12\x17google.cloud.support.v2\"\xCE\x01\x0A\x0AEscalation\x12?\x0A\x06reason\x18\x04 \x01(\x0E2*.google.cloud.support.v2.Escalation.ReasonB\x03\xE0A\x02\x12\x1A\x0A\x0Djustification\x18\x05 \x01(\x09B\x03\xE0A\x02\"c\x0A\x06Reason\x12\x16\x0A\x12REASON_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FRESOLUTION_TIME\x10\x01\x12\x17\x0A\x13TECHNICAL_EXPERTISE\x10\x02\x12\x13\x0A\x0FBUSINESS_IMPACT\x10\x03B\xB8\x01\x0A\x1Bcom.google.cloud.support.v2B\x0FEscalationProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php deleted file mode 100644 index a841b40ecb03..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/PBCase.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xFC\x09\x0A\"google/cloud/support/v2/case.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A#google/cloud/support/v2/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE6\x06\x0A\x04Case\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x12C\x0A\x0Eclassification\x18\x04 \x01(\x0B2+.google.cloud.support.v2.CaseClassification\x12\x11\x0A\x09time_zone\x18\x08 \x01(\x09\x12\"\x0A\x1Asubscriber_email_addresses\x18\x09 \x03(\x09\x127\x0A\x05state\x18\x0C \x01(\x0E2#.google.cloud.support.v2.Case.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x0D \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0E \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12/\x0A\x07creator\x18\x0F \x01(\x0B2\x1E.google.cloud.support.v2.Actor\x12\x15\x0A\x0Dcontact_email\x18# \x01(\x09\x12\x11\x0A\x09escalated\x18\x11 \x01(\x08\x12\x11\x0A\x09test_case\x18\x13 \x01(\x08\x12\x15\x0A\x0Dlanguage_code\x18\x17 \x01(\x09\x128\x0A\x08priority\x18 \x01(\x0E2&.google.cloud.support.v2.Case.Priority\"\x7F\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03NEW\x10\x01\x12\x1E\x0A\x1AIN_PROGRESS_GOOGLE_SUPPORT\x10\x02\x12\x13\x0A\x0FACTION_REQUIRED\x10\x03\x12\x15\x0A\x11SOLUTION_PROVIDED\x10\x04\x12\x0A\x0A\x06CLOSED\x10\x05\"L\x0A\x08Priority\x12\x18\x0A\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02P0\x10\x01\x12\x06\x0A\x02P1\x10\x02\x12\x06\x0A\x02P2\x10\x03\x12\x06\x0A\x02P3\x10\x04\x12\x06\x0A\x02P4\x10\x05:q\xEAAn\x0A cloudsupport.googleapis.com/Case\x12)organizations/{organization}/cases/{case}\x12\x1Fprojects/{project}/cases/{case}\"6\x0A\x12CaseClassification\x12\x0A\x0A\x02id\x18\x03 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x04 \x01(\x09B\xB2\x01\x0A\x1Bcom.google.cloud.support.v2B\x09CaseProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php deleted file mode 100644 index 23e8067b0f15..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscription.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xA4\x09\x0A8google/cloud/support/v2/support_event_subscription.proto\x12\x17google.cloud.support.v2\x1A\x19google/api/resource.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xC1\x06\x0A\x18SupportEventSubscription\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x1A\x0A\x0Dpub_sub_topic\x18\x02 \x01(\x09B\x03\xE0A\x02\x12K\x0A\x05state\x18\x03 \x01(\x0E27.google.cloud.support.v2.SupportEventSubscription.StateB\x03\xE0A\x03\x12\\\x0A\x0Efailure_reason\x18\x04 \x01(\x0E2?.google.cloud.support.v2.SupportEventSubscription.FailureReasonB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x05 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x06 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bdelete_time\x18\x07 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x123\x0A\x0Apurge_time\x18\x08 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\"E\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07WORKING\x10\x01\x12\x0B\x0A\x07FAILING\x10\x02\x12\x0B\x0A\x07DELETED\x10\x03\"f\x0A\x0DFailureReason\x12\x1E\x0A\x1AFAILURE_REASON_UNSPECIFIED\x10\x00\x12\x15\x0A\x11PERMISSION_DENIED\x10\x01\x12\x13\x0A\x0FTOPIC_NOT_FOUND\x10\x02\x12\x09\x0A\x05OTHER\x10\x03:\xC4\x01\xEAA\xC0\x01\x0A4cloudsupport.googleapis.com/SupportEventSubscription\x12Sorganizations/{organization}/supportEventSubscriptions/{support_event_subscription}*\x19supportEventSubscriptions2\x18supportEventSubscriptionB\xC6\x01\x0A\x1Bcom.google.cloud.support.v2B\x1DSupportEventSubscriptionProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php b/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php deleted file mode 100644 index bf830fd0b677..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/GPBMetadata/Google/Cloud/Support/V2/SupportEventSubscriptionService.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xED\x1B\x0A@google/cloud/support/v2/support_event_subscription_service.proto\x12\x17google.cloud.support.v2\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A8google/cloud/support/v2/support_event_subscription.proto\x1A\x1Bgoogle/protobuf/empty.proto\x1A google/protobuf/field_mask.proto\"\xD1\x01\x0A%CreateSupportEventSubscriptionRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124cloudsupport.googleapis.com/SupportEventSubscription\x12Z\x0A\x1Asupport_event_subscription\x18\x02 \x01(\x0B21.google.cloud.support.v2.SupportEventSubscriptionB\x03\xE0A\x02\"p\x0A\"GetSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"\xD5\x01\x0A\$ListSupportEventSubscriptionsRequest\x12L\x0A\x06parent\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x124cloudsupport.googleapis.com/SupportEventSubscription\x12\x13\x0A\x06filter\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x19\x0A\x0Cshow_deleted\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\"\x98\x01\x0A%ListSupportEventSubscriptionsResponse\x12V\x0A\x1Bsupport_event_subscriptions\x18\x01 \x03(\x0B21.google.cloud.support.v2.SupportEventSubscription\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\xB9\x01\x0A%UpdateSupportEventSubscriptionRequest\x12Z\x0A\x1Asupport_event_subscription\x18\x01 \x01(\x0B21.google.cloud.support.v2.SupportEventSubscriptionB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x01\"s\x0A%DeleteSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"u\x0A'UndeleteSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription\"t\x0A&ExpungeSupportEventSubscriptionRequest\x12J\x0A\x04name\x18\x01 \x01(\x09B<\xE0A\x02\xFAA6\x0A4cloudsupport.googleapis.com/SupportEventSubscription2\x92\x0E\x0A\x1FSupportEventSubscriptionService\x12\x93\x02\x0A\x1ECreateSupportEventSubscription\x12>.google.cloud.support.v2.CreateSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"~\xDAA!parent,support_event_subscription\x82\xD3\xE4\x93\x02T\"6/v2/{parent=organizations/*}/supportEventSubscriptions:\x1Asupport_event_subscription\x12\xD4\x01\x0A\x1BGetSupportEventSubscription\x12;.google.cloud.support.v2.GetSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"E\xDAA\x04name\x82\xD3\xE4\x93\x028\x126/v2/{name=organizations/*/supportEventSubscriptions/*}\x12\xE7\x01\x0A\x1DListSupportEventSubscriptions\x12=.google.cloud.support.v2.ListSupportEventSubscriptionsRequest\x1A>.google.cloud.support.v2.ListSupportEventSubscriptionsResponse\"G\xDAA\x06parent\x82\xD3\xE4\x93\x028\x126/v2/{parent=organizations/*}/supportEventSubscriptions\x12\xB4\x02\x0A\x1EUpdateSupportEventSubscription\x12>.google.cloud.support.v2.UpdateSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"\x9E\x01\xDAA&support_event_subscription,update_mask\x82\xD3\xE4\x93\x02o2Q/v2/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}:\x1Asupport_event_subscription\x12\xDA\x01\x0A\x1EDeleteSupportEventSubscription\x12>.google.cloud.support.v2.DeleteSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"E\xDAA\x04name\x82\xD3\xE4\x93\x028*6/v2/{name=organizations/*/supportEventSubscriptions/*}\x12\xE3\x01\x0A UndeleteSupportEventSubscription\x12@.google.cloud.support.v2.UndeleteSupportEventSubscriptionRequest\x1A1.google.cloud.support.v2.SupportEventSubscription\"J\x82\xD3\xE4\x93\x02D\"?/v2/{name=organizations/*/supportEventSubscriptions/*}:undelete:\x01*\x12\xCC\x01\x0A\x1FExpungeSupportEventSubscription\x12?.google.cloud.support.v2.ExpungeSupportEventSubscriptionRequest\x1A\x16.google.protobuf.Empty\"P\xDAA\x04name\x82\xD3\xE4\x93\x02C\">/v2/{name=organizations/*/supportEventSubscriptions/*}:expunge:\x01*\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Bcom.google.cloud.support.v2B\$SupportEventSubscriptionServiceProtoP\x01Z5cloud.google.com/go/support/apiv2/supportpb;supportpb\xAA\x02\x17Google.Cloud.Support.V2\xCA\x02\x17Google\\Cloud\\Support\\V2\xEA\x02\x1AGoogle::Cloud::Support::V2b\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php deleted file mode 100644 index 57386d9ba65c..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Actor.php +++ /dev/null @@ -1,222 +0,0 @@ -google.cloud.support.v2.Actor - */ -class Actor extends \Google\Protobuf\Internal\Message -{ - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * - * Generated from protobuf field string email = 2 [deprecated = true]; - * @deprecated - */ - protected $email = ''; - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_support = false; - /** - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * - * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $username = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * @type string $email - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * @type bool $google_support - * Output only. Whether the actor is a Google support actor. - * @type string $username - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\Actor::initOnce(); - parent::__construct($data); - } - - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * - * Generated from protobuf field string email = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getEmail() - { - if ($this->email !== '') { - @trigger_error('email is deprecated.', E_USER_DEPRECATED); - } - return $this->email; - } - - /** - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * - * Generated from protobuf field string email = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEmail($var) - { - @trigger_error('email is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getGoogleSupport() - { - return $this->google_support; - } - - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setGoogleSupport($var) - { - GPBUtil::checkBool($var); - $this->google_support = $var; - - return $this; - } - - /** - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * - * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * - * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php deleted file mode 100644 index d6da92e2a525..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Attachment.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.support.v2.Attachment - */ -class Attachment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The time at which the attachment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = null; - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - */ - protected $filename = ''; - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $mime_type = ''; - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. The resource name of the attachment. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the attachment was created. - * @type \Google\Cloud\Support\V2\Actor $creator - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * @type string $filename - * The filename of the attachment (e.g. `"graph.jpg"`). - * @type string $mime_type - * Output only. The MIME type of the attachment (e.g. text/plain). - * @type int|string $size_bytes - * Output only. The size of the attachment in bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\Attachment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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. The time at which the attachment was created. - * - * 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. The time at which the attachment was created. - * - * 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. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - * @return string - */ - public function getFilename() - { - return $this->filename; - } - - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - * @param string $var - * @return $this - */ - public function setFilename($var) - { - GPBUtil::checkString($var, True); - $this->filename = $var; - - return $this; - } - - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php deleted file mode 100644 index 026ffb5c3278..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CaseClassification.php +++ /dev/null @@ -1,137 +0,0 @@ -google.cloud.support.v2.CaseClassification - */ -class CaseClassification extends \Google\Protobuf\Internal\Message -{ - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * - * Generated from protobuf field string id = 3; - */ - protected $id = ''; - /** - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * @type string $display_name - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\PBCase::initOnce(); - parent::__construct($data); - } - - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * - * Generated from protobuf field string id = 3; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * - * Generated from protobuf field string id = 3; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php deleted file mode 100644 index 7a5f629348a4..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CloseCaseRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.support.v2.CloseCaseRequest - */ -class CloseCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case to close. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the case to close. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case to close. - * - * 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 name of the case to close. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php deleted file mode 100644 index 9aeb311e6952..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Comment.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.support.v2.Comment - */ -class Comment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. The resource name of the comment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The time when the comment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The user or Google Support agent who created the comment. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = null; - /** - * The full comment body. - * Maximum of 12800 characters. - * - * Generated from protobuf field string body = 4; - */ - protected $body = ''; - /** - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * - * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - protected $plain_text_body = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. The resource name of the comment. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the comment was created. - * @type \Google\Cloud\Support\V2\Actor $creator - * Output only. The user or Google Support agent who created the comment. - * @type string $body - * The full comment body. - * Maximum of 12800 characters. - * @type string $plain_text_body - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\Comment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. The resource name of the comment. - * - * 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. The resource name of the comment. - * - * 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; - } - - /** - * Output only. The time when the comment was created. - * - * 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. The time when the comment was created. - * - * 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. The user or Google Support agent who created the comment. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * Output only. The user or Google Support agent who created the comment. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * The full comment body. - * Maximum of 12800 characters. - * - * Generated from protobuf field string body = 4; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * The full comment body. - * Maximum of 12800 characters. - * - * Generated from protobuf field string body = 4; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - - /** - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * - * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - * @deprecated - */ - public function getPlainTextBody() - { - if ($this->plain_text_body !== '') { - @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); - } - return $this->plain_text_body; - } - - /** - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * - * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - * @deprecated - */ - public function setPlainTextBody($var) - { - @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->plain_text_body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php deleted file mode 100644 index 2df993059685..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCaseRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.support.v2.CreateCaseRequest - */ -class CreateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent under which the case should be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The case to be created. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $case = null; - - /** - * @param string $parent Required. The name of the parent under which the case should be created. Please see - * {@see CaseServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\Support\V2\PBCase $case Required. The case to be created. - * - * @return \Google\Cloud\Support\V2\CreateCaseRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2\PBCase $case): self - { - return (new self()) - ->setParent($parent) - ->setCase($case); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent under which the case should be created. - * @type \Google\Cloud\Support\V2\PBCase $case - * Required. The case to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent under which the case should be created. - * - * 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 name of the parent under which the case should be created. - * - * 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 case to be created. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\PBCase|null - */ - public function getCase() - { - return $this->case; - } - - public function hasCase() - { - return isset($this->case); - } - - public function clearCase() - { - unset($this->case); - } - - /** - * Required. The case to be created. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\PBCase $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\PBCase::class); - $this->case = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php deleted file mode 100644 index 192221045eb4..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateCommentRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.support.v2.CreateCommentRequest - */ -class CreateCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case to which the comment should be added. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The comment to be added. - * - * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $comment = null; - - /** - * @param string $parent Required. The name of the case to which the comment should be added. Please see - * {@see CommentServiceClient::caseName()} for help formatting this field. - * @param \Google\Cloud\Support\V2\Comment $comment Required. The comment to be added. - * - * @return \Google\Cloud\Support\V2\CreateCommentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2\Comment $comment): self - { - return (new self()) - ->setParent($parent) - ->setComment($comment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the case to which the comment should be added. - * @type \Google\Cloud\Support\V2\Comment $comment - * Required. The comment to be added. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case to which the comment should be added. - * - * 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 name of the case to which the comment should be added. - * - * 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 comment to be added. - * - * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\Comment|null - */ - public function getComment() - { - return $this->comment; - } - - public function hasComment() - { - return isset($this->comment); - } - - public function clearComment() - { - unset($this->comment); - } - - /** - * Required. The comment to be added. - * - * Generated from protobuf field .google.cloud.support.v2.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\Comment $var - * @return $this - */ - public function setComment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Comment::class); - $this->comment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php deleted file mode 100644 index 0ec88c1c9e3f..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/CreateSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.support.v2.CreateSupportEventSubscriptionRequest - */ -class CreateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Pub/Sub configuration to create. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $support_event_subscription = null; - - /** - * @param string $parent Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_id} - * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. - * @param \Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription Required. The Pub/Sub configuration to create. - * - * @return \Google\Cloud\Support\V2\CreateSupportEventSubscriptionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription): self - { - return (new self()) - ->setParent($parent) - ->setSupportEventSubscription($supportEventSubscription); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_id} - * @type \Google\Cloud\Support\V2\SupportEventSubscription $support_event_subscription - * Required. The Pub/Sub configuration to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_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 parent resource name where the support event subscription - * will be created. Format: organizations/{organization_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 Pub/Sub configuration to create. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\SupportEventSubscription|null - */ - public function getSupportEventSubscription() - { - return $this->support_event_subscription; - } - - public function hasSupportEventSubscription() - { - return isset($this->support_event_subscription); - } - - public function clearSupportEventSubscription() - { - unset($this->support_event_subscription); - } - - /** - * Required. The Pub/Sub configuration to create. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\SupportEventSubscription $var - * @return $this - */ - public function setSupportEventSubscription($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\SupportEventSubscription::class); - $this->support_event_subscription = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php deleted file mode 100644 index 3ee310ad6372..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/DeleteSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.support.v2.DeleteSupportEventSubscriptionRequest - */ -class DeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\DeleteSupportEventSubscriptionRequest - * - * @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 name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php deleted file mode 100644 index bf49626249e1..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/EscalateCaseRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.support.v2.EscalateCaseRequest - */ -class EscalateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case to be escalated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The escalation information to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; - */ - protected $escalation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the case to be escalated. - * @type \Google\Cloud\Support\V2\Escalation $escalation - * The escalation information to be sent with the escalation request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case to be escalated. - * - * 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 name of the case to be escalated. - * - * 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; - } - - /** - * The escalation information to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; - * @return \Google\Cloud\Support\V2\Escalation|null - */ - public function getEscalation() - { - return $this->escalation; - } - - public function hasEscalation() - { - return isset($this->escalation); - } - - public function clearEscalation() - { - unset($this->escalation); - } - - /** - * The escalation information to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation escalation = 2; - * @param \Google\Cloud\Support\V2\Escalation $var - * @return $this - */ - public function setEscalation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Escalation::class); - $this->escalation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php deleted file mode 100644 index b91391678282..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.support.v2.Escalation - */ -class Escalation extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reason = 0; - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $justification = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $reason - * Required. The reason why the Case is being escalated. - * @type string $justification - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\Escalation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getReason() - { - return $this->reason; - } - - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\Escalation\Reason::class); - $this->reason = $var; - - return $this; - } - - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJustification() - { - return $this->justification; - } - - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJustification($var) - { - GPBUtil::checkString($var, True); - $this->justification = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php deleted file mode 100644 index eeb6557770a8..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/Escalation/Reason.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.support.v2.Escalation.Reason - */ -class Reason -{ - /** - * The escalation reason is in an unknown state or has not been specified. - * - * Generated from protobuf enum REASON_UNSPECIFIED = 0; - */ - const REASON_UNSPECIFIED = 0; - /** - * The case is taking too long to resolve. - * - * Generated from protobuf enum RESOLUTION_TIME = 1; - */ - const RESOLUTION_TIME = 1; - /** - * The support agent does not have the expertise required to successfully - * resolve the issue. - * - * Generated from protobuf enum TECHNICAL_EXPERTISE = 2; - */ - const TECHNICAL_EXPERTISE = 2; - /** - * The issue is having a significant business impact. - * - * Generated from protobuf enum BUSINESS_IMPACT = 3; - */ - const BUSINESS_IMPACT = 3; - - private static $valueToName = [ - self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', - self::RESOLUTION_TIME => 'RESOLUTION_TIME', - self::TECHNICAL_EXPERTISE => 'TECHNICAL_EXPERTISE', - self::BUSINESS_IMPACT => 'BUSINESS_IMPACT', - ]; - - 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/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php deleted file mode 100644 index d7899204f5f3..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ExpungeSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.support.v2.ExpungeSupportEventSubscriptionRequest - */ -class ExpungeSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to expunge. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the support event subscription to expunge. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\ExpungeSupportEventSubscriptionRequest - * - * @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 name of the support event subscription to expunge. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to expunge. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to expunge. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php deleted file mode 100644 index df615006a628..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetAttachmentRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2.GetAttachmentRequest - */ -class GetAttachmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the attachment to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the attachment to get. Please see - * {@see CaseAttachmentServiceClient::attachmentName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\GetAttachmentRequest - * - * @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 name of the attachment to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the attachment to get. - * - * 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 name of the attachment to get. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php deleted file mode 100644 index 3ea4719976be..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCaseRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2.GetCaseRequest - */ -class GetCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of a case to be retrieved. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full name of a case to be retrieved. Please see - * {@see CaseServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\GetCaseRequest - * - * @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 full name of a case to be retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of a case to be retrieved. - * - * 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 full name of a case to be retrieved. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php deleted file mode 100644 index d2544235252a..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetCommentRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2.GetCommentRequest - */ -class GetCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the comment to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the comment to retrieve. Please see - * {@see CommentServiceClient::commentName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\GetCommentRequest - * - * @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 name of the comment to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the comment to retrieve. - * - * 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 name of the comment to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php deleted file mode 100644 index b11239ed6f1a..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/GetSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.support.v2.GetSupportEventSubscriptionRequest - */ -class GetSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\GetSupportEventSubscriptionRequest - * - * @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 name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php deleted file mode 100644 index a7c951278243..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.support.v2.ListAttachmentsRequest - */ -class ListAttachmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case for which attachments should be listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the case for which attachments should be listed. Please see - * {@see CaseAttachmentServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\ListAttachmentsRequest - * - * @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 name of the case for which attachments should be listed. - * @type int $page_size - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case for which attachments should be listed. - * - * 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 name of the case for which attachments should be listed. - * - * 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; - } - - /** - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @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/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php deleted file mode 100644 index 9336b1b9d73d..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListAttachmentsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2.ListAttachmentsResponse - */ -class ListAttachmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of attachments associated with a case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; - */ - private $attachments; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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\Support\V2\Attachment[] $attachments - * The list of attachments associated with a case. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * The list of attachments associated with a case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; - * @return RepeatedField<\Google\Cloud\Support\V2\Attachment> - */ - public function getAttachments() - { - return $this->attachments; - } - - /** - * The list of attachments associated with a case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Attachment attachments = 1; - * @param \Google\Cloud\Support\V2\Attachment[] $var - * @return $this - */ - public function setAttachments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\Attachment::class); - $this->attachments = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php deleted file mode 100644 index fb33eba6e001..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesRequest.php +++ /dev/null @@ -1,239 +0,0 @@ -google.cloud.support.v2.ListCasesRequest - */ -class ListCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of a parent to list cases under. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of a parent to list cases under. Please see - * {@see CaseServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\ListCasesRequest - * - * @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 name of a parent to list cases under. - * @type string $filter - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * @type int $page_size - * The maximum number of cases fetched with each request. Defaults to 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of a parent to list cases under. - * - * 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 name of a parent to list cases under. - * - * 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; - } - - /** - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - * @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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php deleted file mode 100644 index 497f1d847c23..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCasesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.support.v2.ListCasesResponse - */ -class ListCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - */ - private $cases; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * - * 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\Support\V2\PBCase[] $cases - * The list of cases associated with the parent after any - * filters have been applied. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - * @return RepeatedField<\Google\Cloud\Support\V2\PBCase> - */ - public function getCases() - { - return $this->cases; - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - * @param \Google\Cloud\Support\V2\PBCase[] $var - * @return $this - */ - public function setCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\PBCase::class); - $this->cases = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php deleted file mode 100644 index cdbbfb140003..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.support.v2.ListCommentsRequest - */ -class ListCommentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case for which to list comments. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of comments to fetch. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the case for which to list comments. Please see - * {@see CommentServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\ListCommentsRequest - * - * @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 name of the case for which to list comments. - * @type int $page_size - * The maximum number of comments to fetch. Defaults to 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case for which to list comments. - * - * 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 name of the case for which to list comments. - * - * 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; - } - - /** - * The maximum number of comments to fetch. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of comments to fetch. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * - * Generated from protobuf field string page_token = 5; - * @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/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php deleted file mode 100644 index a1e1e711abce..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListCommentsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2.ListCommentsResponse - */ -class ListCommentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of the comments associated with the case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; - */ - private $comments; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * - * 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\Support\V2\Comment[] $comments - * List of the comments associated with the case. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * List of the comments associated with the case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; - * @return RepeatedField<\Google\Cloud\Support\V2\Comment> - */ - public function getComments() - { - return $this->comments; - } - - /** - * List of the comments associated with the case. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Comment comments = 1; - * @param \Google\Cloud\Support\V2\Comment[] $var - * @return $this - */ - public function setComments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\Comment::class); - $this->comments = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php deleted file mode 100644 index f4c0087d1a5a..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsRequest.php +++ /dev/null @@ -1,274 +0,0 @@ -google.cloud.support.v2.ListSupportEventSubscriptionsRequest - */ -class ListSupportEventSubscriptionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * - * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $show_deleted = false; - /** - * Optional. The maximum number of support event subscriptions to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_id} - * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2\ListSupportEventSubscriptionsRequest - * - * @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 fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_id} - * @type string $filter - * Optional. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * @type bool $show_deleted - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * @type int $page_size - * Optional. The maximum number of support event subscriptions to return. - * @type string $page_token - * Optional. A token identifying the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_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 fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_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. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * - * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * - * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - - /** - * Optional. The maximum number of support event subscriptions to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of support event subscriptions to return. - * - * 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 the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * - * 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 the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php deleted file mode 100644 index 5b05a2a149f1..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/ListSupportEventSubscriptionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.support.v2.ListSupportEventSubscriptionsResponse - */ -class ListSupportEventSubscriptionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The support event subscriptions. - * - * Generated from protobuf field repeated .google.cloud.support.v2.SupportEventSubscription support_event_subscriptions = 1; - */ - private $support_event_subscriptions; - /** - * A token, which can be sent 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\Support\V2\SupportEventSubscription[] $support_event_subscriptions - * The support event subscriptions. - * @type string $next_page_token - * A token, which can be sent 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\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * The support event subscriptions. - * - * Generated from protobuf field repeated .google.cloud.support.v2.SupportEventSubscription support_event_subscriptions = 1; - * @return RepeatedField<\Google\Cloud\Support\V2\SupportEventSubscription> - */ - public function getSupportEventSubscriptions() - { - return $this->support_event_subscriptions; - } - - /** - * The support event subscriptions. - * - * Generated from protobuf field repeated .google.cloud.support.v2.SupportEventSubscription support_event_subscriptions = 1; - * @param \Google\Cloud\Support\V2\SupportEventSubscription[] $var - * @return $this - */ - public function setSupportEventSubscriptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\SupportEventSubscription::class); - $this->support_event_subscriptions = $arr; - - return $this; - } - - /** - * A token, which can be sent 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, which can be sent 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/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php deleted file mode 100644 index b52e863e405a..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase.php +++ /dev/null @@ -1,654 +0,0 @@ -google.cloud.support.v2.Case - */ -class PBCase extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name for the case. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; - */ - protected $classification = null; - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - */ - protected $time_zone = ''; - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - */ - private $subscriber_email_addresses; - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; - */ - protected $creator = null; - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - */ - protected $contact_email = ''; - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - */ - protected $escalated = false; - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - */ - protected $test_case = false; - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - */ - protected $language_code = ''; - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; - */ - protected $priority = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name for the case. - * @type string $display_name - * The short summary of the issue reported in this case. - * @type string $description - * A broad description of the issue. - * @type \Google\Cloud\Support\V2\CaseClassification $classification - * The issue classification applicable to this case. - * @type string $time_zone - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * @type string[] $subscriber_email_addresses - * The email addresses to receive updates on this case. - * @type int $state - * Output only. The current status of the support case. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time this case was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time this case was last updated. - * @type \Google\Cloud\Support\V2\Actor $creator - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * @type string $contact_email - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * @type bool $escalated - * Whether the case is currently escalated. - * @type bool $test_case - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * @type string $language_code - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * @type int $priority - * The priority of this case. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\PBCase::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name for the case. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name for the case. - * - * 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; - } - - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; - * @return \Google\Cloud\Support\V2\CaseClassification|null - */ - public function getClassification() - { - return $this->classification; - } - - public function hasClassification() - { - return isset($this->classification); - } - - public function clearClassification() - { - unset($this->classification); - } - - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2.CaseClassification classification = 4; - * @param \Google\Cloud\Support\V2\CaseClassification $var - * @return $this - */ - public function setClassification($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\CaseClassification::class); - $this->classification = $var; - - return $this; - } - - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - * @return RepeatedField - */ - public function getSubscriberEmailAddresses() - { - return $this->subscriber_email_addresses; - } - - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - * @param string[] $var - * @return $this - */ - public function setSubscriberEmailAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->subscriber_email_addresses = $arr; - - return $this; - } - - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\PBCase\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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. The time this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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; - } - - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; - * @return \Google\Cloud\Support\V2\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2.Actor creator = 15; - * @param \Google\Cloud\Support\V2\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - * @return string - */ - public function getContactEmail() - { - return $this->contact_email; - } - - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - * @param string $var - * @return $this - */ - public function setContactEmail($var) - { - GPBUtil::checkString($var, True); - $this->contact_email = $var; - - return $this; - } - - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - * @return bool - */ - public function getEscalated() - { - return $this->escalated; - } - - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - * @param bool $var - * @return $this - */ - public function setEscalated($var) - { - GPBUtil::checkBool($var); - $this->escalated = $var; - - return $this; - } - - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - * @return bool - */ - public function getTestCase() - { - return $this->test_case; - } - - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - * @param bool $var - * @return $this - */ - public function setTestCase($var) - { - GPBUtil::checkBool($var); - $this->test_case = $var; - - return $this; - } - - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2.Case.Priority priority = 32; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\PBCase\Priority::class); - $this->priority = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php deleted file mode 100644 index 617441f6d2b3..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/Priority.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.support.v2.Case.Priority - */ -class Priority -{ - /** - * Priority is undefined or has not been set yet. - * - * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; - */ - const PRIORITY_UNSPECIFIED = 0; - /** - * Extreme impact on a production service. Service is hard down. - * - * Generated from protobuf enum P0 = 1; - */ - const P0 = 1; - /** - * Critical impact on a production service. Service is currently unusable. - * - * Generated from protobuf enum P1 = 2; - */ - const P1 = 2; - /** - * Severe impact on a production service. Service is usable but greatly - * impaired. - * - * Generated from protobuf enum P2 = 3; - */ - const P2 = 3; - /** - * Medium impact on a production service. Service is available, but - * moderately impaired. - * - * Generated from protobuf enum P3 = 4; - */ - const P3 = 4; - /** - * General questions or minor issues. Production service is fully - * available. - * - * Generated from protobuf enum P4 = 5; - */ - const P4 = 5; - - private static $valueToName = [ - self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', - self::P0 => 'P0', - self::P1 => 'P1', - self::P2 => 'P2', - self::P3 => 'P3', - self::P4 => 'P4', - ]; - - 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/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php deleted file mode 100644 index 9a4a8304d949..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/PBCase/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.support.v2.Case.State - */ -class State -{ - /** - * Case is in an unknown state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The case has been created but no one is assigned to work on it yet. - * - * Generated from protobuf enum NEW = 1; - */ - const PBNEW = 1; - /** - * The case is currently being handled by Google support. - * - * Generated from protobuf enum IN_PROGRESS_GOOGLE_SUPPORT = 2; - */ - const IN_PROGRESS_GOOGLE_SUPPORT = 2; - /** - * Google is waiting for a response. - * - * Generated from protobuf enum ACTION_REQUIRED = 3; - */ - const ACTION_REQUIRED = 3; - /** - * A solution has been offered for the case, but it isn't yet closed. - * - * Generated from protobuf enum SOLUTION_PROVIDED = 4; - */ - const SOLUTION_PROVIDED = 4; - /** - * The case has been resolved. - * - * Generated from protobuf enum CLOSED = 5; - */ - const CLOSED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PBNEW => 'NEW', - self::IN_PROGRESS_GOOGLE_SUPPORT => 'IN_PROGRESS_GOOGLE_SUPPORT', - self::ACTION_REQUIRED => 'ACTION_REQUIRED', - self::SOLUTION_PROVIDED => 'SOLUTION_PROVIDED', - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php deleted file mode 100644 index b2951a27d2b8..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsRequest.php +++ /dev/null @@ -1,147 +0,0 @@ -google.cloud.support.v2.SearchCaseClassificationsRequest - */ -class SearchCaseClassificationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * - * Generated from protobuf field string query = 1; - */ - protected $query = ''; - /** - * The maximum number of classifications fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * @type int $page_size - * The maximum number of classifications fetched with each request. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * - * Generated from protobuf field string query = 1; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * - * Generated from protobuf field string query = 1; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The maximum number of classifications fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of classifications fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php deleted file mode 100644 index 01ddd091da7e..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCaseClassificationsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2.SearchCaseClassificationsResponse - */ -class SearchCaseClassificationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; - */ - private $case_classifications; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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\Support\V2\CaseClassification[] $case_classifications - * The classifications retrieved. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; - * @return RepeatedField<\Google\Cloud\Support\V2\CaseClassification> - */ - public function getCaseClassifications() - { - return $this->case_classifications; - } - - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2.CaseClassification case_classifications = 1; - * @param \Google\Cloud\Support\V2\CaseClassification[] $var - * @return $this - */ - public function setCaseClassifications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\CaseClassification::class); - $this->case_classifications = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php deleted file mode 100644 index 7fee30e6b0e2..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesRequest.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.support.v2.SearchCasesRequest - */ -class SearchCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the parent resource to search for cases under. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - /** - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - */ - protected $query = ''; - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the parent resource to search for cases under. - * @type string $query - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * @type int $page_size - * The maximum number of cases fetched with each request. The default page - * size is 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the parent resource to search for cases under. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the parent resource to search for cases under. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @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/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php deleted file mode 100644 index d8dbd382a842..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SearchCasesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.support.v2.SearchCasesResponse - */ -class SearchCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - */ - private $cases; - /** - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * - * 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\Support\V2\PBCase[] $cases - * The list of cases associated with the parent after any - * filters have been applied. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - * @return RepeatedField<\Google\Cloud\Support\V2\PBCase> - */ - public function getCases() - { - return $this->cases; - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2.Case cases = 1; - * @param \Google\Cloud\Support\V2\PBCase[] $var - * @return $this - */ - public function setCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2\PBCase::class); - $this->cases = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * - * 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/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php deleted file mode 100644 index 7cd1a7511a20..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription.php +++ /dev/null @@ -1,353 +0,0 @@ -google.cloud.support.v2.SupportEventSubscription - */ -class SupportEventSubscription extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the support event subscription. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. The name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * - * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pub_sub_topic = ''; - /** - * Output only. The state of the subscription. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failure_reason = 0; - /** - * Output only. The time at which the subscription was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which the subscription was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The time at which the subscription was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. The time at which the subscription will be purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $purge_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the support event subscription. - * @type string $pub_sub_topic - * Required. The name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * @type int $state - * Output only. The state of the subscription. - * @type int $failure_reason - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the subscription was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the subscription was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The time at which the subscription was deleted. - * @type \Google\Protobuf\Timestamp $purge_time - * Output only. The time at which the subscription will be purged. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscription::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the support event subscription. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the support event subscription. - * - * 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 name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * - * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPubSubTopic() - { - return $this->pub_sub_topic; - } - - /** - * Required. The name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * - * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPubSubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pub_sub_topic = $var; - - return $this; - } - - /** - * Output only. The state of the subscription. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the subscription. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\SupportEventSubscription\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFailureReason() - { - return $this->failure_reason; - } - - /** - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFailureReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2\SupportEventSubscription\FailureReason::class); - $this->failure_reason = $var; - - return $this; - } - - /** - * Output only. The time at which the subscription was created. - * - * 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. The time at which the subscription was created. - * - * 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. The time at which the subscription was last updated. - * - * 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. The time at which the subscription was last updated. - * - * 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. The time at which the subscription was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The time at which the subscription was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. The time at which the subscription will be purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPurgeTime() - { - return $this->purge_time; - } - - public function hasPurgeTime() - { - return isset($this->purge_time); - } - - public function clearPurgeTime() - { - unset($this->purge_time); - } - - /** - * Output only. The time at which the subscription will be purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPurgeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->purge_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php deleted file mode 100644 index d0e213d58cfa..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/FailureReason.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.support.v2.SupportEventSubscription.FailureReason - */ -class FailureReason -{ - /** - * Unspecified failure reason. - * - * Generated from protobuf enum FAILURE_REASON_UNSPECIFIED = 0; - */ - const FAILURE_REASON_UNSPECIFIED = 0; - /** - * The service account (i.e. - * cloud-support-apievents\@system.gserviceaccount.com) lacks the permission - * to publish to the customer's Pub/Sub topic. - * - * Generated from protobuf enum PERMISSION_DENIED = 1; - */ - const PERMISSION_DENIED = 1; - /** - * The specified Pub/Sub topic does not exist. - * - * Generated from protobuf enum TOPIC_NOT_FOUND = 2; - */ - const TOPIC_NOT_FOUND = 2; - /** - * Message failed to publish due to a system-side error. - * - * Generated from protobuf enum OTHER = 3; - */ - const OTHER = 3; - - private static $valueToName = [ - self::FAILURE_REASON_UNSPECIFIED => 'FAILURE_REASON_UNSPECIFIED', - self::PERMISSION_DENIED => 'PERMISSION_DENIED', - self::TOPIC_NOT_FOUND => 'TOPIC_NOT_FOUND', - self::OTHER => 'OTHER', - ]; - - 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/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php deleted file mode 100644 index a06e2d1706c0..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/SupportEventSubscription/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.support.v2.SupportEventSubscription.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Subscription is active and working. - * - * Generated from protobuf enum WORKING = 1; - */ - const WORKING = 1; - /** - * Subscription is failing. Notifications cannot be published for some - * reason. - * - * Generated from protobuf enum FAILING = 2; - */ - const FAILING = 2; - /** - * Subscription has been deleted and is pending purge. Notifications are not - * sent for deleted subscriptions. Deleted subscriptions are purged after - * their `purge_time` has passed. - * - * Generated from protobuf enum DELETED = 3; - */ - const DELETED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::WORKING => 'WORKING', - self::FAILING => 'FAILING', - 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/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php deleted file mode 100644 index 3277fa4eab91..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UndeleteSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.support.v2.UndeleteSupportEventSubscriptionRequest - */ -class UndeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php deleted file mode 100644 index 7927f7822642..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateCaseRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.support.v2.UpdateCaseRequest - */ -class UpdateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The case to update. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $case = null; - /** - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Support\V2\PBCase $case Required. The case to update. - * @param \Google\Protobuf\FieldMask $updateMask A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * @return \Google\Cloud\Support\V2\UpdateCaseRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Support\V2\PBCase $case, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCase($case) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Support\V2\PBCase $case - * Required. The case to update. - * @type \Google\Protobuf\FieldMask $update_mask - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The case to update. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\PBCase|null - */ - public function getCase() - { - return $this->case; - } - - public function hasCase() - { - return isset($this->case); - } - - public function clearCase() - { - unset($this->case); - } - - /** - * Required. The case to update. - * - * Generated from protobuf field .google.cloud.support.v2.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\PBCase $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\PBCase::class); - $this->case = $var; - - return $this; - } - - /** - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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); - } - - /** - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php deleted file mode 100644 index b6193ba06d07..000000000000 --- a/owl-bot-staging/Support/v2/proto/src/Google/Cloud/Support/V2/UpdateSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.support.v2.UpdateSupportEventSubscriptionRequest - */ -class UpdateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $support_event_subscription = null; - /** - * Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * @return \Google\Cloud\Support\V2\UpdateSupportEventSubscriptionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Support\V2\SupportEventSubscription $supportEventSubscription, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSupportEventSubscription($supportEventSubscription) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Support\V2\SupportEventSubscription $support_event_subscription - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2\SupportEventSubscription|null - */ - public function getSupportEventSubscription() - { - return $this->support_event_subscription; - } - - public function hasSupportEventSubscription() - { - return isset($this->support_event_subscription); - } - - public function clearSupportEventSubscription() - { - unset($this->support_event_subscription); - } - - /** - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * - * Generated from protobuf field .google.cloud.support.v2.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2\SupportEventSubscription $var - * @return $this - */ - public function setSupportEventSubscription($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2\SupportEventSubscription::class); - $this->support_event_subscription = $var; - - return $this; - } - - /** - * Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * 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. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * 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/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php deleted file mode 100644 index 046a8aedb81e..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/get_attachment.php +++ /dev/null @@ -1,105 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Attachment $response */ - $response = $caseAttachmentServiceClient->getAttachment($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 = CaseAttachmentServiceClient::attachmentName( - '[ORGANIZATION]', - '[CASE]', - '[ATTACHMENT_ID]' - ); - - get_attachment_sample($formattedName); -} -// [END cloudsupport_v2_generated_CaseAttachmentService_GetAttachment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php b/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php deleted file mode 100644 index 2f5f6c15522a..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseAttachmentServiceClient/list_attachments.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseAttachmentServiceClient->listAttachments($request); - - /** @var Attachment $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 = CaseAttachmentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - list_attachments_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CaseAttachmentService_ListAttachments_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php deleted file mode 100644 index abe7fa02e037..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/close_case.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->closeCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - close_case_sample($formattedName); -} -// [END cloudsupport_v2_generated_CaseService_CloseCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php deleted file mode 100644 index bfa24805b97a..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/create_case.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setCase($case); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->createCase($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 -{ - $formattedParent = CaseServiceClient::projectName('[PROJECT]'); - - create_case_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CaseService_CreateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php deleted file mode 100644 index ff978d1bbba7..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/escalate_case.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->escalateCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - escalate_case_sample($formattedName); -} -// [END cloudsupport_v2_generated_CaseService_EscalateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php deleted file mode 100644 index c74fae332e8e..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/get_case.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->getCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - get_case_sample($formattedName); -} -// [END cloudsupport_v2_generated_CaseService_GetCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php deleted file mode 100644 index 7889879da0e0..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/list_cases.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseServiceClient->listCases($request); - - /** @var PBCase $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 = CaseServiceClient::projectName('[PROJECT]'); - - list_cases_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CaseService_ListCases_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php deleted file mode 100644 index 6531ad0432f3..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_case_classifications.php +++ /dev/null @@ -1,71 +0,0 @@ - "`. For example, - * `"Technical Issue > Compute > Compute Engine"`. - * - * Classification IDs returned by this endpoint are valid for at least six - * months. When a classification is deactivated, this endpoint immediately - * stops returning it. After six months, `case.create` requests using the - * classification will fail. - * - * 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 search_case_classifications_sample(): void -{ - // Create a client. - $caseServiceClient = new CaseServiceClient(); - - // Prepare the request message. - $request = new SearchCaseClassificationsRequest(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseServiceClient->searchCaseClassifications($request); - - /** @var CaseClassification $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 cloudsupport_v2_generated_CaseService_SearchCaseClassifications_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php deleted file mode 100644 index 42e3e2f444e0..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/search_cases.php +++ /dev/null @@ -1,62 +0,0 @@ -searchCases($request); - - /** @var PBCase $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 cloudsupport_v2_generated_CaseService_SearchCases_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php b/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php deleted file mode 100644 index b723593f103a..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CaseServiceClient/update_case.php +++ /dev/null @@ -1,59 +0,0 @@ -setCase($case); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->updateCase($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudsupport_v2_generated_CaseService_UpdateCase_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php deleted file mode 100644 index 36bf38f2e93a..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/create_comment.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent) - ->setComment($comment); - - // Call the API and handle any network failures. - try { - /** @var Comment $response */ - $response = $commentServiceClient->createComment($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 -{ - $formattedParent = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - create_comment_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CommentService_CreateComment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php deleted file mode 100644 index 10ebea221aa6..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/get_comment.php +++ /dev/null @@ -1,100 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Comment $response */ - $response = $commentServiceClient->getComment($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 = CommentServiceClient::commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); - - get_comment_sample($formattedName); -} -// [END cloudsupport_v2_generated_CommentService_GetComment_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php b/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php deleted file mode 100644 index cbfe58d206e6..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/CommentServiceClient/list_comments.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $commentServiceClient->listComments($request); - - /** @var Comment $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 = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - list_comments_sample($formattedParent); -} -// [END cloudsupport_v2_generated_CommentService_ListComments_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php deleted file mode 100644 index 16786c58af00..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php +++ /dev/null @@ -1,80 +0,0 @@ -setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->createSupportEventSubscription($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 -{ - $formattedParent = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); - $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; - - create_support_event_subscription_sample($formattedParent, $supportEventSubscriptionPubSubTopic); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_CreateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php deleted file mode 100644 index f7263d70ab14..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->deleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - delete_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_DeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php deleted file mode 100644 index 3bfbb93c382a..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php +++ /dev/null @@ -1,104 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $supportEventSubscriptionServiceClient->expungeSupportEventSubscription($request); - printf('Call completed successfully.' . PHP_EOL); - } 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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - expunge_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_ExpungeSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php deleted file mode 100644 index e8bdfd53d627..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->getSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - get_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_GetSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php deleted file mode 100644 index 828bdacb0a68..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $supportEventSubscriptionServiceClient->listSupportEventSubscriptions($request); - - /** @var SupportEventSubscription $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 = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); - - list_support_event_subscriptions_sample($formattedParent); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_ListSupportEventSubscriptions_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php deleted file mode 100644 index 0153eb19d132..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->undeleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - undelete_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_UndeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php b/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php deleted file mode 100644 index f7084b7cc9b4..000000000000 --- a/owl-bot-staging/Support/v2/samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php +++ /dev/null @@ -1,74 +0,0 @@ -setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new UpdateSupportEventSubscriptionRequest()) - ->setSupportEventSubscription($supportEventSubscription); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->updateSupportEventSubscription($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 -{ - $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; - - update_support_event_subscription_sample($supportEventSubscriptionPubSubTopic); -} -// [END cloudsupport_v2_generated_SupportEventSubscriptionService_UpdateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php deleted file mode 100644 index 8cdb4af45028..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/Client/CaseAttachmentServiceClient.php +++ /dev/null @@ -1,409 +0,0 @@ - getAttachmentAsync(GetAttachmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAttachmentsAsync(ListAttachmentsRequest $request, array $optionalArgs = []) - */ -final class CaseAttachmentServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2.CaseAttachmentService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/case_attachment_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/case_attachment_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/case_attachment_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/case_attachment_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a attachment - * resource. - * - * @param string $organization - * @param string $case - * @param string $attachmentId - * - * @return string The formatted attachment resource. - */ - public static function attachmentName(string $organization, string $case, string $attachmentId): string - { - return self::getPathTemplate('attachment')->render([ - 'organization' => $organization, - 'case' => $case, - 'attachment_id' => $attachmentId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case_attachment_id resource. - * - * @param string $organization - * @param string $case - * @param string $attachmentId - * - * @return string The formatted organization_case_attachment_id resource. - */ - public static function organizationCaseAttachmentIdName(string $organization, string $case, string $attachmentId): string - { - return self::getPathTemplate('organizationCaseAttachmentId')->render([ - 'organization' => $organization, - 'case' => $case, - 'attachment_id' => $attachmentId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_case_attachment_id resource. - * - * @param string $project - * @param string $case - * @param string $attachmentId - * - * @return string The formatted project_case_attachment_id resource. - */ - public static function projectCaseAttachmentIdName(string $project, string $case, string $attachmentId): string - { - return self::getPathTemplate('projectCaseAttachmentId')->render([ - 'project' => $project, - 'case' => $case, - 'attachment_id' => $attachmentId, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - attachment: organizations/{organization}/cases/{case}/attachments/{attachment_id} - * - case: organizations/{organization}/cases/{case} - * - organizationCase: organizations/{organization}/cases/{case} - * - organizationCaseAttachmentId: organizations/{organization}/cases/{case}/attachments/{attachment_id} - * - projectCase: projects/{project}/cases/{case} - * - projectCaseAttachmentId: projects/{project}/cases/{case}/attachments/{attachment_id} - * - * 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 'cloudsupport.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\Support\V2\CaseAttachmentServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CaseAttachmentServiceClient(['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); - } - - /** 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); - } - - /** - * Retrieve an attachment associated with a support case. - * - * EXAMPLES: - * - * cURL: - * - * ```shell - * attachment="projects/some-project/cases/23598314/attachments/0684M00000P3h1fQAB" - * curl \ - * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - * "https://cloudsupport.googleapis.com/v2/$attachment" - * ``` - * - * Python: - * - * ```python - * import googleapiclient.discovery - * - * api_version = "v2" - * supportApiService = googleapiclient.discovery.build( - * serviceName="cloudsupport", - * version=api_version, - * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - * ) - * request = ( - * supportApiService.cases() - * .attachments() - * .get(name="projects/some-project/cases/43595344/attachments/0684M00000P3h1fQAB") - * ) - * print(request.execute()) - * ``` - * - * The async variant is {@see CaseAttachmentServiceClient::getAttachmentAsync()} . - * - * @example samples/V2/CaseAttachmentServiceClient/get_attachment.php - * - * @param GetAttachmentRequest $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 Attachment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getAttachment(GetAttachmentRequest $request, array $callOptions = []): Attachment - { - return $this->startApiCall('GetAttachment', $request, $callOptions)->wait(); - } - - /** - * List all the attachments associated with a support case. - * - * The async variant is {@see CaseAttachmentServiceClient::listAttachmentsAsync()} - * . - * - * @example samples/V2/CaseAttachmentServiceClient/list_attachments.php - * - * @param ListAttachmentsRequest $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 listAttachments(ListAttachmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAttachments', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php deleted file mode 100644 index e1f1a634d50d..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/Client/CaseServiceClient.php +++ /dev/null @@ -1,542 +0,0 @@ - closeCaseAsync(CloseCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCaseAsync(CreateCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface escalateCaseAsync(EscalateCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCaseAsync(GetCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCasesAsync(ListCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchCaseClassificationsAsync(SearchCaseClassificationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchCasesAsync(SearchCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCaseAsync(UpdateCaseRequest $request, array $optionalArgs = []) - */ -final class CaseServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2.CaseService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/case_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/case_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/case_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/case_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - organization: organizations/{organization} - * - organizationCase: organizations/{organization}/cases/{case} - * - project: projects/{project} - * - projectCase: projects/{project}/cases/{case} - * - * 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 'cloudsupport.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\Support\V2\CaseServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CaseServiceClient(['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); - } - - /** 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); - } - - /** - * Close a case. - * - * The async variant is {@see CaseServiceClient::closeCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/close_case.php - * - * @param CloseCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function closeCase(CloseCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('CloseCase', $request, $callOptions)->wait(); - } - - /** - * Create a new case and associate it with a parent. - * - * It must have the following fields set: `display_name`, `description`, - * `classification`, and `priority`. If you're just testing the API and don't - * want to route your case to an agent, set `testCase=true`. - * - * The async variant is {@see CaseServiceClient::createCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/create_case.php - * - * @param CreateCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function createCase(CreateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('CreateCase', $request, $callOptions)->wait(); - } - - /** - * Escalate a case, starting the Google Cloud Support escalation management - * process. - * - * This operation is only available for some support services. Go to - * https://cloud.google.com/support and look for 'Technical support - * escalations' in the feature list to find out which ones let you - * do that. - * - * The async variant is {@see CaseServiceClient::escalateCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/escalate_case.php - * - * @param EscalateCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function escalateCase(EscalateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('EscalateCase', $request, $callOptions)->wait(); - } - - /** - * Retrieve a case. - * - * The async variant is {@see CaseServiceClient::getCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/get_case.php - * - * @param GetCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function getCase(GetCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('GetCase', $request, $callOptions)->wait(); - } - - /** - * Retrieve all cases under a parent, but not its children. - * - * For example, listing cases under an organization only returns the cases - * that are directly parented by that organization. To retrieve cases - * under an organization and its projects, use `cases.search`. - * - * The async variant is {@see CaseServiceClient::listCasesAsync()} . - * - * @example samples/V2/CaseServiceClient/list_cases.php - * - * @param ListCasesRequest $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 listCases(ListCasesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCases', $request, $callOptions); - } - - /** - * Retrieve valid classifications to use when creating a support case. - * - * Classifications are hierarchical. Each classification is a string - * containing all levels of the hierarchy separated by `" > "`. For example, - * `"Technical Issue > Compute > Compute Engine"`. - * - * Classification IDs returned by this endpoint are valid for at least six - * months. When a classification is deactivated, this endpoint immediately - * stops returning it. After six months, `case.create` requests using the - * classification will fail. - * - * The async variant is {@see CaseServiceClient::searchCaseClassificationsAsync()} - * . - * - * @example samples/V2/CaseServiceClient/search_case_classifications.php - * - * @param SearchCaseClassificationsRequest $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 searchCaseClassifications(SearchCaseClassificationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchCaseClassifications', $request, $callOptions); - } - - /** - * Search for cases using a query. - * - * The async variant is {@see CaseServiceClient::searchCasesAsync()} . - * - * @example samples/V2/CaseServiceClient/search_cases.php - * - * @param SearchCasesRequest $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 searchCases(SearchCasesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchCases', $request, $callOptions); - } - - /** - * Update a case. Only some fields can be updated. - * - * The async variant is {@see CaseServiceClient::updateCaseAsync()} . - * - * @example samples/V2/CaseServiceClient/update_case.php - * - * @param UpdateCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateCase(UpdateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('UpdateCase', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php deleted file mode 100644 index 123c261c9c96..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/Client/CommentServiceClient.php +++ /dev/null @@ -1,437 +0,0 @@ - createCommentAsync(CreateCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCommentAsync(GetCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCommentsAsync(ListCommentsRequest $request, array $optionalArgs = []) - */ -final class CommentServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2.CommentService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/comment_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/comment_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/comment_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/comment_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a comment - * resource. - * - * @param string $organization - * @param string $case - * @param string $comment - * - * @return string The formatted comment resource. - */ - public static function commentName(string $organization, string $case, string $comment): string - { - return self::getPathTemplate('comment')->render([ - 'organization' => $organization, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case_comment resource. - * - * @param string $organization - * @param string $case - * @param string $comment - * - * @return string The formatted organization_case_comment resource. - */ - public static function organizationCaseCommentName(string $organization, string $case, string $comment): string - { - return self::getPathTemplate('organizationCaseComment')->render([ - 'organization' => $organization, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_case_comment resource. - * - * @param string $project - * @param string $case - * @param string $comment - * - * @return string The formatted project_case_comment resource. - */ - public static function projectCaseCommentName(string $project, string $case, string $comment): string - { - return self::getPathTemplate('projectCaseComment')->render([ - 'project' => $project, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - comment: organizations/{organization}/cases/{case}/comments/{comment} - * - organizationCase: organizations/{organization}/cases/{case} - * - organizationCaseComment: organizations/{organization}/cases/{case}/comments/{comment} - * - projectCase: projects/{project}/cases/{case} - * - projectCaseComment: projects/{project}/cases/{case}/comments/{comment} - * - * 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 'cloudsupport.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\Support\V2\CommentServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CommentServiceClient(['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); - } - - /** 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); - } - - /** - * Add a new comment to a case. - * - * The comment must have the following fields set: `body`. - * - * The async variant is {@see CommentServiceClient::createCommentAsync()} . - * - * @example samples/V2/CommentServiceClient/create_comment.php - * - * @param CreateCommentRequest $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 Comment - * - * @throws ApiException Thrown if the API call fails. - */ - public function createComment(CreateCommentRequest $request, array $callOptions = []): Comment - { - return $this->startApiCall('CreateComment', $request, $callOptions)->wait(); - } - - /** - * Retrieve a comment. - * - * EXAMPLES: - * - * cURL: - * - * ```shell - * comment="projects/some-project/cases/43595344/comments/234567890" - * curl \ - * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - * "https://cloudsupport.googleapis.com/v2/$comment" - * ``` - * - * Python: - * - * ```python - * import googleapiclient.discovery - * - * api_version = "v2" - * supportApiService = googleapiclient.discovery.build( - * serviceName="cloudsupport", - * version=api_version, - * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - * ) - * - * request = supportApiService.cases().comments().get( - * name="projects/some-project/cases/43595344/comments/234567890", - * ) - * print(request.execute()) - * ``` - * - * The async variant is {@see CommentServiceClient::getCommentAsync()} . - * - * @example samples/V2/CommentServiceClient/get_comment.php - * - * @param GetCommentRequest $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 Comment - * - * @throws ApiException Thrown if the API call fails. - */ - public function getComment(GetCommentRequest $request, array $callOptions = []): Comment - { - return $this->startApiCall('GetComment', $request, $callOptions)->wait(); - } - - /** - * List all the comments associated with a case. - * - * The async variant is {@see CommentServiceClient::listCommentsAsync()} . - * - * @example samples/V2/CommentServiceClient/list_comments.php - * - * @param ListCommentsRequest $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 listComments(ListCommentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListComments', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php b/owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php deleted file mode 100644 index 2d1e59412ff0..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/Client/SupportEventSubscriptionServiceClient.php +++ /dev/null @@ -1,480 +0,0 @@ - createSupportEventSubscriptionAsync(CreateSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSupportEventSubscriptionAsync(DeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface expungeSupportEventSubscriptionAsync(ExpungeSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSupportEventSubscriptionAsync(GetSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSupportEventSubscriptionsAsync(ListSupportEventSubscriptionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeleteSupportEventSubscriptionAsync(UndeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSupportEventSubscriptionAsync(UpdateSupportEventSubscriptionRequest $request, array $optionalArgs = []) - */ -final class SupportEventSubscriptionServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2.SupportEventSubscriptionService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/support_event_subscription_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * support_event_subscription resource. - * - * @param string $organization - * @param string $supportEventSubscription - * - * @return string The formatted support_event_subscription resource. - */ - public static function supportEventSubscriptionName(string $organization, string $supportEventSubscription): string - { - return self::getPathTemplate('supportEventSubscription')->render([ - 'organization' => $organization, - 'support_event_subscription' => $supportEventSubscription, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - organization: organizations/{organization} - * - supportEventSubscription: organizations/{organization}/supportEventSubscriptions/{support_event_subscription} - * - * 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 'cloudsupport.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\Support\V2\SupportEventSubscriptionServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new SupportEventSubscriptionServiceClient(['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); - } - - /** 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); - } - - /** - * Creates a support event subscription for an organization. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::createSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/create_support_event_subscription.php - * - * @param CreateSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSupportEventSubscription(CreateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('CreateSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Soft deletes a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::deleteSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php - * - * @param DeleteSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteSupportEventSubscription(DeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('DeleteSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Expunges a support event subscription. - * - * EXAMPLES: - * - * cURL: - * - * ```shell - * support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" - * curl \ - * --request POST \ - * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - * "https://cloudsupport.googleapis.com/v2/$support_event_subscription:expunge" - * ``` - * - * Python: - * - * ```python - * import googleapiclient.discovery - * - * api_version = "v2" - * supportApiService = googleapiclient.discovery.build( - * serviceName="cloudsupport", - * version=api_version, - * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - * ) - * - * request = supportApiService.supportEventSubscriptions().expunge( - * name="organizations/123456789/supportEventSubscriptions/abcdef123456" - * ) - * print(request.execute()) - * ``` - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::expungeSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php - * - * @param ExpungeSupportEventSubscriptionRequest $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. - * } - * - * @throws ApiException Thrown if the API call fails. - */ - public function expungeSupportEventSubscription(ExpungeSupportEventSubscriptionRequest $request, array $callOptions = []): void - { - $this->startApiCall('ExpungeSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Gets a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::getSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/get_support_event_subscription.php - * - * @param GetSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSupportEventSubscription(GetSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('GetSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Lists support event subscriptions for an organization. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::listSupportEventSubscriptionsAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php - * - * @param ListSupportEventSubscriptionsRequest $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 listSupportEventSubscriptions(ListSupportEventSubscriptionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSupportEventSubscriptions', $request, $callOptions); - } - - /** - * Undeletes a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::undeleteSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php - * - * @param UndeleteSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - */ - public function undeleteSupportEventSubscription(UndeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('UndeleteSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Updates a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::updateSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2/SupportEventSubscriptionServiceClient/update_support_event_subscription.php - * - * @param UpdateSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSupportEventSubscription(UpdateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('UpdateSupportEventSubscription', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json b/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json deleted file mode 100644 index a1a0b226e030..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/gapic_metadata.json +++ /dev/null @@ -1,145 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.support.v2", - "libraryPackage": "Google\\Cloud\\Support\\V2", - "services": { - "CaseAttachmentService": { - "clients": { - "grpc": { - "libraryClient": "CaseAttachmentServiceGapicClient", - "rpcs": { - "GetAttachment": { - "methods": [ - "getAttachment" - ] - }, - "ListAttachments": { - "methods": [ - "listAttachments" - ] - } - } - } - } - }, - "CaseService": { - "clients": { - "grpc": { - "libraryClient": "CaseServiceGapicClient", - "rpcs": { - "CloseCase": { - "methods": [ - "closeCase" - ] - }, - "CreateCase": { - "methods": [ - "createCase" - ] - }, - "EscalateCase": { - "methods": [ - "escalateCase" - ] - }, - "GetCase": { - "methods": [ - "getCase" - ] - }, - "ListCases": { - "methods": [ - "listCases" - ] - }, - "SearchCaseClassifications": { - "methods": [ - "searchCaseClassifications" - ] - }, - "SearchCases": { - "methods": [ - "searchCases" - ] - }, - "UpdateCase": { - "methods": [ - "updateCase" - ] - } - } - } - } - }, - "CommentService": { - "clients": { - "grpc": { - "libraryClient": "CommentServiceGapicClient", - "rpcs": { - "CreateComment": { - "methods": [ - "createComment" - ] - }, - "GetComment": { - "methods": [ - "getComment" - ] - }, - "ListComments": { - "methods": [ - "listComments" - ] - } - } - } - } - }, - "SupportEventSubscriptionService": { - "clients": { - "grpc": { - "libraryClient": "SupportEventSubscriptionServiceGapicClient", - "rpcs": { - "CreateSupportEventSubscription": { - "methods": [ - "createSupportEventSubscription" - ] - }, - "DeleteSupportEventSubscription": { - "methods": [ - "deleteSupportEventSubscription" - ] - }, - "ExpungeSupportEventSubscription": { - "methods": [ - "expungeSupportEventSubscription" - ] - }, - "GetSupportEventSubscription": { - "methods": [ - "getSupportEventSubscription" - ] - }, - "ListSupportEventSubscriptions": { - "methods": [ - "listSupportEventSubscriptions" - ] - }, - "UndeleteSupportEventSubscription": { - "methods": [ - "undeleteSupportEventSubscription" - ] - }, - "UpdateSupportEventSubscription": { - "methods": [ - "updateSupportEventSubscription" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json deleted file mode 100644 index 86644d843261..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_client_config.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2.CaseAttachmentService": { - "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": { - "GetAttachment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListAttachments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php deleted file mode 100644 index d09c50e12e40..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_descriptor_config.php +++ /dev/null @@ -1,68 +0,0 @@ - [ - 'google.cloud.support.v2.CaseAttachmentService' => [ - 'GetAttachment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\Attachment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAttachments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAttachments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\ListAttachmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'attachment' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', - 'case' => 'organizations/{organization}/cases/{case}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'organizationCaseAttachmentId' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', - 'projectCase' => 'projects/{project}/cases/{case}', - 'projectCaseAttachmentId' => 'projects/{project}/cases/{case}/attachments/{attachment_id}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php deleted file mode 100644 index e0337097818c..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_attachment_service_rest_client_config.php +++ /dev/null @@ -1,57 +0,0 @@ - [ - 'google.cloud.support.v2.CaseAttachmentService' => [ - 'GetAttachment' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/cases/*/attachments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAttachments' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/attachments', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/attachments', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json deleted file mode 100644 index 7fff474416b4..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_service_client_config.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2.CaseService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CloseCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "EscalateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetCase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchCaseClassifications": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php deleted file mode 100644 index 51f3317d6a1c..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_service_descriptor_config.php +++ /dev/null @@ -1,148 +0,0 @@ - [ - 'google.cloud.support.v2.CaseService' => [ - 'CloseCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'EscalateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCases', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\ListCasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SearchCaseClassifications' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCaseClassifications', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SearchCaseClassificationsResponse', - ], - 'SearchCases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCases', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SearchCasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'case.name', - 'fieldAccessors' => [ - 'getCase', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'organization' => 'organizations/{organization}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'project' => 'projects/{project}', - 'projectCase' => 'projects/{project}/cases/{case}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php deleted file mode 100644 index f9f9374d9247..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/case_service_rest_client_config.php +++ /dev/null @@ -1,161 +0,0 @@ - [ - 'google.cloud.support.v2.CaseService' => [ - 'CloseCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/cases/*}:close', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/cases/*}:close', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*}/cases', - 'body' => 'case', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*}/cases', - 'body' => 'case', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'EscalateCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=projects/*/cases/*}:escalate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/cases/*}:escalate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCase' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=projects/*/cases/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/cases/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCases' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/cases', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/cases', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SearchCaseClassifications' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/caseClassifications:search', - ], - 'SearchCases' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*}/cases:search', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/cases:search', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCase' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{case.name=projects/*/cases/*}', - 'body' => 'case', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{case.name=organizations/*/cases/*}', - 'body' => 'case', - ], - ], - 'placeholders' => [ - 'case.name' => [ - 'getters' => [ - 'getCase', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json deleted file mode 100644 index 8dba9a653701..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_client_config.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2.CommentService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListComments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php deleted file mode 100644 index 1157c2b2f18c..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_descriptor_config.php +++ /dev/null @@ -1,80 +0,0 @@ - [ - 'google.cloud.support.v2.CommentService' => [ - 'CreateComment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\Comment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetComment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\Comment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListComments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getComments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\ListCommentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'comment' => 'organizations/{organization}/cases/{case}/comments/{comment}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'organizationCaseComment' => 'organizations/{organization}/cases/{case}/comments/{comment}', - 'projectCase' => 'projects/{project}/cases/{case}', - 'projectCaseComment' => 'projects/{project}/cases/{case}/comments/{comment}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php deleted file mode 100644 index 80f01b235112..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/comment_service_rest_client_config.php +++ /dev/null @@ -1,76 +0,0 @@ - [ - 'google.cloud.support.v2.CommentService' => [ - 'CreateComment' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/comments', - 'body' => 'comment', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/comments', - 'body' => 'comment', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetComment' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=*/*/cases/*/comments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListComments' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=projects/*/cases/*}/comments', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*/cases/*}/comments', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json deleted file mode 100644 index 207f6e81330a..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_client_config.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2.SupportEventSubscriptionService": { - "retry_codes": { - "no_retry_codes": [] - }, - "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 - } - }, - "methods": { - "CreateSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ExpungeSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListSupportEventSubscriptions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UndeleteSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php deleted file mode 100644 index 8524c72bce3c..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_descriptor_config.php +++ /dev/null @@ -1,125 +0,0 @@ - [ - 'google.cloud.support.v2.SupportEventSubscriptionService' => [ - 'CreateSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExpungeSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListSupportEventSubscriptions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSupportEventSubscriptions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2\ListSupportEventSubscriptionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UndeleteSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'support_event_subscription.name', - 'fieldAccessors' => [ - 'getSupportEventSubscription', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'organization' => 'organizations/{organization}', - 'supportEventSubscription' => 'organizations/{organization}/supportEventSubscriptions/{support_event_subscription}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php b/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php deleted file mode 100644 index d47c677179a1..000000000000 --- a/owl-bot-staging/Support/v2/src/V2/resources/support_event_subscription_service_rest_client_config.php +++ /dev/null @@ -1,111 +0,0 @@ - [ - 'google.cloud.support.v2.SupportEventSubscriptionService' => [ - 'CreateSupportEventSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{parent=organizations/*}/supportEventSubscriptions', - 'body' => 'support_event_subscription', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSupportEventSubscription' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExpungeSupportEventSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}:expunge', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSupportEventSubscription' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSupportEventSubscriptions' => [ - 'method' => 'get', - 'uriTemplate' => '/v2/{parent=organizations/*}/supportEventSubscriptions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UndeleteSupportEventSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v2/{name=organizations/*/supportEventSubscriptions/*}:undelete', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSupportEventSubscription' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}', - 'body' => 'support_event_subscription', - 'placeholders' => [ - 'support_event_subscription.name' => [ - 'getters' => [ - 'getSupportEventSubscription', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php deleted file mode 100644 index 601ac8d587e1..000000000000 --- a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseAttachmentServiceClientTest.php +++ /dev/null @@ -1,241 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CaseAttachmentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CaseAttachmentServiceClient($options); - } - - /** @test */ - public function getAttachmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $filename = 'filename-734768633'; - $mimeType = 'mimeType-196041627'; - $sizeBytes = 1796325715; - $expectedResponse = new Attachment(); - $expectedResponse->setName($name2); - $expectedResponse->setFilename($filename); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); - $request = (new GetAttachmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttachment($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.support.v2.CaseAttachmentService/GetAttachment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachmentExceptionTest() - { - $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->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); - $request = (new GetAttachmentRequest()) - ->setName($formattedName); - try { - $gapicClient->getAttachment($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 listAttachmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $attachmentsElement = new Attachment(); - $attachments = [ - $attachmentsElement, - ]; - $expectedResponse = new ListAttachmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAttachments($attachments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListAttachmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAttachments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAttachments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseAttachmentService/ListAttachments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAttachmentsExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListAttachmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAttachments($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 getAttachmentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $filename = 'filename-734768633'; - $mimeType = 'mimeType-196041627'; - $sizeBytes = 1796325715; - $expectedResponse = new Attachment(); - $expectedResponse->setName($name2); - $expectedResponse->setFilename($filename); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); - $request = (new GetAttachmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttachmentAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseAttachmentService/GetAttachment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php deleted file mode 100644 index e3977a3af5ad..000000000000 --- a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CaseServiceClientTest.php +++ /dev/null @@ -1,712 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CaseServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CaseServiceClient($options); - } - - /** @test */ - public function closeCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->closeCase($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.support.v2.CaseService/CloseCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function closeCaseExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->closeCase($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 createCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $case = new PBCase(); - $request = (new CreateCaseRequest()) - ->setParent($formattedParent) - ->setCase($case); - $response = $gapicClient->createCase($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.support.v2.CaseService/CreateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCase(); - $this->assertProtobufEquals($case, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCaseExceptionTest() - { - $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->projectName('[PROJECT]'); - $case = new PBCase(); - $request = (new CreateCaseRequest()) - ->setParent($formattedParent) - ->setCase($case); - try { - $gapicClient->createCase($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 escalateCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new EscalateCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->escalateCase($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.support.v2.CaseService/EscalateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function escalateCaseExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new EscalateCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->escalateCase($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 getCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new GetCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->getCase($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.support.v2.CaseService/GetCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCaseExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new GetCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->getCase($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 listCasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $casesElement = new PBCase(); - $cases = [ - $casesElement, - ]; - $expectedResponse = new ListCasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCases($cases); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListCasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCases($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseService/ListCases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCasesExceptionTest() - { - $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->projectName('[PROJECT]'); - $request = (new ListCasesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCases($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 searchCaseClassificationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $caseClassificationsElement = new CaseClassification(); - $caseClassifications = [ - $caseClassificationsElement, - ]; - $expectedResponse = new SearchCaseClassificationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCaseClassifications($caseClassifications); - $transport->addResponse($expectedResponse); - $request = new SearchCaseClassificationsRequest(); - $response = $gapicClient->searchCaseClassifications($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCaseClassifications()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseService/SearchCaseClassifications', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCaseClassificationsExceptionTest() - { - $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 SearchCaseClassificationsRequest(); - try { - $gapicClient->searchCaseClassifications($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 searchCasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $casesElement = new PBCase(); - $cases = [ - $casesElement, - ]; - $expectedResponse = new SearchCasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCases($cases); - $transport->addResponse($expectedResponse); - $request = new SearchCasesRequest(); - $response = $gapicClient->searchCases($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseService/SearchCases', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCasesExceptionTest() - { - $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 SearchCasesRequest(); - try { - $gapicClient->searchCases($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 updateCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $case = new PBCase(); - $request = (new UpdateCaseRequest()) - ->setCase($case); - $response = $gapicClient->updateCase($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.support.v2.CaseService/UpdateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getCase(); - $this->assertProtobufEquals($case, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCaseExceptionTest() - { - $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 - $case = new PBCase(); - $request = (new UpdateCaseRequest()) - ->setCase($case); - try { - $gapicClient->updateCase($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 closeCaseAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->closeCaseAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CaseService/CloseCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php deleted file mode 100644 index 0982658b529d..000000000000 --- a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/CommentServiceClientTest.php +++ /dev/null @@ -1,316 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CommentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CommentServiceClient($options); - } - - /** @test */ - public function createCommentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - $response = $gapicClient->createComment($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.support.v2.CommentService/CreateComment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getComment(); - $this->assertProtobufEquals($comment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCommentExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - try { - $gapicClient->createComment($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 getCommentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name2); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); - $request = (new GetCommentRequest()) - ->setName($formattedName); - $response = $gapicClient->getComment($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.support.v2.CommentService/GetComment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCommentExceptionTest() - { - $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->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); - $request = (new GetCommentRequest()) - ->setName($formattedName); - try { - $gapicClient->getComment($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 listCommentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $commentsElement = new Comment(); - $comments = [ - $commentsElement, - ]; - $expectedResponse = new ListCommentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setComments($comments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListCommentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listComments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getComments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CommentService/ListComments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCommentsExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListCommentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listComments($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 createCommentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - $response = $gapicClient->createCommentAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.CommentService/CreateComment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getComment(); - $this->assertProtobufEquals($comment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php b/owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php deleted file mode 100644 index 90d1f77613e5..000000000000 --- a/owl-bot-staging/Support/v2/tests/Unit/V2/Client/SupportEventSubscriptionServiceClientTest.php +++ /dev/null @@ -1,584 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SupportEventSubscriptionServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SupportEventSubscriptionServiceClient($options); - } - - /** @test */ - public function createSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - $response = $gapicClient->createSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSupportEventSubscription(); - $this->assertProtobufEquals($supportEventSubscription, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSupportEventSubscriptionExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - try { - $gapicClient->createSupportEventSubscription($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 deleteSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name2); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new DeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/DeleteSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new DeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSupportEventSubscription($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 expungeSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new ExpungeSupportEventSubscriptionRequest()) - ->setName($formattedName); - $gapicClient->expungeSupportEventSubscription($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.SupportEventSubscriptionService/ExpungeSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function expungeSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new ExpungeSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->expungeSupportEventSubscription($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 getSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name2); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new GetSupportEventSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->getSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/GetSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new GetSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->getSupportEventSubscription($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 listSupportEventSubscriptionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $supportEventSubscriptionsElement = new SupportEventSubscription(); - $supportEventSubscriptions = [ - $supportEventSubscriptionsElement, - ]; - $expectedResponse = new ListSupportEventSubscriptionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSupportEventSubscriptions($supportEventSubscriptions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $request = (new ListSupportEventSubscriptionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSupportEventSubscriptions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSupportEventSubscriptions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.SupportEventSubscriptionService/ListSupportEventSubscriptions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSupportEventSubscriptionsExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $request = (new ListSupportEventSubscriptionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSupportEventSubscriptions($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 undeleteSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name2); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new UndeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->undeleteSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/UndeleteSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function undeleteSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new UndeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->undeleteSupportEventSubscription($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 updateSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new UpdateSupportEventSubscriptionRequest()) - ->setSupportEventSubscription($supportEventSubscription); - $response = $gapicClient->updateSupportEventSubscription($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.support.v2.SupportEventSubscriptionService/UpdateSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getSupportEventSubscription(); - $this->assertProtobufEquals($supportEventSubscription, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSupportEventSubscriptionExceptionTest() - { - $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 - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new UpdateSupportEventSubscriptionRequest()) - ->setSupportEventSubscription($supportEventSubscription); - try { - $gapicClient->updateSupportEventSubscription($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 createSupportEventSubscriptionAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - $response = $gapicClient->createSupportEventSubscriptionAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSupportEventSubscription(); - $this->assertProtobufEquals($supportEventSubscription, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php deleted file mode 100644 index 1aa4b2dcd381..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Actor.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xFE\x02\x0A'google/cloud/support/v2beta/actor.proto\x12\x1Bgoogle.cloud.support.v2beta\"d\x0A\x05Actor\x12\x14\x0A\x0Cdisplay_name\x18\x01 \x01(\x09\x12\x11\x0A\x05email\x18\x02 \x01(\x09B\x02\x18\x01\x12\x1B\x0A\x0Egoogle_support\x18\x04 \x01(\x08B\x03\xE0A\x03\x12\x15\x0A\x08username\x18\x05 \x01(\x09B\x03\xE0A\x03B\xC7\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0AActorProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php deleted file mode 100644 index 4a62f7824389..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Attachment.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x92\x06\x0A,google/cloud/support/v2beta/attachment.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x88\x03\x0A\x0AAttachment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x03\xE0A\x08\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x128\x0A\x07creator\x18\x03 \x01(\x0B2\".google.cloud.support.v2beta.ActorB\x03\xE0A\x03\x12\x10\x0A\x08filename\x18\x04 \x01(\x09\x12\x16\x0A\x09mime_type\x18\x05 \x01(\x09B\x03\xE0A\x03\x12\x17\x0A\x0Asize_bytes\x18\x06 \x01(\x03B\x03\xE0A\x03:\xB0\x01\xEAA\xAC\x01\x0A&cloudsupport.googleapis.com/Attachment\x12Eorganizations/{organization}/cases/{case}/attachments/{attachment_id}\x12;projects/{project}/cases/{case}/attachments/{attachment_id}B\xCC\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0FAttachmentProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php deleted file mode 100644 index 4ff8c684ca06..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/AttachmentService.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x82\x0A\x0A4google/cloud/support/v2beta/attachment_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A,google/cloud/support/v2beta/attachment.proto\"y\x0A\x16ListAttachmentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"T\x0A\x14GetAttachmentRequest\x12<\x0A\x04name\x18\x01 \x01(\x09B.\xE0A\x02\xFAA(\x0A&cloudsupport.googleapis.com/Attachment\"p\x0A\x17ListAttachmentsResponse\x12<\x0A\x0Battachments\x18\x01 \x03(\x0B2'.google.cloud.support.v2beta.Attachment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\x88\x04\x0A\x15CaseAttachmentService\x12\xF6\x01\x0A\x0FListAttachments\x123.google.cloud.support.v2beta.ListAttachmentsRequest\x1A4.google.cloud.support.v2beta.ListAttachmentsResponse\"x\xDAA\x06parent\x82\xD3\xE4\x93\x02i\x12//v2beta/{parent=projects/*/cases/*}/attachmentsZ6\x124/v2beta/{parent=organizations/*/cases/*}/attachments\x12\xA4\x01\x0A\x0DGetAttachment\x121.google.cloud.support.v2beta.GetAttachmentRequest\x1A'.google.cloud.support.v2beta.Attachment\"7\xDAA\x04name\x82\xD3\xE4\x93\x02*\x12(/v2beta/{name=*/*/cases/*/attachments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xD3\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x16AttachmentServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php deleted file mode 100644 index d96b709d8545..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/CaseService.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - "\x0A\x84\x1C\x0A.google/cloud/support/v2beta/case_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A&google/cloud/support/v2beta/case.proto\x1A,google/cloud/support/v2beta/escalation.proto\x1A google/protobuf/field_mask.proto\"H\x0A\x0EGetCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"\x83\x01\x0A\x11CreateCaseRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x124\x0A\x04case\x18\x02 \x01(\x0B2!.google.cloud.support.v2beta.CaseB\x03\xE0A\x02\"\xD9\x01\x0A\x10ListCasesRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x12 cloudsupport.googleapis.com/Case\x12\x0E\x0A\x06filter\x18\x02 \x01(\x09\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\x12C\x0A\x0Cproduct_line\x18\x08 \x01(\x0E2(.google.cloud.support.v2beta.ProductLineH\x00\x88\x01\x01B\x0F\x0A\x0D_product_line\"^\x0A\x11ListCasesResponse\x120\x0A\x05cases\x18\x01 \x03(\x0B2!.google.cloud.support.v2beta.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"Z\x0A\x12SearchCasesRequest\x12\x0E\x0A\x06parent\x18\x04 \x01(\x09\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\"`\x0A\x13SearchCasesResponse\x120\x0A\x05cases\x18\x01 \x03(\x0B2!.google.cloud.support.v2beta.Case\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x8A\x01\x0A\x13EscalateCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12;\x0A\x0Aescalation\x18\x02 \x01(\x0B2'.google.cloud.support.v2beta.Escalation\"z\x0A\x11UpdateCaseRequest\x124\x0A\x04case\x18\x01 \x01(\x0B2!.google.cloud.support.v2beta.CaseB\x03\xE0A\x02\x12/\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMask\"J\x0A\x10CloseCaseRequest\x126\x0A\x04name\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\"\x94\x01\x0A SearchCaseClassificationsRequest\x12\x0D\x0A\x05query\x18\x01 \x01(\x09\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12:\x0A\x07product\x18\x07 \x01(\x0B2\$.google.cloud.support.v2beta.ProductB\x03\xE0A\x01\"\x8B\x01\x0A!SearchCaseClassificationsResponse\x12M\x0A\x14case_classifications\x18\x01 \x03(\x0B2/.google.cloud.support.v2beta.CaseClassification\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xCB\x0D\x0A\x0BCaseService\x12\xB5\x01\x0A\x07GetCase\x12+.google.cloud.support.v2beta.GetCaseRequest\x1A!.google.cloud.support.v2beta.Case\"Z\xDAA\x04name\x82\xD3\xE4\x93\x02M\x12!/v2beta/{name=projects/*/cases/*}Z(\x12&/v2beta/{name=organizations/*/cases/*}\x12\xC8\x01\x0A\x09ListCases\x12-.google.cloud.support.v2beta.ListCasesRequest\x1A..google.cloud.support.v2beta.ListCasesResponse\"\\\xDAA\x06parent\x82\xD3\xE4\x93\x02M\x12!/v2beta/{parent=projects/*}/casesZ(\x12&/v2beta/{parent=organizations/*}/cases\x12\xD3\x01\x0A\x0BSearchCases\x12/.google.cloud.support.v2beta.SearchCasesRequest\x1A0.google.cloud.support.v2beta.SearchCasesResponse\"a\x82\xD3\xE4\x93\x02[\x12(/v2beta/{parent=projects/*}/cases:searchZ/\x12-/v2beta/{parent=organizations/*}/cases:search\x12\xCE\x01\x0A\x0ACreateCase\x12..google.cloud.support.v2beta.CreateCaseRequest\x1A!.google.cloud.support.v2beta.Case\"m\xDAA\x0Bparent,case\x82\xD3\xE4\x93\x02Y\"!/v2beta/{parent=projects/*}/cases:\x04caseZ.\"&/v2beta/{parent=organizations/*}/cases:\x04case\x12\xDD\x01\x0A\x0AUpdateCase\x12..google.cloud.support.v2beta.UpdateCaseRequest\x1A!.google.cloud.support.v2beta.Case\"|\xDAA\x10case,update_mask\x82\xD3\xE4\x93\x02c2&/v2beta/{case.name=projects/*/cases/*}:\x04caseZ32+/v2beta/{case.name=organizations/*/cases/*}:\x04case\x12\xD0\x01\x0A\x0CEscalateCase\x120.google.cloud.support.v2beta.EscalateCaseRequest\x1A!.google.cloud.support.v2beta.Case\"k\x82\xD3\xE4\x93\x02e\"*/v2beta/{name=projects/*/cases/*}:escalate:\x01*Z4\"//v2beta/{name=organizations/*/cases/*}:escalate:\x01*\x12\xC4\x01\x0A\x09CloseCase\x12-.google.cloud.support.v2beta.CloseCaseRequest\x1A!.google.cloud.support.v2beta.Case\"e\x82\xD3\xE4\x93\x02_\"'/v2beta/{name=projects/*/cases/*}:close:\x01*Z1\",/v2beta/{name=organizations/*/cases/*}:close:\x01*\x12\xC6\x01\x0A\x19SearchCaseClassifications\x12=.google.cloud.support.v2beta.SearchCaseClassificationsRequest\x1A>.google.cloud.support.v2beta.SearchCaseClassificationsResponse\"*\x82\xD3\xE4\x93\x02\$\x12\"/v2beta/caseClassifications:search\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x10CaseServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php deleted file mode 100644 index 04bdbfb5d675..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Comment.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xDF\x05\x0A)google/cloud/support/v2beta/comment.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xDB\x02\x0A\x07Comment\x12\x14\x0A\x04name\x18\x01 \x01(\x09B\x06\xE0A\x08\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x02 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x128\x0A\x07creator\x18\x03 \x01(\x0B2\".google.cloud.support.v2beta.ActorB\x03\xE0A\x03\x12\x0C\x0A\x04body\x18\x04 \x01(\x09\x12\x1E\x0A\x0Fplain_text_body\x18\x05 \x01(\x09B\x05\x18\x01\xE0A\x03:\x9B\x01\xEAA\x97\x01\x0A#cloudsupport.googleapis.com/Comment\x12internalAddGeneratedFile( - "\x0A\xCE\x0C\x0A1google/cloud/support/v2beta/comment_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A)google/cloud/support/v2beta/comment.proto\"v\x0A\x13ListCommentsRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x11\x0A\x09page_size\x18\x04 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x05 \x01(\x09\"g\x0A\x14ListCommentsResponse\x126\x0A\x08comments\x18\x01 \x03(\x0B2\$.google.cloud.support.v2beta.Comment\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x8C\x01\x0A\x14CreateCommentRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12:\x0A\x07comment\x18\x02 \x01(\x0B2\$.google.cloud.support.v2beta.CommentB\x03\xE0A\x02\"N\x0A\x11GetCommentRequest\x129\x0A\x04name\x18\x01 \x01(\x09B+\xE0A\x02\xFAA%\x0A#cloudsupport.googleapis.com/Comment2\xE0\x05\x0A\x0ECommentService\x12\xE7\x01\x0A\x0CListComments\x120.google.cloud.support.v2beta.ListCommentsRequest\x1A1.google.cloud.support.v2beta.ListCommentsResponse\"r\xDAA\x06parent\x82\xD3\xE4\x93\x02c\x12,/v2beta/{parent=projects/*/cases/*}/commentsZ3\x121/v2beta/{parent=organizations/*/cases/*}/comments\x12\xF7\x01\x0A\x0DCreateComment\x121.google.cloud.support.v2beta.CreateCommentRequest\x1A\$.google.cloud.support.v2beta.Comment\"\x8C\x01\xDAA\x0Eparent,comment\x82\xD3\xE4\x93\x02u\",/v2beta/{parent=projects/*/cases/*}/comments:\x07commentZ<\"1/v2beta/{parent=organizations/*/cases/*}/comments:\x07comment\x12\x98\x01\x0A\x0AGetComment\x12..google.cloud.support.v2beta.GetCommentRequest\x1A\$.google.cloud.support.v2beta.Comment\"4\xDAA\x04name\x82\xD3\xE4\x93\x02'\x12%/v2beta/{name=*/*/cases/*/comments/*}\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xD0\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x13CommentServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php deleted file mode 100644 index 9732640975d1..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Content.php +++ /dev/null @@ -1,24 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xBF\x02\x0A)google/cloud/support/v2beta/content.proto\x12\x1Bgoogle.cloud.support.v2beta\"!\x0A\x0BTextContent\x12\x12\x0A\x0Aplain_text\x18\x01 \x01(\x09B\xC9\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0CContentProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php deleted file mode 100644 index 532f5c66b638..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/EmailMessage.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC3\x07\x0A/google/cloud/support/v2beta/email_message.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A)google/cloud/support/v2beta/content.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x89\x04\x0A\x0CEmailMessage\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\x126\x0A\x05actor\x18\x03 \x01(\x0B2\".google.cloud.support.v2beta.ActorB\x03\xE0A\x03\x12\x14\x0A\x07subject\x18\x04 \x01(\x09B\x03\xE0A\x03\x12&\x0A\x19recipient_email_addresses\x18\x05 \x03(\x09B\x03\xE0A\x03\x12\x1F\x0A\x12cc_email_addresses\x18\x06 \x03(\x09B\x03\xE0A\x03\x12C\x0A\x0Cbody_content\x18\x08 \x01(\x0B2(.google.cloud.support.v2beta.TextContentB\x03\xE0A\x03:\xD3\x01\xEAA\xCF\x01\x0A(cloudsupport.googleapis.com/EmailMessage\x12=projects/{project}/cases/{case}/emailMessages/{email_message}\x12Gorganizations/{organization}/cases/{case}/emailMessages/{email_message}*\x0DemailMessages2\x0CemailMessageB\xCE\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x11EmailMessageProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php deleted file mode 100644 index 4f02ac33a05a..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/Escalation.php +++ /dev/null @@ -1,25 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xF7\x03\x0A,google/cloud/support/v2beta/escalation.proto\x12\x1Bgoogle.cloud.support.v2beta\"\xD2\x01\x0A\x0AEscalation\x12C\x0A\x06reason\x18\x04 \x01(\x0E2..google.cloud.support.v2beta.Escalation.ReasonB\x03\xE0A\x02\x12\x1A\x0A\x0Djustification\x18\x05 \x01(\x09B\x03\xE0A\x02\"c\x0A\x06Reason\x12\x16\x0A\x12REASON_UNSPECIFIED\x10\x00\x12\x13\x0A\x0FRESOLUTION_TIME\x10\x01\x12\x17\x0A\x13TECHNICAL_EXPERTISE\x10\x02\x12\x13\x0A\x0FBUSINESS_IMPACT\x10\x03B\xCC\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0FEscalationProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php deleted file mode 100644 index ba6174c9de88..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedItem.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xB3\x06\x0A+google/cloud/support/v2beta/feed_item.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A,google/cloud/support/v2beta/attachment.proto\x1A)google/cloud/support/v2beta/comment.proto\x1A/google/cloud/support/v2beta/email_message.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xE6\x02\x0A\x08FeedItem\x12<\x0A\x07comment\x18d \x01(\x0B2\$.google.cloud.support.v2beta.CommentB\x03\xE0A\x03H\x00\x12B\x0A\x0Aattachment\x18e \x01(\x0B2'.google.cloud.support.v2beta.AttachmentB\x03\xE0A\x03H\x00\x12G\x0A\x0Demail_message\x18f \x01(\x0B2).google.cloud.support.v2beta.EmailMessageB\x03\xE0A\x03H\x00\x12J\x0A\x12deleted_attachment\x18g \x01(\x0B2'.google.cloud.support.v2beta.AttachmentB\x03\xE0A\x03H\x00\x123\x0A\x0Aevent_time\x18\x01 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03B\x0E\x0A\x0Cevent_objectB\xCA\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x0DFeedItemProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php deleted file mode 100644 index c8ed909c6857..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/FeedService.php +++ /dev/null @@ -1,29 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xE4\x07\x0A.google/cloud/support/v2beta/feed_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1A+google/cloud/support/v2beta/feed_item.proto\"\x93\x01\x0A\x0FShowFeedRequest\x128\x0A\x06parent\x18\x01 \x01(\x09B(\xE0A\x02\xFAA\"\x0A cloudsupport.googleapis.com/Case\x12\x15\x0A\x08order_by\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x03 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x04 \x01(\x09B\x03\xE0A\x01\"f\x0A\x10ShowFeedResponse\x129\x0A\x0Afeed_items\x18\x01 \x03(\x0B2%.google.cloud.support.v2beta.FeedItem\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x092\xBC\x02\x0A\x0BFeedService\x12\xDB\x01\x0A\x08ShowFeed\x12,.google.cloud.support.v2beta.ShowFeedRequest\x1A-.google.cloud.support.v2beta.ShowFeedResponse\"r\xDAA\x06parent\x82\xD3\xE4\x93\x02c\x12,/v2beta/{parent=projects/*/cases/*}:showFeedZ3\x121/v2beta/{parent=organizations/*/cases/*}:showFeed\x1AO\xCAA\x1Bcloudsupport.googleapis.com\xD2A.https://www.googleapis.com/auth/cloud-platformB\xCD\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x10FeedServiceProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php deleted file mode 100644 index a56bd0b1fbf4..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/PBCase.php +++ /dev/null @@ -1,28 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xFE\x0B\x0A&google/cloud/support/v2beta/case.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x19google/api/resource.proto\x1A'google/cloud/support/v2beta/actor.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\xF6\x06\x0A\x04Case\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12\x14\x0A\x0Cdisplay_name\x18\x02 \x01(\x09\x12\x13\x0A\x0Bdescription\x18\x03 \x01(\x09\x12G\x0A\x0Eclassification\x18\x04 \x01(\x0B2/.google.cloud.support.v2beta.CaseClassification\x12\x11\x0A\x09time_zone\x18\x08 \x01(\x09\x12\"\x0A\x1Asubscriber_email_addresses\x18\x09 \x03(\x09\x12;\x0A\x05state\x18\x0C \x01(\x0E2'.google.cloud.support.v2beta.Case.StateB\x03\xE0A\x03\x124\x0A\x0Bcreate_time\x18\x0D \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x124\x0A\x0Bupdate_time\x18\x0E \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x123\x0A\x07creator\x18\x0F \x01(\x0B2\".google.cloud.support.v2beta.Actor\x12\x15\x0A\x0Dcontact_email\x18# \x01(\x09\x12\x11\x0A\x09escalated\x18\x11 \x01(\x08\x12\x11\x0A\x09test_case\x18\x13 \x01(\x08\x12\x15\x0A\x0Dlanguage_code\x18\x17 \x01(\x09\x12<\x0A\x08priority\x18 \x01(\x0E2*.google.cloud.support.v2beta.Case.Priority\"\x7F\x0A\x05State\x12\x15\x0A\x11STATE_UNSPECIFIED\x10\x00\x12\x07\x0A\x03NEW\x10\x01\x12\x1E\x0A\x1AIN_PROGRESS_GOOGLE_SUPPORT\x10\x02\x12\x13\x0A\x0FACTION_REQUIRED\x10\x03\x12\x15\x0A\x11SOLUTION_PROVIDED\x10\x04\x12\x0A\x0A\x06CLOSED\x10\x05\"L\x0A\x08Priority\x12\x18\x0A\x14PRIORITY_UNSPECIFIED\x10\x00\x12\x06\x0A\x02P0\x10\x01\x12\x06\x0A\x02P1\x10\x02\x12\x06\x0A\x02P2\x10\x03\x12\x06\x0A\x02P3\x10\x04\x12\x06\x0A\x02P4\x10\x05:q\xEAAn\x0A cloudsupport.googleapis.com/Case\x12)organizations/{organization}/cases/{case}\x12\x1Fprojects/{project}/cases/{case}\"m\x0A\x12CaseClassification\x12\x0A\x0A\x02id\x18\x03 \x01(\x09\x12\x14\x0A\x0Cdisplay_name\x18\x04 \x01(\x09\x125\x0A\x07product\x18\x0A \x01(\x0B2\$.google.cloud.support.v2beta.Product\"I\x0A\x07Product\x12>\x0A\x0Cproduct_line\x18\x01 \x01(\x0E2(.google.cloud.support.v2beta.ProductLine*N\x0A\x0BProductLine\x12\x1C\x0A\x18PRODUCT_LINE_UNSPECIFIED\x10\x00\x12\x10\x0A\x0CGOOGLE_CLOUD\x10\x01\x12\x0F\x0A\x0BGOOGLE_MAPS\x10\x02B\xC6\x01\x0A\x1Fcom.google.cloud.support.v2betaB\x09CaseProtoP\x01Z9cloud.google.com/go/support/apiv2beta/supportpb;supportpb\xAA\x02\x1BGoogle.Cloud.Support.V2Beta\xCA\x02\x1BGoogle\\Cloud\\Support\\V2beta\xEA\x02\x1EGoogle::Cloud::Support::V2betab\x06proto3" - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php b/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php deleted file mode 100644 index 998bb4bd4afc..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/GPBMetadata/Google/Cloud/Support/V2Beta/SupportEventSubscription.php +++ /dev/null @@ -1,27 +0,0 @@ -internalAddGeneratedFile( - "\x0A\xC8\x09\x0AinternalAddGeneratedFile( - "\x0A\xEA\x1C\x0ADgoogle/cloud/support/v2beta/support_event_subscription_service.proto\x12\x1Bgoogle.cloud.support.v2beta\x1A\x17google/api/client.proto\x1A\x1Fgoogle/api/field_behavior.proto\x1A\x19google/api/resource.proto\x1Agoogle.cloud.support.v2beta.Actor - */ -class Actor extends \Google\Protobuf\Internal\Message -{ - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - */ - protected $display_name = ''; - /** - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * - * Generated from protobuf field string email = 2 [deprecated = true]; - * @deprecated - */ - protected $email = ''; - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $google_support = false; - /** - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * - * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $username = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $display_name - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * @type string $email - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * @type bool $google_support - * Output only. Whether the actor is a Google support actor. - * @type string $username - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\Actor::initOnce(); - parent::__construct($data); - } - - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The name to display for the actor. If not provided, it is inferred from - * credentials supplied during case creation. When an email is provided, a - * display name must also be provided. This will be obfuscated if the user - * is a Google Support agent. - * - * Generated from protobuf field string display_name = 1; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * - * Generated from protobuf field string email = 2 [deprecated = true]; - * @return string - * @deprecated - */ - public function getEmail() - { - if ($this->email !== '') { - @trigger_error('email is deprecated.', E_USER_DEPRECATED); - } - return $this->email; - } - - /** - * The email address of the actor. If not provided, it is inferred from the - * credentials supplied during case creation. When a name is provided, an - * email must also be provided. If the user is a Google Support agent, this is - * obfuscated. - * This field is deprecated. Use `username` instead. - * - * Generated from protobuf field string email = 2 [deprecated = true]; - * @param string $var - * @return $this - * @deprecated - */ - public function setEmail($var) - { - @trigger_error('email is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->email = $var; - - return $this; - } - - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getGoogleSupport() - { - return $this->google_support; - } - - /** - * Output only. Whether the actor is a Google support actor. - * - * Generated from protobuf field bool google_support = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setGoogleSupport($var) - { - GPBUtil::checkBool($var); - $this->google_support = $var; - - return $this; - } - - /** - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * - * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUsername() - { - return $this->username; - } - - /** - * Output only. The username of the actor. It may look like an email or other - * format provided by the identity provider. If not provided, it is inferred - * from the credentials supplied. When a name is provided, a username must - * also be provided. If the user is a Google Support agent, this will not be - * set. - * - * Generated from protobuf field string username = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUsername($var) - { - GPBUtil::checkString($var, True); - $this->username = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php deleted file mode 100644 index 59369f69aad9..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Attachment.php +++ /dev/null @@ -1,267 +0,0 @@ -google.cloud.support.v2beta.Attachment - */ -class Attachment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. The time at which the attachment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = null; - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - */ - protected $filename = ''; - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $mime_type = ''; - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $size_bytes = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. The resource name of the attachment. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the attachment was created. - * @type \Google\Cloud\Support\V2beta\Actor $creator - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * @type string $filename - * The filename of the attachment (e.g. `"graph.jpg"`). - * @type string $mime_type - * Output only. The MIME type of the attachment (e.g. text/plain). - * @type int|string $size_bytes - * Output only. The size of the attachment in bytes. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\Attachment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Identifier. The resource name of the attachment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.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. The time at which the attachment was created. - * - * 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. The time at which the attachment was created. - * - * 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. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * Output only. The user who uploaded the attachment. Note, the name and email - * will be obfuscated if the attachment was uploaded by Google support. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - * @return string - */ - public function getFilename() - { - return $this->filename; - } - - /** - * The filename of the attachment (e.g. `"graph.jpg"`). - * - * Generated from protobuf field string filename = 4; - * @param string $var - * @return $this - */ - public function setFilename($var) - { - GPBUtil::checkString($var, True); - $this->filename = $var; - - return $this; - } - - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * Output only. The MIME type of the attachment (e.g. text/plain). - * - * Generated from protobuf field string mime_type = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int|string - */ - public function getSizeBytes() - { - return $this->size_bytes; - } - - /** - * Output only. The size of the attachment in bytes. - * - * Generated from protobuf field int64 size_bytes = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int|string $var - * @return $this - */ - public function setSizeBytes($var) - { - GPBUtil::checkInt64($var); - $this->size_bytes = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php deleted file mode 100644 index 804aaa392f49..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CaseClassification.php +++ /dev/null @@ -1,181 +0,0 @@ -google.cloud.support.v2beta.CaseClassification - */ -class CaseClassification extends \Google\Protobuf\Internal\Message -{ - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * - * Generated from protobuf field string id = 3; - */ - protected $id = ''; - /** - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * - * Generated from protobuf field string display_name = 4; - */ - protected $display_name = ''; - /** - * The full product the classification corresponds to. - * - * Generated from protobuf field .google.cloud.support.v2beta.Product product = 10; - */ - protected $product = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * @type string $display_name - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * @type \Google\Cloud\Support\V2beta\Product $product - * The full product the classification corresponds to. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\PBCase::initOnce(); - parent::__construct($data); - } - - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * - * Generated from protobuf field string id = 3; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * The unique ID for a classification. Must be specified for case creation. - * To retrieve valid classification IDs for case creation, use - * `caseClassifications.search`. - * Classification IDs returned by `caseClassifications.search` are guaranteed - * to be valid for at least 6 months. If a given classification is - * deactiveated, it will immediately stop being returned. After 6 months, - * `case.create` requests using the classification ID will fail. - * - * Generated from protobuf field string id = 3; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * - * Generated from protobuf field string display_name = 4; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * A display name for the classification. - * The display name is not static and can change. To uniquely and consistently - * identify classifications, use the `CaseClassification.id` field. - * - * Generated from protobuf field string display_name = 4; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * The full product the classification corresponds to. - * - * Generated from protobuf field .google.cloud.support.v2beta.Product product = 10; - * @return \Google\Cloud\Support\V2beta\Product|null - */ - public function getProduct() - { - return $this->product; - } - - public function hasProduct() - { - return isset($this->product); - } - - public function clearProduct() - { - unset($this->product); - } - - /** - * The full product the classification corresponds to. - * - * Generated from protobuf field .google.cloud.support.v2beta.Product product = 10; - * @param \Google\Cloud\Support\V2beta\Product $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Product::class); - $this->product = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php deleted file mode 100644 index 09abfd6689fb..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CloseCaseRequest.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.support.v2beta.CloseCaseRequest - */ -class CloseCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case to close. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the case to close. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case to close. - * - * 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 name of the case to close. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php deleted file mode 100644 index 12b50d25f5a2..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Comment.php +++ /dev/null @@ -1,245 +0,0 @@ -google.cloud.support.v2beta.Comment - */ -class Comment extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Identifier. The resource name of the comment. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER, (.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $name = ''; - /** - * Output only. The time when the comment was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The user or Google Support agent who created the comment. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $creator = null; - /** - * The full comment body. - * Maximum of 12800 characters. - * - * Generated from protobuf field string body = 4; - */ - protected $body = ''; - /** - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * - * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - protected $plain_text_body = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Identifier. The resource name of the comment. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time when the comment was created. - * @type \Google\Cloud\Support\V2beta\Actor $creator - * Output only. The user or Google Support agent who created the comment. - * @type string $body - * The full comment body. - * Maximum of 12800 characters. - * @type string $plain_text_body - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\Comment::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Identifier. The resource name of the comment. - * - * 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. The resource name of the comment. - * - * 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; - } - - /** - * Output only. The time when the comment was created. - * - * 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. The time when the comment was created. - * - * 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. The user or Google Support agent who created the comment. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * Output only. The user or Google Support agent who created the comment. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * The full comment body. - * Maximum of 12800 characters. - * - * Generated from protobuf field string body = 4; - * @return string - */ - public function getBody() - { - return $this->body; - } - - /** - * The full comment body. - * Maximum of 12800 characters. - * - * Generated from protobuf field string body = 4; - * @param string $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkString($var, True); - $this->body = $var; - - return $this; - } - - /** - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * - * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - * @deprecated - */ - public function getPlainTextBody() - { - if ($this->plain_text_body !== '') { - @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); - } - return $this->plain_text_body; - } - - /** - * Output only. DEPRECATED. DO NOT USE. - * A duplicate of the `body` field. - * This field is only present for legacy reasons. - * - * Generated from protobuf field string plain_text_body = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - * @deprecated - */ - public function setPlainTextBody($var) - { - @trigger_error('plain_text_body is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->plain_text_body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php deleted file mode 100644 index 3e6af8730079..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCaseRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.support.v2beta.CreateCaseRequest - */ -class CreateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the parent under which the case should be created. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The case to be created. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $case = null; - - /** - * @param string $parent Required. The name of the parent under which the case should be created. Please see - * {@see CaseServiceClient::projectName()} for help formatting this field. - * @param \Google\Cloud\Support\V2beta\PBCase $case Required. The case to be created. - * - * @return \Google\Cloud\Support\V2beta\CreateCaseRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2beta\PBCase $case): self - { - return (new self()) - ->setParent($parent) - ->setCase($case); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the parent under which the case should be created. - * @type \Google\Cloud\Support\V2beta\PBCase $case - * Required. The case to be created. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the parent under which the case should be created. - * - * 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 name of the parent under which the case should be created. - * - * 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 case to be created. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2beta\PBCase|null - */ - public function getCase() - { - return $this->case; - } - - public function hasCase() - { - return isset($this->case); - } - - public function clearCase() - { - unset($this->case); - } - - /** - * Required. The case to be created. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case case = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2beta\PBCase $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\PBCase::class); - $this->case = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php deleted file mode 100644 index 73722d599bcd..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateCommentRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.cloud.support.v2beta.CreateCommentRequest - */ -class CreateCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case to which the comment should be added. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The comment to be added. - * - * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $comment = null; - - /** - * @param string $parent Required. The name of the case to which the comment should be added. Please see - * {@see CommentServiceClient::caseName()} for help formatting this field. - * @param \Google\Cloud\Support\V2beta\Comment $comment Required. The comment to be added. - * - * @return \Google\Cloud\Support\V2beta\CreateCommentRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2beta\Comment $comment): self - { - return (new self()) - ->setParent($parent) - ->setComment($comment); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The name of the case to which the comment should be added. - * @type \Google\Cloud\Support\V2beta\Comment $comment - * Required. The comment to be added. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case to which the comment should be added. - * - * 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 name of the case to which the comment should be added. - * - * 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 comment to be added. - * - * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2beta\Comment|null - */ - public function getComment() - { - return $this->comment; - } - - public function hasComment() - { - return isset($this->comment); - } - - public function clearComment() - { - unset($this->comment); - } - - /** - * Required. The comment to be added. - * - * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2beta\Comment $var - * @return $this - */ - public function setComment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Comment::class); - $this->comment = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php deleted file mode 100644 index 406c06c8dd58..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/CreateSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.cloud.support.v2beta.CreateSupportEventSubscriptionRequest - */ -class CreateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The Pub/Sub configuration to create. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $support_event_subscription = null; - - /** - * @param string $parent Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_id} - * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. - * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription Required. The Pub/Sub configuration to create. - * - * @return \Google\Cloud\Support\V2beta\CreateSupportEventSubscriptionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription): self - { - return (new self()) - ->setParent($parent) - ->setSupportEventSubscription($supportEventSubscription); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_id} - * @type \Google\Cloud\Support\V2beta\SupportEventSubscription $support_event_subscription - * Required. The Pub/Sub configuration to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The parent resource name where the support event subscription - * will be created. Format: organizations/{organization_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 parent resource name where the support event subscription - * will be created. Format: organizations/{organization_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 Pub/Sub configuration to create. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2beta\SupportEventSubscription|null - */ - public function getSupportEventSubscription() - { - return $this->support_event_subscription; - } - - public function hasSupportEventSubscription() - { - return isset($this->support_event_subscription); - } - - public function clearSupportEventSubscription() - { - unset($this->support_event_subscription); - } - - /** - * Required. The Pub/Sub configuration to create. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $var - * @return $this - */ - public function setSupportEventSubscription($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\SupportEventSubscription::class); - $this->support_event_subscription = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php deleted file mode 100644 index 749156d44fd3..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/DeleteSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.support.v2beta.DeleteSupportEventSubscriptionRequest - */ -class DeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\DeleteSupportEventSubscriptionRequest - * - * @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 name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to delete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php deleted file mode 100644 index fd71d8833511..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EmailMessage.php +++ /dev/null @@ -1,309 +0,0 @@ -google.cloud.support.v2beta.EmailMessage - */ -class EmailMessage extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. Resource name for the email message. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Output only. Time when this email message object was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The user or Google Support agent that created this email - * message. This is inferred from the headers on the email message. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor actor = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $actor = null; - /** - * Output only. Subject of the email. - * - * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $subject = ''; - /** - * Output only. Email addresses the email was sent to. - * - * Generated from protobuf field repeated string recipient_email_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $recipient_email_addresses; - /** - * Output only. Email addresses CCed on the email. - * - * Generated from protobuf field repeated string cc_email_addresses = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $cc_email_addresses; - /** - * Output only. The full email message body. A best-effort attempt is made to - * remove extraneous reply threads. - * - * Generated from protobuf field .google.cloud.support.v2beta.TextContent body_content = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $body_content = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. Resource name for the email message. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. Time when this email message object was created. - * @type \Google\Cloud\Support\V2beta\Actor $actor - * Output only. The user or Google Support agent that created this email - * message. This is inferred from the headers on the email message. - * @type string $subject - * Output only. Subject of the email. - * @type string[] $recipient_email_addresses - * Output only. Email addresses the email was sent to. - * @type string[] $cc_email_addresses - * Output only. Email addresses CCed on the email. - * @type \Google\Cloud\Support\V2beta\TextContent $body_content - * Output only. The full email message body. A best-effort attempt is made to - * remove extraneous reply threads. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\EmailMessage::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. Resource name for the email message. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. Resource name for the email message. - * - * 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. Time when this email message object was created. - * - * 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. Time when this email message object was created. - * - * 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. The user or Google Support agent that created this email - * message. This is inferred from the headers on the email message. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor actor = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\Actor|null - */ - public function getActor() - { - return $this->actor; - } - - public function hasActor() - { - return isset($this->actor); - } - - public function clearActor() - { - unset($this->actor); - } - - /** - * Output only. The user or Google Support agent that created this email - * message. This is inferred from the headers on the email message. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor actor = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\Actor $var - * @return $this - */ - public function setActor($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); - $this->actor = $var; - - return $this; - } - - /** - * Output only. Subject of the email. - * - * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSubject() - { - return $this->subject; - } - - /** - * Output only. Subject of the email. - * - * Generated from protobuf field string subject = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSubject($var) - { - GPBUtil::checkString($var, True); - $this->subject = $var; - - return $this; - } - - /** - * Output only. Email addresses the email was sent to. - * - * Generated from protobuf field repeated string recipient_email_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField - */ - public function getRecipientEmailAddresses() - { - return $this->recipient_email_addresses; - } - - /** - * Output only. Email addresses the email was sent to. - * - * Generated from protobuf field repeated string recipient_email_addresses = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string[] $var - * @return $this - */ - public function setRecipientEmailAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->recipient_email_addresses = $arr; - - return $this; - } - - /** - * Output only. Email addresses CCed on the email. - * - * Generated from protobuf field repeated string cc_email_addresses = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return RepeatedField - */ - public function getCcEmailAddresses() - { - return $this->cc_email_addresses; - } - - /** - * Output only. Email addresses CCed on the email. - * - * Generated from protobuf field repeated string cc_email_addresses = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string[] $var - * @return $this - */ - public function setCcEmailAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->cc_email_addresses = $arr; - - return $this; - } - - /** - * Output only. The full email message body. A best-effort attempt is made to - * remove extraneous reply threads. - * - * Generated from protobuf field .google.cloud.support.v2beta.TextContent body_content = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\TextContent|null - */ - public function getBodyContent() - { - return $this->body_content; - } - - public function hasBodyContent() - { - return isset($this->body_content); - } - - public function clearBodyContent() - { - unset($this->body_content); - } - - /** - * Output only. The full email message body. A best-effort attempt is made to - * remove extraneous reply threads. - * - * Generated from protobuf field .google.cloud.support.v2beta.TextContent body_content = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\TextContent $var - * @return $this - */ - public function setBodyContent($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\TextContent::class); - $this->body_content = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php deleted file mode 100644 index 59acffdb5c87..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/EscalateCaseRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.cloud.support.v2beta.EscalateCaseRequest - */ -class EscalateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case to be escalated. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * The escalation information to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2beta.Escalation escalation = 2; - */ - protected $escalation = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the case to be escalated. - * @type \Google\Cloud\Support\V2beta\Escalation $escalation - * The escalation information to be sent with the escalation request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case to be escalated. - * - * 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 name of the case to be escalated. - * - * 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; - } - - /** - * The escalation information to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2beta.Escalation escalation = 2; - * @return \Google\Cloud\Support\V2beta\Escalation|null - */ - public function getEscalation() - { - return $this->escalation; - } - - public function hasEscalation() - { - return isset($this->escalation); - } - - public function clearEscalation() - { - unset($this->escalation); - } - - /** - * The escalation information to be sent with the escalation request. - * - * Generated from protobuf field .google.cloud.support.v2beta.Escalation escalation = 2; - * @param \Google\Cloud\Support\V2beta\Escalation $var - * @return $this - */ - public function setEscalation($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Escalation::class); - $this->escalation = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php deleted file mode 100644 index 86610b1235f5..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.support.v2beta.Escalation - */ -class Escalation extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2beta.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reason = 0; - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $justification = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $reason - * Required. The reason why the Case is being escalated. - * @type string $justification - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\Escalation::initOnce(); - parent::__construct($data); - } - - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2beta.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return int - */ - public function getReason() - { - return $this->reason; - } - - /** - * Required. The reason why the Case is being escalated. - * - * Generated from protobuf field .google.cloud.support.v2beta.Escalation.Reason reason = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param int $var - * @return $this - */ - public function setReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\Escalation\Reason::class); - $this->reason = $var; - - return $this; - } - - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getJustification() - { - return $this->justification; - } - - /** - * Required. A free text description to accompany the `reason` field above. - * Provides additional context on why the case is being escalated. - * - * Generated from protobuf field string justification = 5 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setJustification($var) - { - GPBUtil::checkString($var, True); - $this->justification = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php deleted file mode 100644 index bd3d6fc6a7fe..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Escalation/Reason.php +++ /dev/null @@ -1,69 +0,0 @@ -google.cloud.support.v2beta.Escalation.Reason - */ -class Reason -{ - /** - * The escalation reason is in an unknown state or has not been specified. - * - * Generated from protobuf enum REASON_UNSPECIFIED = 0; - */ - const REASON_UNSPECIFIED = 0; - /** - * The case is taking too long to resolve. - * - * Generated from protobuf enum RESOLUTION_TIME = 1; - */ - const RESOLUTION_TIME = 1; - /** - * The support agent does not have the expertise required to successfully - * resolve the issue. - * - * Generated from protobuf enum TECHNICAL_EXPERTISE = 2; - */ - const TECHNICAL_EXPERTISE = 2; - /** - * The issue is having a significant business impact. - * - * Generated from protobuf enum BUSINESS_IMPACT = 3; - */ - const BUSINESS_IMPACT = 3; - - private static $valueToName = [ - self::REASON_UNSPECIFIED => 'REASON_UNSPECIFIED', - self::RESOLUTION_TIME => 'RESOLUTION_TIME', - self::TECHNICAL_EXPERTISE => 'TECHNICAL_EXPERTISE', - self::BUSINESS_IMPACT => 'BUSINESS_IMPACT', - ]; - - 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php deleted file mode 100644 index 1e8aef659d41..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/FeedItem.php +++ /dev/null @@ -1,221 +0,0 @@ -google.cloud.support.v2beta.FeedItem - */ -class FeedItem extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Time corresponding to the event of this item. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $event_time = null; - protected $event_object; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Support\V2beta\Comment $comment - * Output only. A comment added to the case. - * @type \Google\Cloud\Support\V2beta\Attachment $attachment - * Output only. An attachment attached to the case. - * @type \Google\Cloud\Support\V2beta\EmailMessage $email_message - * Output only. An email message received in reply to the case. - * @type \Google\Cloud\Support\V2beta\Attachment $deleted_attachment - * Output only. A deleted attachment that used to be associated with the - * support case. - * @type \Google\Protobuf\Timestamp $event_time - * Output only. Time corresponding to the event of this item. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\FeedItem::initOnce(); - parent::__construct($data); - } - - /** - * Output only. A comment added to the case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\Comment|null - */ - public function getComment() - { - return $this->readOneof(100); - } - - public function hasComment() - { - return $this->hasOneof(100); - } - - /** - * Output only. A comment added to the case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Comment comment = 100 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\Comment $var - * @return $this - */ - public function setComment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Comment::class); - $this->writeOneof(100, $var); - - return $this; - } - - /** - * Output only. An attachment attached to the case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Attachment attachment = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\Attachment|null - */ - public function getAttachment() - { - return $this->readOneof(101); - } - - public function hasAttachment() - { - return $this->hasOneof(101); - } - - /** - * Output only. An attachment attached to the case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Attachment attachment = 101 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\Attachment $var - * @return $this - */ - public function setAttachment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Attachment::class); - $this->writeOneof(101, $var); - - return $this; - } - - /** - * Output only. An email message received in reply to the case. - * - * Generated from protobuf field .google.cloud.support.v2beta.EmailMessage email_message = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\EmailMessage|null - */ - public function getEmailMessage() - { - return $this->readOneof(102); - } - - public function hasEmailMessage() - { - return $this->hasOneof(102); - } - - /** - * Output only. An email message received in reply to the case. - * - * Generated from protobuf field .google.cloud.support.v2beta.EmailMessage email_message = 102 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\EmailMessage $var - * @return $this - */ - public function setEmailMessage($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\EmailMessage::class); - $this->writeOneof(102, $var); - - return $this; - } - - /** - * Output only. A deleted attachment that used to be associated with the - * support case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Attachment deleted_attachment = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Cloud\Support\V2beta\Attachment|null - */ - public function getDeletedAttachment() - { - return $this->readOneof(103); - } - - public function hasDeletedAttachment() - { - return $this->hasOneof(103); - } - - /** - * Output only. A deleted attachment that used to be associated with the - * support case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Attachment deleted_attachment = 103 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Cloud\Support\V2beta\Attachment $var - * @return $this - */ - public function setDeletedAttachment($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Attachment::class); - $this->writeOneof(103, $var); - - return $this; - } - - /** - * Output only. Time corresponding to the event of this item. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getEventTime() - { - return $this->event_time; - } - - public function hasEventTime() - { - return isset($this->event_time); - } - - public function clearEventTime() - { - unset($this->event_time); - } - - /** - * Output only. Time corresponding to the event of this item. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getEventObject() - { - return $this->whichOneof("event_object"); - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php deleted file mode 100644 index 579ba88a3902..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetAttachmentRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2beta.GetAttachmentRequest - */ -class GetAttachmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the attachment to get. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the attachment to get. Please see - * {@see CaseAttachmentServiceClient::attachmentName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\GetAttachmentRequest - * - * @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 name of the attachment to get. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the attachment to get. - * - * 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 name of the attachment to get. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php deleted file mode 100644 index ff14ec737b03..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCaseRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2beta.GetCaseRequest - */ -class GetCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The full name of a case to be retrieved. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The full name of a case to be retrieved. Please see - * {@see CaseServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\GetCaseRequest - * - * @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 full name of a case to be retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The full name of a case to be retrieved. - * - * 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 full name of a case to be retrieved. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php deleted file mode 100644 index 32f4fe3c943f..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetCommentRequest.php +++ /dev/null @@ -1,81 +0,0 @@ -google.cloud.support.v2beta.GetCommentRequest - */ -class GetCommentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the comment to retrieve. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the comment to retrieve. Please see - * {@see CommentServiceClient::commentName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\GetCommentRequest - * - * @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 name of the comment to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the comment to retrieve. - * - * 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 name of the comment to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php deleted file mode 100644 index ce6febd2d464..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/GetSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,91 +0,0 @@ -google.cloud.support.v2beta.GetSupportEventSubscriptionRequest - */ -class GetSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * Please see {@see SupportEventSubscriptionServiceClient::supportEventSubscriptionName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\GetSupportEventSubscriptionRequest - * - * @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 name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to retrieve. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php deleted file mode 100644 index 22e0f596a164..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsRequest.php +++ /dev/null @@ -1,173 +0,0 @@ -google.cloud.support.v2beta.ListAttachmentsRequest - */ -class ListAttachmentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case for which attachments should be listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the case for which attachments should be listed. Please see - * {@see CaseAttachmentServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\ListAttachmentsRequest - * - * @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 name of the case for which attachments should be listed. - * @type int $page_size - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case for which attachments should be listed. - * - * 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 name of the case for which attachments should be listed. - * - * 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; - } - - /** - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of attachments fetched with each request. - * If not provided, the default is 10. The maximum page size that will be - * returned is 100. - * The size of each page can be smaller than the requested page size and can - * include zero. For example, you could request 100 attachments on one page, - * receive 0, and then on the next page, receive 90. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php deleted file mode 100644 index 8260ee7d199d..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListAttachmentsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2beta.ListAttachmentsResponse - */ -class ListAttachmentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of attachments associated with a case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Attachment attachments = 1; - */ - private $attachments; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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\Support\V2beta\Attachment[] $attachments - * The list of attachments associated with a case. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\AttachmentService::initOnce(); - parent::__construct($data); - } - - /** - * The list of attachments associated with a case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Attachment attachments = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\Attachment> - */ - public function getAttachments() - { - return $this->attachments; - } - - /** - * The list of attachments associated with a case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Attachment attachments = 1; - * @param \Google\Cloud\Support\V2beta\Attachment[] $var - * @return $this - */ - public function setAttachments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\Attachment::class); - $this->attachments = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.attachments.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php deleted file mode 100644 index 7623afe88571..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesRequest.php +++ /dev/null @@ -1,287 +0,0 @@ -google.cloud.support.v2beta.ListCasesRequest - */ -class ListCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of a parent to list cases under. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - */ - protected $filter = ''; - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - /** - * The product line to request cases for. If unspecified, only - * Google Cloud cases will be returned. - * - * Generated from protobuf field optional .google.cloud.support.v2beta.ProductLine product_line = 8; - */ - protected $product_line = null; - - /** - * @param string $parent Required. The name of a parent to list cases under. Please see - * {@see CaseServiceClient::projectName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\ListCasesRequest - * - * @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 name of a parent to list cases under. - * @type string $filter - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * @type int $page_size - * The maximum number of cases fetched with each request. Defaults to 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * @type int $product_line - * The product line to request cases for. If unspecified, only - * Google Cloud cases will be returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of a parent to list cases under. - * - * 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 name of a parent to list cases under. - * - * 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; - } - - /** - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * An expression used to filter cases. - * If it's an empty string, then no filtering happens. Otherwise, the endpoint - * returns the cases that match the filter. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * EXAMPLES: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string filter = 2; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of cases fetched with each request. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 5; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * The product line to request cases for. If unspecified, only - * Google Cloud cases will be returned. - * - * Generated from protobuf field optional .google.cloud.support.v2beta.ProductLine product_line = 8; - * @return int - */ - public function getProductLine() - { - return isset($this->product_line) ? $this->product_line : 0; - } - - public function hasProductLine() - { - return isset($this->product_line); - } - - public function clearProductLine() - { - unset($this->product_line); - } - - /** - * The product line to request cases for. If unspecified, only - * Google Cloud cases will be returned. - * - * Generated from protobuf field optional .google.cloud.support.v2beta.ProductLine product_line = 8; - * @param int $var - * @return $this - */ - public function setProductLine($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\ProductLine::class); - $this->product_line = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php deleted file mode 100644 index 217fcabeaf16..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCasesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.support.v2beta.ListCasesResponse - */ -class ListCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; - */ - private $cases; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * - * 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\Support\V2beta\PBCase[] $cases - * The list of cases associated with the parent after any - * filters have been applied. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\PBCase> - */ - public function getCases() - { - return $this->cases; - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; - * @param \Google\Cloud\Support\V2beta\PBCase[] $var - * @return $this - */ - public function setCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\PBCase::class); - $this->cases = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.list` requests. If unspecified, there are no - * more results to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php deleted file mode 100644 index 1fee69ba5c52..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsRequest.php +++ /dev/null @@ -1,153 +0,0 @@ -google.cloud.support.v2beta.ListCommentsRequest - */ -class ListCommentsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the case for which to list comments. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of comments to fetch. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * - * Generated from protobuf field string page_token = 5; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The name of the case for which to list comments. Please see - * {@see CommentServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\ListCommentsRequest - * - * @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 name of the case for which to list comments. - * @type int $page_size - * The maximum number of comments to fetch. Defaults to 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the case for which to list comments. - * - * 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 name of the case for which to list comments. - * - * 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; - } - - /** - * The maximum number of comments to fetch. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of comments to fetch. Defaults to 10. - * - * Generated from protobuf field int32 page_size = 4; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * - * Generated from protobuf field string page_token = 5; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is returned. - * - * Generated from protobuf field string page_token = 5; - * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php deleted file mode 100644 index 98b78c99579e..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListCommentsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2beta.ListCommentsResponse - */ -class ListCommentsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of the comments associated with the case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Comment comments = 1; - */ - private $comments; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * - * 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\Support\V2beta\Comment[] $comments - * List of the comments associated with the case. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CommentService::initOnce(); - parent::__construct($data); - } - - /** - * List of the comments associated with the case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Comment comments = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\Comment> - */ - public function getComments() - { - return $this->comments; - } - - /** - * List of the comments associated with the case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Comment comments = 1; - * @param \Google\Cloud\Support\V2beta\Comment[] $var - * @return $this - */ - public function setComments($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\Comment::class); - $this->comments = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `cases.comments.list` requests. If unspecified, there - * are no more results to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php deleted file mode 100644 index 975a70aa91fc..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsRequest.php +++ /dev/null @@ -1,274 +0,0 @@ -google.cloud.support.v2beta.ListSupportEventSubscriptionsRequest - */ -class ListSupportEventSubscriptionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_id} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * - * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $show_deleted = false; - /** - * Optional. The maximum number of support event subscriptions to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * - * Generated from protobuf field string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_id} - * Please see {@see SupportEventSubscriptionServiceClient::organizationName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\ListSupportEventSubscriptionsRequest - * - * @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 fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_id} - * @type string $filter - * Optional. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * @type bool $show_deleted - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * @type int $page_size - * Optional. The maximum number of support event subscriptions to return. - * @type string $page_token - * Optional. A token identifying the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_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 fully qualified name of the Cloud resource to list support - * event subscriptions under. Format: organizations/{organization_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. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. Filter expression based on AIP-160. - * Supported fields: - * - pub_sub_topic - * - state - * Examples: - * - `pub_sub_topic="projects/example-project/topics/example-topic"` - * - `state=WORKING` - * - `pub_sub_topic="projects/example-project/topics/example-topic" AND - * state=WORKING` - * - * Generated from protobuf field string filter = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * - * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * Optional. Whether to show deleted subscriptions. By default, deleted - * subscriptions are not returned. - * - * Generated from protobuf field bool show_deleted = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - - /** - * Optional. The maximum number of support event subscriptions to return. - * - * Generated from protobuf field int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of support event subscriptions to return. - * - * 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 the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * - * 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 the page of results to return. If - * unspecified, the first page is retrieved. - * When paginating, all other parameters provided to - * `ListSupportEventSubscriptions` must match the call that provided the page - * token. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php deleted file mode 100644 index 399066f36b1d..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ListSupportEventSubscriptionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.cloud.support.v2beta.ListSupportEventSubscriptionsResponse - */ -class ListSupportEventSubscriptionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The support event subscriptions. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.SupportEventSubscription support_event_subscriptions = 1; - */ - private $support_event_subscriptions; - /** - * A token, which can be sent 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\Support\V2beta\SupportEventSubscription[] $support_event_subscriptions - * The support event subscriptions. - * @type string $next_page_token - * A token, which can be sent 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\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * The support event subscriptions. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.SupportEventSubscription support_event_subscriptions = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\SupportEventSubscription> - */ - public function getSupportEventSubscriptions() - { - return $this->support_event_subscriptions; - } - - /** - * The support event subscriptions. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.SupportEventSubscription support_event_subscriptions = 1; - * @param \Google\Cloud\Support\V2beta\SupportEventSubscription[] $var - * @return $this - */ - public function setSupportEventSubscriptions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\SupportEventSubscription::class); - $this->support_event_subscriptions = $arr; - - return $this; - } - - /** - * A token, which can be sent 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, which can be sent 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php deleted file mode 100644 index fad5de1eb73e..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase.php +++ /dev/null @@ -1,654 +0,0 @@ -google.cloud.support.v2beta.Case - */ -class PBCase extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name for the case. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - */ - protected $display_name = ''; - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - */ - protected $description = ''; - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2beta.CaseClassification classification = 4; - */ - protected $classification = null; - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - */ - protected $time_zone = ''; - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - */ - private $subscriber_email_addresses; - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. The time this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 15; - */ - protected $creator = null; - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - */ - protected $contact_email = ''; - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - */ - protected $escalated = false; - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - */ - protected $test_case = false; - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - */ - protected $language_code = ''; - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case.Priority priority = 32; - */ - protected $priority = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name for the case. - * @type string $display_name - * The short summary of the issue reported in this case. - * @type string $description - * A broad description of the issue. - * @type \Google\Cloud\Support\V2beta\CaseClassification $classification - * The issue classification applicable to this case. - * @type string $time_zone - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * @type string[] $subscriber_email_addresses - * The email addresses to receive updates on this case. - * @type int $state - * Output only. The current status of the support case. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time this case was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time this case was last updated. - * @type \Google\Cloud\Support\V2beta\Actor $creator - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * @type string $contact_email - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * @type bool $escalated - * Whether the case is currently escalated. - * @type bool $test_case - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * @type string $language_code - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * @type int $priority - * The priority of this case. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\PBCase::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name for the case. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name for the case. - * - * 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; - } - - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The short summary of the issue reported in this case. - * - * Generated from protobuf field string display_name = 2; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * A broad description of the issue. - * - * Generated from protobuf field string description = 3; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2beta.CaseClassification classification = 4; - * @return \Google\Cloud\Support\V2beta\CaseClassification|null - */ - public function getClassification() - { - return $this->classification; - } - - public function hasClassification() - { - return isset($this->classification); - } - - public function clearClassification() - { - unset($this->classification); - } - - /** - * The issue classification applicable to this case. - * - * Generated from protobuf field .google.cloud.support.v2beta.CaseClassification classification = 4; - * @param \Google\Cloud\Support\V2beta\CaseClassification $var - * @return $this - */ - public function setClassification($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\CaseClassification::class); - $this->classification = $var; - - return $this; - } - - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - * @return string - */ - public function getTimeZone() - { - return $this->time_zone; - } - - /** - * The timezone of the user who created the support case. - * It should be in a format IANA recognizes: https://www.iana.org/time-zones. - * There is no additional validation done by the API. - * - * Generated from protobuf field string time_zone = 8; - * @param string $var - * @return $this - */ - public function setTimeZone($var) - { - GPBUtil::checkString($var, True); - $this->time_zone = $var; - - return $this; - } - - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - * @return RepeatedField - */ - public function getSubscriberEmailAddresses() - { - return $this->subscriber_email_addresses; - } - - /** - * The email addresses to receive updates on this case. - * - * Generated from protobuf field repeated string subscriber_email_addresses = 9; - * @param string[] $var - * @return $this - */ - public function setSubscriberEmailAddresses($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); - $this->subscriber_email_addresses = $arr; - - return $this; - } - - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The current status of the support case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case.State state = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\PBCase\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. The time this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 13 [(.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 this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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. The time this case was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 14 [(.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; - } - - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 15; - * @return \Google\Cloud\Support\V2beta\Actor|null - */ - public function getCreator() - { - return $this->creator; - } - - public function hasCreator() - { - return isset($this->creator); - } - - public function clearCreator() - { - unset($this->creator); - } - - /** - * The user who created the case. - * Note: The name and email will be obfuscated if the case was created by - * Google Support. - * - * Generated from protobuf field .google.cloud.support.v2beta.Actor creator = 15; - * @param \Google\Cloud\Support\V2beta\Actor $var - * @return $this - */ - public function setCreator($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Actor::class); - $this->creator = $var; - - return $this; - } - - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - * @return string - */ - public function getContactEmail() - { - return $this->contact_email; - } - - /** - * A user-supplied email address to send case update notifications for. This - * should only be used in BYOID flows, where we cannot infer the user's email - * address directly from their EUCs. - * - * Generated from protobuf field string contact_email = 35; - * @param string $var - * @return $this - */ - public function setContactEmail($var) - { - GPBUtil::checkString($var, True); - $this->contact_email = $var; - - return $this; - } - - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - * @return bool - */ - public function getEscalated() - { - return $this->escalated; - } - - /** - * Whether the case is currently escalated. - * - * Generated from protobuf field bool escalated = 17; - * @param bool $var - * @return $this - */ - public function setEscalated($var) - { - GPBUtil::checkBool($var); - $this->escalated = $var; - - return $this; - } - - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - * @return bool - */ - public function getTestCase() - { - return $this->test_case; - } - - /** - * Whether this case was created for internal API testing and should not be - * acted on by the support team. - * - * Generated from protobuf field bool test_case = 19; - * @param bool $var - * @return $this - */ - public function setTestCase($var) - { - GPBUtil::checkBool($var); - $this->test_case = $var; - - return $this; - } - - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - * @return string - */ - public function getLanguageCode() - { - return $this->language_code; - } - - /** - * The language the user has requested to receive support in. This should be a - * BCP 47 language code (e.g., `"en"`, `"zh-CN"`, `"zh-TW"`, `"ja"`, `"ko"`). - * If no language or an unsupported language is specified, this field defaults - * to English (en). - * Language selection during case creation may affect your available support - * options. For a list of supported languages and their support working hours, - * see: https://cloud.google.com/support/docs/language-working-hours - * - * Generated from protobuf field string language_code = 23; - * @param string $var - * @return $this - */ - public function setLanguageCode($var) - { - GPBUtil::checkString($var, True); - $this->language_code = $var; - - return $this; - } - - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case.Priority priority = 32; - * @return int - */ - public function getPriority() - { - return $this->priority; - } - - /** - * The priority of this case. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case.Priority priority = 32; - * @param int $var - * @return $this - */ - public function setPriority($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\PBCase\Priority::class); - $this->priority = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php deleted file mode 100644 index 051cdb63b60c..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/Priority.php +++ /dev/null @@ -1,85 +0,0 @@ -google.cloud.support.v2beta.Case.Priority - */ -class Priority -{ - /** - * Priority is undefined or has not been set yet. - * - * Generated from protobuf enum PRIORITY_UNSPECIFIED = 0; - */ - const PRIORITY_UNSPECIFIED = 0; - /** - * Extreme impact on a production service. Service is hard down. - * - * Generated from protobuf enum P0 = 1; - */ - const P0 = 1; - /** - * Critical impact on a production service. Service is currently unusable. - * - * Generated from protobuf enum P1 = 2; - */ - const P1 = 2; - /** - * Severe impact on a production service. Service is usable but greatly - * impaired. - * - * Generated from protobuf enum P2 = 3; - */ - const P2 = 3; - /** - * Medium impact on a production service. Service is available, but - * moderately impaired. - * - * Generated from protobuf enum P3 = 4; - */ - const P3 = 4; - /** - * General questions or minor issues. Production service is fully - * available. - * - * Generated from protobuf enum P4 = 5; - */ - const P4 = 5; - - private static $valueToName = [ - self::PRIORITY_UNSPECIFIED => 'PRIORITY_UNSPECIFIED', - self::P0 => 'P0', - self::P1 => 'P1', - self::P2 => 'P2', - self::P3 => 'P3', - self::P4 => 'P4', - ]; - - 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php deleted file mode 100644 index 29f64a2bed5c..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/PBCase/State.php +++ /dev/null @@ -1,86 +0,0 @@ -google.cloud.support.v2beta.Case.State - */ -class State -{ - /** - * Case is in an unknown state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * The case has been created but no one is assigned to work on it yet. - * - * Generated from protobuf enum NEW = 1; - */ - const PBNEW = 1; - /** - * The case is currently being handled by Google support. - * - * Generated from protobuf enum IN_PROGRESS_GOOGLE_SUPPORT = 2; - */ - const IN_PROGRESS_GOOGLE_SUPPORT = 2; - /** - * Google is waiting for a response. - * - * Generated from protobuf enum ACTION_REQUIRED = 3; - */ - const ACTION_REQUIRED = 3; - /** - * A solution has been offered for the case, but it isn't yet closed. - * - * Generated from protobuf enum SOLUTION_PROVIDED = 4; - */ - const SOLUTION_PROVIDED = 4; - /** - * The case has been resolved. - * - * Generated from protobuf enum CLOSED = 5; - */ - const CLOSED = 5; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::PBNEW => 'NEW', - self::IN_PROGRESS_GOOGLE_SUPPORT => 'IN_PROGRESS_GOOGLE_SUPPORT', - self::ACTION_REQUIRED => 'ACTION_REQUIRED', - self::SOLUTION_PROVIDED => 'SOLUTION_PROVIDED', - 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)) { - $pbconst = __CLASS__. '::PB' . strtoupper($name); - if (!defined($pbconst)) { - throw new UnexpectedValueException(sprintf( - 'Enum %s has no value defined for name %s', __CLASS__, $name)); - } - return constant($pbconst); - } - return constant($const); - } -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php deleted file mode 100644 index c3544621a2df..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/Product.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.support.v2beta.Product - */ -class Product extends \Google\Protobuf\Internal\Message -{ - /** - * The product line of the Product. - * - * Generated from protobuf field .google.cloud.support.v2beta.ProductLine product_line = 1; - */ - protected $product_line = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $product_line - * The product line of the Product. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\PBCase::initOnce(); - parent::__construct($data); - } - - /** - * The product line of the Product. - * - * Generated from protobuf field .google.cloud.support.v2beta.ProductLine product_line = 1; - * @return int - */ - public function getProductLine() - { - return $this->product_line; - } - - /** - * The product line of the Product. - * - * Generated from protobuf field .google.cloud.support.v2beta.ProductLine product_line = 1; - * @param int $var - * @return $this - */ - public function setProductLine($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\ProductLine::class); - $this->product_line = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php deleted file mode 100644 index 9df6d79ba10a..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ProductLine.php +++ /dev/null @@ -1,61 +0,0 @@ -google.cloud.support.v2beta.ProductLine - */ -class ProductLine -{ - /** - * Unknown product type. - * - * Generated from protobuf enum PRODUCT_LINE_UNSPECIFIED = 0; - */ - const PRODUCT_LINE_UNSPECIFIED = 0; - /** - * Google Cloud - * - * Generated from protobuf enum GOOGLE_CLOUD = 1; - */ - const GOOGLE_CLOUD = 1; - /** - * Google Maps - * - * Generated from protobuf enum GOOGLE_MAPS = 2; - */ - const GOOGLE_MAPS = 2; - - private static $valueToName = [ - self::PRODUCT_LINE_UNSPECIFIED => 'PRODUCT_LINE_UNSPECIFIED', - self::GOOGLE_CLOUD => 'GOOGLE_CLOUD', - self::GOOGLE_MAPS => 'GOOGLE_MAPS', - ]; - - 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php deleted file mode 100644 index 8bfcfda2cd22..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsRequest.php +++ /dev/null @@ -1,191 +0,0 @@ -google.cloud.support.v2beta.SearchCaseClassificationsRequest - */ -class SearchCaseClassificationsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * - * Generated from protobuf field string query = 1; - */ - protected $query = ''; - /** - * The maximum number of classifications fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Optional. The product to return case classifications for. - * - * Generated from protobuf field .google.cloud.support.v2beta.Product product = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $product = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $query - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * @type int $page_size - * The maximum number of classifications fetched with each request. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * @type \Google\Cloud\Support\V2beta\Product $product - * Optional. The product to return case classifications for. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * - * Generated from protobuf field string query = 1; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * An expression used to filter case classifications. - * If it's an empty string, then no filtering happens. Otherwise, case - * classifications will be returned that match the filter. - * - * Generated from protobuf field string query = 1; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The maximum number of classifications fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of classifications fetched with each request. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. The product to return case classifications for. - * - * Generated from protobuf field .google.cloud.support.v2beta.Product product = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Cloud\Support\V2beta\Product|null - */ - public function getProduct() - { - return $this->product; - } - - public function hasProduct() - { - return isset($this->product); - } - - public function clearProduct() - { - unset($this->product); - } - - /** - * Optional. The product to return case classifications for. - * - * Generated from protobuf field .google.cloud.support.v2beta.Product product = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Cloud\Support\V2beta\Product $var - * @return $this - */ - public function setProduct($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\Product::class); - $this->product = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php deleted file mode 100644 index 71c9b17fddd7..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCaseClassificationsResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2beta.SearchCaseClassificationsResponse - */ -class SearchCaseClassificationsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.CaseClassification case_classifications = 1; - */ - private $case_classifications; - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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\Support\V2beta\CaseClassification[] $case_classifications - * The classifications retrieved. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.CaseClassification case_classifications = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\CaseClassification> - */ - public function getCaseClassifications() - { - return $this->case_classifications; - } - - /** - * The classifications retrieved. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.CaseClassification case_classifications = 1; - * @param \Google\Cloud\Support\V2beta\CaseClassification[] $var - * @return $this - */ - public function setCaseClassifications($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\CaseClassification::class); - $this->case_classifications = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the `page_token` - * field of subsequent `caseClassifications.list` requests. If unspecified, - * there are no more results to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php deleted file mode 100644 index cfc445fa224a..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesRequest.php +++ /dev/null @@ -1,317 +0,0 @@ -google.cloud.support.v2beta.SearchCasesRequest - */ -class SearchCasesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the parent resource to search for cases under. - * - * Generated from protobuf field string parent = 4; - */ - protected $parent = ''; - /** - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - */ - protected $query = ''; - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * The name of the parent resource to search for cases under. - * @type string $query - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * @type int $page_size - * The maximum number of cases fetched with each request. The default page - * size is 10. - * @type string $page_token - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The name of the parent resource to search for cases under. - * - * Generated from protobuf field string parent = 4; - * @return string - */ - public function getParent() - { - return $this->parent; - } - - /** - * The name of the parent resource to search for cases under. - * - * Generated from protobuf field string parent = 4; - * @param string $var - * @return $this - */ - public function setParent($var) - { - GPBUtil::checkString($var, True); - $this->parent = $var; - - return $this; - } - - /** - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * An expression used to filter cases. - * Expressions use the following fields separated by `AND` and specified with - * `=`: - * - `state`: Can be `OPEN` or `CLOSED`. - * - `priority`: Can be `P0`, `P1`, `P2`, `P3`, or `P4`. You - * can specify multiple values for priority using the `OR` operator. For - * example, `priority=P1 OR priority=P2`. - * - `creator.email`: The email address of the case creator. - * To search across `displayName`, `description`, and comments, use a global - * restriction with no keyword or operator. For example, `"my search"`. - * To search only cases updated after a certain date, use `update_time` - * restricted with that particular date, time, and timezone in ISO datetime - * format. For example, `update_time>"2020-01-01T00:00:00-05:00"`. - * `update_time` only supports the greater than operator (`>`). - * If you are using the `v2` version of the API, you must specify the case - * parent in the `parent` field. If you provide an empty `query`, all cases - * under the parent resource will be returned. - * If you are using the `v2beta` version of the API, you must specify the case - * parent in the `query` field using one of the two fields below, which are - * only available for `v2beta`. The `parent` field will be ignored. - * - `organization`: An organization name in the form - * `organizations/`. - * - `project`: A project name in the form `projects/`. - * Examples: - * For `v2`: - * - `state=CLOSED` - * - `state=OPEN AND creator.email="tester\@example.com"` - * - `state=OPEN AND (priority=P0 OR priority=P1)` - * - `update_time>"2020-01-01T00:00:00-05:00"` - * For `v2beta`: - * - `organization="organizations/123456789"` - * - `project="projects/my-project-id"` - * - `project="projects/123456789"` - * - `organization="organizations/123456789" AND state=CLOSED` - * - `project="projects/my-project-id" AND creator.email="tester\@example.com"` - * - `project="projects/my-project-id" AND (priority=P0 OR priority=P1)` - * - * Generated from protobuf field string query = 1; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of cases fetched with each request. The default page - * size is 10. - * - * Generated from protobuf field int32 page_size = 2; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token identifying the page of results to return. If unspecified, the - * first page is retrieved. - * - * Generated from protobuf field string page_token = 3; - * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php deleted file mode 100644 index ee2c8f233996..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SearchCasesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.cloud.support.v2beta.SearchCasesResponse - */ -class SearchCasesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; - */ - private $cases; - /** - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * - * 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\Support\V2beta\PBCase[] $cases - * The list of cases associated with the parent after any - * filters have been applied. - * @type string $next_page_token - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\PBCase> - */ - public function getCases() - { - return $this->cases; - } - - /** - * The list of cases associated with the parent after any - * filters have been applied. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.Case cases = 1; - * @param \Google\Cloud\Support\V2beta\PBCase[] $var - * @return $this - */ - public function setCases($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\PBCase::class); - $this->cases = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. Set this in the - * `page_token` field of subsequent `cases.search` requests. If unspecified, - * there are no more results to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php deleted file mode 100644 index f499a100b720..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedRequest.php +++ /dev/null @@ -1,208 +0,0 @@ -google.cloud.support.v2beta.ShowFeedRequest - */ -class ShowFeedRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the case for which feed items should be - * listed. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. Field to order feed items by, followed by `asc` or `desc` - * postfix. The only valid field is - * `creation_time`. This list is case-insensitive, default sorting order is - * ascending, and the redundant space characters are insignificant. - * Example: `creation_time desc` - * - * Generated from protobuf field string order_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - /** - * Optional. The maximum number of feed items fetched with each request. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A token identifying the page of results to return. If - * unspecified, it retrieves the first page. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - - /** - * @param string $parent Required. The resource name of the case for which feed items should be - * listed. Please see - * {@see FeedServiceClient::caseName()} for help formatting this field. - * - * @return \Google\Cloud\Support\V2beta\ShowFeedRequest - * - * @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 resource name of the case for which feed items should be - * listed. - * @type string $order_by - * Optional. Field to order feed items by, followed by `asc` or `desc` - * postfix. The only valid field is - * `creation_time`. This list is case-insensitive, default sorting order is - * ascending, and the redundant space characters are insignificant. - * Example: `creation_time desc` - * @type int $page_size - * Optional. The maximum number of feed items fetched with each request. - * @type string $page_token - * Optional. A token identifying the page of results to return. If - * unspecified, it retrieves the first page. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\FeedService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the case for which feed items should be - * listed. - * - * 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 resource name of the case for which feed items should be - * listed. - * - * 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. Field to order feed items by, followed by `asc` or `desc` - * postfix. The only valid field is - * `creation_time`. This list is case-insensitive, default sorting order is - * ascending, and the redundant space characters are insignificant. - * Example: `creation_time desc` - * - * Generated from protobuf field string order_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. Field to order feed items by, followed by `asc` or `desc` - * postfix. The only valid field is - * `creation_time`. This list is case-insensitive, default sorting order is - * ascending, and the redundant space characters are insignificant. - * Example: `creation_time desc` - * - * Generated from protobuf field string order_by = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Optional. The maximum number of feed items fetched with each request. - * - * Generated from protobuf field int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of feed items fetched with each request. - * - * Generated from protobuf field int32 page_size = 3 [(.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 the page of results to return. If - * unspecified, it retrieves the first page. - * - * Generated from protobuf field string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A token identifying the page of results to return. If - * unspecified, it retrieves the first page. - * - * Generated from protobuf field string page_token = 4 [(.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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php deleted file mode 100644 index a8c8646a2c51..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/ShowFeedResponse.php +++ /dev/null @@ -1,109 +0,0 @@ -google.cloud.support.v2beta.ShowFeedResponse - */ -class ShowFeedResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The list of feed items associated with the given Case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.FeedItem feed_items = 1; - */ - private $feed_items; - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `ShowFeedRequests`. - * If unspecified, there are no more results to retrieve. - * - * 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\Support\V2beta\FeedItem[] $feed_items - * The list of feed items associated with the given Case. - * @type string $next_page_token - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `ShowFeedRequests`. - * If unspecified, there are no more results to retrieve. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\FeedService::initOnce(); - parent::__construct($data); - } - - /** - * The list of feed items associated with the given Case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.FeedItem feed_items = 1; - * @return RepeatedField<\Google\Cloud\Support\V2beta\FeedItem> - */ - public function getFeedItems() - { - return $this->feed_items; - } - - /** - * The list of feed items associated with the given Case. - * - * Generated from protobuf field repeated .google.cloud.support.v2beta.FeedItem feed_items = 1; - * @param \Google\Cloud\Support\V2beta\FeedItem[] $var - * @return $this - */ - public function setFeedItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Support\V2beta\FeedItem::class); - $this->feed_items = $arr; - - return $this; - } - - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `ShowFeedRequests`. - * If unspecified, there are no more results to retrieve. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * A token to retrieve the next page of results. This should be set in the - * `page_token` field of subsequent `ShowFeedRequests`. - * If unspecified, there are no more results to retrieve. - * - * 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php deleted file mode 100644 index 00735a9a48d8..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription.php +++ /dev/null @@ -1,353 +0,0 @@ -google.cloud.support.v2beta.SupportEventSubscription - */ -class SupportEventSubscription extends \Google\Protobuf\Internal\Message -{ - /** - * Identifier. The resource name of the support event subscription. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - */ - protected $name = ''; - /** - * Required. The name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * - * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $pub_sub_topic = ''; - /** - * Output only. The state of the subscription. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $failure_reason = 0; - /** - * Output only. The time at which the subscription was created. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $create_time = null; - /** - * Output only. The time at which the subscription was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $update_time = null; - /** - * Output only. The time at which the subscription was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Output only. The time at which the subscription will be purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $purge_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Identifier. The resource name of the support event subscription. - * @type string $pub_sub_topic - * Required. The name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * @type int $state - * Output only. The state of the subscription. - * @type int $failure_reason - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * @type \Google\Protobuf\Timestamp $create_time - * Output only. The time at which the subscription was created. - * @type \Google\Protobuf\Timestamp $update_time - * Output only. The time at which the subscription was last updated. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The time at which the subscription was deleted. - * @type \Google\Protobuf\Timestamp $purge_time - * Output only. The time at which the subscription will be purged. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscription::initOnce(); - parent::__construct($data); - } - - /** - * Identifier. The resource name of the support event subscription. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Identifier. The resource name of the support event subscription. - * - * 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 name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * - * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getPubSubTopic() - { - return $this->pub_sub_topic; - } - - /** - * Required. The name of the Pub/Sub topic to publish notifications to. - * Format: projects/{project}/topics/{topic} - * - * Generated from protobuf field string pub_sub_topic = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setPubSubTopic($var) - { - GPBUtil::checkString($var, True); - $this->pub_sub_topic = $var; - - return $this; - } - - /** - * Output only. The state of the subscription. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. The state of the subscription. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\SupportEventSubscription\State::class); - $this->state = $var; - - return $this; - } - - /** - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getFailureReason() - { - return $this->failure_reason; - } - - /** - * Output only. Reason why subscription is failing. State of subscription - * must be FAILING in order for this to have a value. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription.FailureReason failure_reason = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setFailureReason($var) - { - GPBUtil::checkEnum($var, \Google\Cloud\Support\V2beta\SupportEventSubscription\FailureReason::class); - $this->failure_reason = $var; - - return $this; - } - - /** - * Output only. The time at which the subscription was created. - * - * 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. The time at which the subscription was created. - * - * 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. The time at which the subscription was last updated. - * - * 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. The time at which the subscription was last updated. - * - * 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. The time at which the subscription was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getDeleteTime() - { - return $this->delete_time; - } - - public function hasDeleteTime() - { - return isset($this->delete_time); - } - - public function clearDeleteTime() - { - unset($this->delete_time); - } - - /** - * Output only. The time at which the subscription was deleted. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * Output only. The time at which the subscription will be purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getPurgeTime() - { - return $this->purge_time; - } - - public function hasPurgeTime() - { - return isset($this->purge_time); - } - - public function clearPurgeTime() - { - unset($this->purge_time); - } - - /** - * Output only. The time at which the subscription will be purged. - * - * Generated from protobuf field .google.protobuf.Timestamp purge_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setPurgeTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->purge_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php deleted file mode 100644 index de7f91e52472..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/FailureReason.php +++ /dev/null @@ -1,70 +0,0 @@ -google.cloud.support.v2beta.SupportEventSubscription.FailureReason - */ -class FailureReason -{ - /** - * Unspecified failure reason. - * - * Generated from protobuf enum FAILURE_REASON_UNSPECIFIED = 0; - */ - const FAILURE_REASON_UNSPECIFIED = 0; - /** - * The service account (i.e. - * cloud-support-apievents\@system.gserviceaccount.com) lacks the permission - * to publish to the customer's Pub/Sub topic. - * - * Generated from protobuf enum PERMISSION_DENIED = 1; - */ - const PERMISSION_DENIED = 1; - /** - * The specified Pub/Sub topic does not exist. - * - * Generated from protobuf enum TOPIC_NOT_FOUND = 2; - */ - const TOPIC_NOT_FOUND = 2; - /** - * Message failed to publish due to a system-side error. - * - * Generated from protobuf enum OTHER = 3; - */ - const OTHER = 3; - - private static $valueToName = [ - self::FAILURE_REASON_UNSPECIFIED => 'FAILURE_REASON_UNSPECIFIED', - self::PERMISSION_DENIED => 'PERMISSION_DENIED', - self::TOPIC_NOT_FOUND => 'TOPIC_NOT_FOUND', - self::OTHER => 'OTHER', - ]; - - 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php deleted file mode 100644 index e4c34e234dc3..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/SupportEventSubscription/State.php +++ /dev/null @@ -1,71 +0,0 @@ -google.cloud.support.v2beta.SupportEventSubscription.State - */ -class State -{ - /** - * Unspecified state. - * - * Generated from protobuf enum STATE_UNSPECIFIED = 0; - */ - const STATE_UNSPECIFIED = 0; - /** - * Subscription is active and working. - * - * Generated from protobuf enum WORKING = 1; - */ - const WORKING = 1; - /** - * Subscription is failing. Notifications cannot be published for some - * reason. - * - * Generated from protobuf enum FAILING = 2; - */ - const FAILING = 2; - /** - * Subscription has been deleted and is pending purge. Notifications are not - * sent for deleted subscriptions. Deleted subscriptions are purged after - * their `purge_time` has passed. - * - * Generated from protobuf enum DELETED = 3; - */ - const DELETED = 3; - - private static $valueToName = [ - self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', - self::WORKING => 'WORKING', - self::FAILING => 'FAILING', - 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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php deleted file mode 100644 index e34f8aa6e1ae..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/TextContent.php +++ /dev/null @@ -1,67 +0,0 @@ -google.cloud.support.v2beta.TextContent - */ -class TextContent extends \Google\Protobuf\Internal\Message -{ - /** - * Content in this field should be rendered and interpreted as-is. - * - * Generated from protobuf field string plain_text = 1; - */ - protected $plain_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $plain_text - * Content in this field should be rendered and interpreted as-is. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\Content::initOnce(); - parent::__construct($data); - } - - /** - * Content in this field should be rendered and interpreted as-is. - * - * Generated from protobuf field string plain_text = 1; - * @return string - */ - public function getPlainText() - { - return $this->plain_text; - } - - /** - * Content in this field should be rendered and interpreted as-is. - * - * Generated from protobuf field string plain_text = 1; - * @param string $var - * @return $this - */ - public function setPlainText($var) - { - GPBUtil::checkString($var, True); - $this->plain_text = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php deleted file mode 100644 index 82aa755ae583..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UndeleteSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,75 +0,0 @@ -google.cloud.support.v2beta.UndeleteSupportEventSubscriptionRequest - */ -class UndeleteSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. The name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_id} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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 name of the support event subscription to undelete. - * Format: - * organizations/{organization_id}/supportEventSubscriptions/{subscription_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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php deleted file mode 100644 index 00144f33d32c..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateCaseRequest.php +++ /dev/null @@ -1,167 +0,0 @@ -google.cloud.support.v2beta.UpdateCaseRequest - */ -class UpdateCaseRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The case to update. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $case = null; - /** - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Support\V2beta\PBCase $case Required. The case to update. - * @param \Google\Protobuf\FieldMask $updateMask A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * @return \Google\Cloud\Support\V2beta\UpdateCaseRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Support\V2beta\PBCase $case, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setCase($case) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Support\V2beta\PBCase $case - * Required. The case to update. - * @type \Google\Protobuf\FieldMask $update_mask - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\CaseService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The case to update. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2beta\PBCase|null - */ - public function getCase() - { - return $this->case; - } - - public function hasCase() - { - return isset($this->case); - } - - public function clearCase() - { - unset($this->case); - } - - /** - * Required. The case to update. - * - * Generated from protobuf field .google.cloud.support.v2beta.Case case = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2beta\PBCase $var - * @return $this - */ - public function setCase($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\PBCase::class); - $this->case = $var; - - return $this; - } - - /** - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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); - } - - /** - * A list of attributes of the case that should be updated. Supported values - * are `priority`, `display_name`, and `subscriber_email_addresses`. If no - * fields are specified, all supported fields are updated. - * Be careful - if you do not provide a field mask, then you might - * accidentally clear some fields. For example, if you leave the field mask - * empty and do not provide a value for `subscriber_email_addresses`, then - * `subscriber_email_addresses` is updated to empty. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - * @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/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php b/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php deleted file mode 100644 index 25630369d25c..000000000000 --- a/owl-bot-staging/Support/v2beta/proto/src/Google/Cloud/Support/V2beta/UpdateSupportEventSubscriptionRequest.php +++ /dev/null @@ -1,146 +0,0 @@ -google.cloud.support.v2beta.UpdateSupportEventSubscriptionRequest - */ -class UpdateSupportEventSubscriptionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $support_event_subscription = null; - /** - * Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $update_mask = null; - - /** - * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * @param \Google\Protobuf\FieldMask $updateMask Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * @return \Google\Cloud\Support\V2beta\UpdateSupportEventSubscriptionRequest - * - * @experimental - */ - public static function build(\Google\Cloud\Support\V2beta\SupportEventSubscription $supportEventSubscription, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSupportEventSubscription($supportEventSubscription) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Cloud\Support\V2beta\SupportEventSubscription $support_event_subscription - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * @type \Google\Protobuf\FieldMask $update_mask - * Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Cloud\Support\V2Beta\SupportEventSubscriptionService::initOnce(); - parent::__construct($data); - } - - /** - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Cloud\Support\V2beta\SupportEventSubscription|null - */ - public function getSupportEventSubscription() - { - return $this->support_event_subscription; - } - - public function hasSupportEventSubscription() - { - return isset($this->support_event_subscription); - } - - public function clearSupportEventSubscription() - { - unset($this->support_event_subscription); - } - - /** - * Required. The support event subscription to update. - * The `name` field is used to identify the configuration to update. - * - * Generated from protobuf field .google.cloud.support.v2beta.SupportEventSubscription support_event_subscription = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Cloud\Support\V2beta\SupportEventSubscription $var - * @return $this - */ - public function setSupportEventSubscription($var) - { - GPBUtil::checkMessage($var, \Google\Cloud\Support\V2beta\SupportEventSubscription::class); - $this->support_event_subscription = $var; - - return $this; - } - - /** - * Optional. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * 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. The list of fields to update. The only supported value is - * pub_sub_topic. - * - * 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/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php deleted file mode 100644 index 2e1f084ac7a8..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/get_attachment.php +++ /dev/null @@ -1,75 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Attachment $response */ - $response = $caseAttachmentServiceClient->getAttachment($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 = CaseAttachmentServiceClient::attachmentName( - '[ORGANIZATION]', - '[CASE]', - '[ATTACHMENT_ID]' - ); - - get_attachment_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_CaseAttachmentService_GetAttachment_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php deleted file mode 100644 index f4eae9af7556..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseAttachmentServiceClient/list_attachments.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseAttachmentServiceClient->listAttachments($request); - - /** @var Attachment $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 = CaseAttachmentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - list_attachments_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_CaseAttachmentService_ListAttachments_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php deleted file mode 100644 index 872794606f3c..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/close_case.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->closeCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - close_case_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_CaseService_CloseCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php deleted file mode 100644 index e6b2fb4d5f8d..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/create_case.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent) - ->setCase($case); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->createCase($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 -{ - $formattedParent = CaseServiceClient::projectName('[PROJECT]'); - - create_case_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_CaseService_CreateCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php deleted file mode 100644 index 7e040cb9b05e..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/escalate_case.php +++ /dev/null @@ -1,77 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->escalateCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - escalate_case_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_CaseService_EscalateCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php deleted file mode 100644 index 46c7e7f725bc..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/get_case.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->getCase($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 = CaseServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - get_case_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_CaseService_GetCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php deleted file mode 100644 index c8001c3a45bc..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/list_cases.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseServiceClient->listCases($request); - - /** @var PBCase $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 = CaseServiceClient::projectName('[PROJECT]'); - - list_cases_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_CaseService_ListCases_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php deleted file mode 100644 index d22043d60a9a..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_case_classifications.php +++ /dev/null @@ -1,71 +0,0 @@ - "`. For example, - * `"Technical Issue > Compute > Compute Engine"`. - * - * Classification IDs returned by this endpoint are valid for at least six - * months. When a classification is deactivated, this endpoint immediately - * stops returning it. After six months, `case.create` requests using the - * classification will fail. - * - * 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 search_case_classifications_sample(): void -{ - // Create a client. - $caseServiceClient = new CaseServiceClient(); - - // Prepare the request message. - $request = new SearchCaseClassificationsRequest(); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $caseServiceClient->searchCaseClassifications($request); - - /** @var CaseClassification $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 cloudsupport_v2beta_generated_CaseService_SearchCaseClassifications_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php deleted file mode 100644 index 57e95d86f279..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/search_cases.php +++ /dev/null @@ -1,62 +0,0 @@ -searchCases($request); - - /** @var PBCase $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 cloudsupport_v2beta_generated_CaseService_SearchCases_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php deleted file mode 100644 index 5d6da5dda2bc..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CaseServiceClient/update_case.php +++ /dev/null @@ -1,59 +0,0 @@ -setCase($case); - - // Call the API and handle any network failures. - try { - /** @var PBCase $response */ - $response = $caseServiceClient->updateCase($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END cloudsupport_v2beta_generated_CaseService_UpdateCase_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php deleted file mode 100644 index a4c6bc8eaf58..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/create_comment.php +++ /dev/null @@ -1,75 +0,0 @@ -setParent($formattedParent) - ->setComment($comment); - - // Call the API and handle any network failures. - try { - /** @var Comment $response */ - $response = $commentServiceClient->createComment($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 -{ - $formattedParent = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - create_comment_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_CommentService_CreateComment_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php deleted file mode 100644 index 05fa2f51eaed..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/get_comment.php +++ /dev/null @@ -1,71 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Comment $response */ - $response = $commentServiceClient->getComment($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 = CommentServiceClient::commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); - - get_comment_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_CommentService_GetComment_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php b/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php deleted file mode 100644 index 2549f5508593..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/CommentServiceClient/list_comments.php +++ /dev/null @@ -1,76 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $commentServiceClient->listComments($request); - - /** @var Comment $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 = CommentServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - list_comments_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_CommentService_ListComments_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php b/owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php deleted file mode 100644 index 98c127e2a626..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/FeedServiceClient/show_feed.php +++ /dev/null @@ -1,78 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $feedServiceClient->showFeed($request); - - /** @var FeedItem $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 = FeedServiceClient::caseName('[ORGANIZATION]', '[CASE]'); - - show_feed_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_FeedService_ShowFeed_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php deleted file mode 100644 index 08c3cfecd28b..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php +++ /dev/null @@ -1,80 +0,0 @@ -setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->createSupportEventSubscription($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 -{ - $formattedParent = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); - $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; - - create_support_event_subscription_sample($formattedParent, $supportEventSubscriptionPubSubTopic); -} -// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_CreateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php deleted file mode 100644 index 2b80c814cb7c..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->deleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - delete_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_DeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php deleted file mode 100644 index aa5b9e21636f..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->getSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - get_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_GetSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php deleted file mode 100644 index 1c367aca9d11..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php +++ /dev/null @@ -1,77 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $supportEventSubscriptionServiceClient->listSupportEventSubscriptions($request); - - /** @var SupportEventSubscription $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 = SupportEventSubscriptionServiceClient::organizationName('[ORGANIZATION]'); - - list_support_event_subscriptions_sample($formattedParent); -} -// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_ListSupportEventSubscriptions_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php deleted file mode 100644 index 2177e3aecaa9..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->undeleteSupportEventSubscription($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 = SupportEventSubscriptionServiceClient::supportEventSubscriptionName( - '[ORGANIZATION]', - '[SUPPORT_EVENT_SUBSCRIPTION]' - ); - - undelete_support_event_subscription_sample($formattedName); -} -// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_UndeleteSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php b/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php deleted file mode 100644 index 690560ac45b7..000000000000 --- a/owl-bot-staging/Support/v2beta/samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php +++ /dev/null @@ -1,74 +0,0 @@ -setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new UpdateSupportEventSubscriptionRequest()) - ->setSupportEventSubscription($supportEventSubscription); - - // Call the API and handle any network failures. - try { - /** @var SupportEventSubscription $response */ - $response = $supportEventSubscriptionServiceClient->updateSupportEventSubscription($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 -{ - $supportEventSubscriptionPubSubTopic = '[PUB_SUB_TOPIC]'; - - update_support_event_subscription_sample($supportEventSubscriptionPubSubTopic); -} -// [END cloudsupport_v2beta_generated_SupportEventSubscriptionService_UpdateSupportEventSubscription_sync] diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php deleted file mode 100644 index d08be6f860e0..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseAttachmentServiceClient.php +++ /dev/null @@ -1,403 +0,0 @@ - getAttachmentAsync(GetAttachmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listAttachmentsAsync(ListAttachmentsRequest $request, array $optionalArgs = []) - */ -final class CaseAttachmentServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2beta.CaseAttachmentService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/case_attachment_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/case_attachment_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/case_attachment_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/case_attachment_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a attachment - * resource. - * - * @param string $organization - * @param string $case - * @param string $attachmentId - * - * @return string The formatted attachment resource. - * - * @experimental - */ - public static function attachmentName(string $organization, string $case, string $attachmentId): string - { - return self::getPathTemplate('attachment')->render([ - 'organization' => $organization, - 'case' => $case, - 'attachment_id' => $attachmentId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - * - * @experimental - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - * - * @experimental - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case_attachment_id resource. - * - * @param string $organization - * @param string $case - * @param string $attachmentId - * - * @return string The formatted organization_case_attachment_id resource. - * - * @experimental - */ - public static function organizationCaseAttachmentIdName(string $organization, string $case, string $attachmentId): string - { - return self::getPathTemplate('organizationCaseAttachmentId')->render([ - 'organization' => $organization, - 'case' => $case, - 'attachment_id' => $attachmentId, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - * - * @experimental - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_case_attachment_id resource. - * - * @param string $project - * @param string $case - * @param string $attachmentId - * - * @return string The formatted project_case_attachment_id resource. - * - * @experimental - */ - public static function projectCaseAttachmentIdName(string $project, string $case, string $attachmentId): string - { - return self::getPathTemplate('projectCaseAttachmentId')->render([ - 'project' => $project, - 'case' => $case, - 'attachment_id' => $attachmentId, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - attachment: organizations/{organization}/cases/{case}/attachments/{attachment_id} - * - case: organizations/{organization}/cases/{case} - * - organizationCase: organizations/{organization}/cases/{case} - * - organizationCaseAttachmentId: organizations/{organization}/cases/{case}/attachments/{attachment_id} - * - projectCase: projects/{project}/cases/{case} - * - projectCaseAttachmentId: projects/{project}/cases/{case}/attachments/{attachment_id} - * - * 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. - * - * @experimental - */ - 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 'cloudsupport.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\Support\V2beta\CaseAttachmentServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CaseAttachmentServiceClient(['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 - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($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); - } - - /** - * Retrieve an attachment. - * - * The async variant is {@see CaseAttachmentServiceClient::getAttachmentAsync()} . - * - * @example samples/V2beta/CaseAttachmentServiceClient/get_attachment.php - * - * @param GetAttachmentRequest $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 Attachment - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getAttachment(GetAttachmentRequest $request, array $callOptions = []): Attachment - { - return $this->startApiCall('GetAttachment', $request, $callOptions)->wait(); - } - - /** - * List all the attachments associated with a support case. - * - * The async variant is {@see CaseAttachmentServiceClient::listAttachmentsAsync()} - * . - * - * @example samples/V2beta/CaseAttachmentServiceClient/list_attachments.php - * - * @param ListAttachmentsRequest $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. - * - * @experimental - */ - public function listAttachments(ListAttachmentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListAttachments', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php deleted file mode 100644 index 1ee28a54ab51..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CaseServiceClient.php +++ /dev/null @@ -1,576 +0,0 @@ - closeCaseAsync(CloseCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface createCaseAsync(CreateCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface escalateCaseAsync(EscalateCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCaseAsync(GetCaseRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCasesAsync(ListCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchCaseClassificationsAsync(SearchCaseClassificationsRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchCasesAsync(SearchCasesRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateCaseAsync(UpdateCaseRequest $request, array $optionalArgs = []) - */ -final class CaseServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2beta.CaseService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/case_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/case_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/case_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/case_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - * - * @experimental - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - * - * @experimental - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - * - * @experimental - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project - * resource. - * - * @param string $project - * - * @return string The formatted project resource. - * - * @experimental - */ - public static function projectName(string $project): string - { - return self::getPathTemplate('project')->render([ - 'project' => $project, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - * - * @experimental - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - organization: organizations/{organization} - * - organizationCase: organizations/{organization}/cases/{case} - * - project: projects/{project} - * - projectCase: projects/{project}/cases/{case} - * - * 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. - * - * @experimental - */ - 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 'cloudsupport.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\Support\V2beta\CaseServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CaseServiceClient(['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 - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($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); - } - - /** - * Close a case. - * - * The async variant is {@see CaseServiceClient::closeCaseAsync()} . - * - * @example samples/V2beta/CaseServiceClient/close_case.php - * - * @param CloseCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function closeCase(CloseCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('CloseCase', $request, $callOptions)->wait(); - } - - /** - * Create a new case and associate it with a parent. - * - * It must have the following fields set: `display_name`, `description`, - * `classification`, and `priority`. If you're just testing the API and don't - * want to route your case to an agent, set `testCase=true`. - * - * The async variant is {@see CaseServiceClient::createCaseAsync()} . - * - * @example samples/V2beta/CaseServiceClient/create_case.php - * - * @param CreateCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function createCase(CreateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('CreateCase', $request, $callOptions)->wait(); - } - - /** - * Escalate a case, starting the Google Cloud Support escalation management - * process. - * - * This operation is only available for some support services. Go to - * https://cloud.google.com/support and look for 'Technical support - * escalations' in the feature list to find out which ones let you - * do that. - * - * The async variant is {@see CaseServiceClient::escalateCaseAsync()} . - * - * @example samples/V2beta/CaseServiceClient/escalate_case.php - * - * @param EscalateCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function escalateCase(EscalateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('EscalateCase', $request, $callOptions)->wait(); - } - - /** - * Retrieve a case. - * - * The async variant is {@see CaseServiceClient::getCaseAsync()} . - * - * @example samples/V2beta/CaseServiceClient/get_case.php - * - * @param GetCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getCase(GetCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('GetCase', $request, $callOptions)->wait(); - } - - /** - * Retrieve all cases under a parent, but not its children. - * - * For example, listing cases under an organization only returns the cases - * that are directly parented by that organization. To retrieve cases - * under an organization and its projects, use `cases.search`. - * - * The async variant is {@see CaseServiceClient::listCasesAsync()} . - * - * @example samples/V2beta/CaseServiceClient/list_cases.php - * - * @param ListCasesRequest $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. - * - * @experimental - */ - public function listCases(ListCasesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListCases', $request, $callOptions); - } - - /** - * Retrieve valid classifications to use when creating a support case. - * - * Classifications are hierarchical. Each classification is a string - * containing all levels of the hierarchy separated by `" > "`. For example, - * `"Technical Issue > Compute > Compute Engine"`. - * - * Classification IDs returned by this endpoint are valid for at least six - * months. When a classification is deactivated, this endpoint immediately - * stops returning it. After six months, `case.create` requests using the - * classification will fail. - * - * The async variant is {@see CaseServiceClient::searchCaseClassificationsAsync()} - * . - * - * @example samples/V2beta/CaseServiceClient/search_case_classifications.php - * - * @param SearchCaseClassificationsRequest $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. - * - * @experimental - */ - public function searchCaseClassifications(SearchCaseClassificationsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchCaseClassifications', $request, $callOptions); - } - - /** - * Search for cases using a query. - * - * The async variant is {@see CaseServiceClient::searchCasesAsync()} . - * - * @example samples/V2beta/CaseServiceClient/search_cases.php - * - * @param SearchCasesRequest $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. - * - * @experimental - */ - public function searchCases(SearchCasesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchCases', $request, $callOptions); - } - - /** - * Update a case. Only some fields can be updated. - * - * The async variant is {@see CaseServiceClient::updateCaseAsync()} . - * - * @example samples/V2beta/CaseServiceClient/update_case.php - * - * @param UpdateCaseRequest $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 PBCase - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function updateCase(UpdateCaseRequest $request, array $callOptions = []): PBCase - { - return $this->startApiCall('UpdateCase', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php deleted file mode 100644 index 31930ea0515d..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/Client/CommentServiceClient.php +++ /dev/null @@ -1,434 +0,0 @@ - createCommentAsync(CreateCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getCommentAsync(GetCommentRequest $request, array $optionalArgs = []) - * @method PromiseInterface listCommentsAsync(ListCommentsRequest $request, array $optionalArgs = []) - */ -final class CommentServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2beta.CommentService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/comment_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/comment_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/comment_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/comment_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - * - * @experimental - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a comment - * resource. - * - * @param string $organization - * @param string $case - * @param string $comment - * - * @return string The formatted comment resource. - * - * @experimental - */ - public static function commentName(string $organization, string $case, string $comment): string - { - return self::getPathTemplate('comment')->render([ - 'organization' => $organization, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - * - * @experimental - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case_comment resource. - * - * @param string $organization - * @param string $case - * @param string $comment - * - * @return string The formatted organization_case_comment resource. - * - * @experimental - */ - public static function organizationCaseCommentName(string $organization, string $case, string $comment): string - { - return self::getPathTemplate('organizationCaseComment')->render([ - 'organization' => $organization, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - * - * @experimental - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * project_case_comment resource. - * - * @param string $project - * @param string $case - * @param string $comment - * - * @return string The formatted project_case_comment resource. - * - * @experimental - */ - public static function projectCaseCommentName(string $project, string $case, string $comment): string - { - return self::getPathTemplate('projectCaseComment')->render([ - 'project' => $project, - 'case' => $case, - 'comment' => $comment, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - comment: organizations/{organization}/cases/{case}/comments/{comment} - * - organizationCase: organizations/{organization}/cases/{case} - * - organizationCaseComment: organizations/{organization}/cases/{case}/comments/{comment} - * - projectCase: projects/{project}/cases/{case} - * - projectCaseComment: projects/{project}/cases/{case}/comments/{comment} - * - * 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. - * - * @experimental - */ - 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 'cloudsupport.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\Support\V2beta\CommentServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new CommentServiceClient(['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 - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($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); - } - - /** - * Add a new comment to a case. - * - * The comment must have the following fields set: `body`. - * - * The async variant is {@see CommentServiceClient::createCommentAsync()} . - * - * @example samples/V2beta/CommentServiceClient/create_comment.php - * - * @param CreateCommentRequest $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 Comment - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function createComment(CreateCommentRequest $request, array $callOptions = []): Comment - { - return $this->startApiCall('CreateComment', $request, $callOptions)->wait(); - } - - /** - * Retrieve a comment. - * - * The async variant is {@see CommentServiceClient::getCommentAsync()} . - * - * @example samples/V2beta/CommentServiceClient/get_comment.php - * - * @param GetCommentRequest $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 Comment - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getComment(GetCommentRequest $request, array $callOptions = []): Comment - { - return $this->startApiCall('GetComment', $request, $callOptions)->wait(); - } - - /** - * List all the comments associated with a case. - * - * The async variant is {@see CommentServiceClient::listCommentsAsync()} . - * - * @example samples/V2beta/CommentServiceClient/list_comments.php - * - * @param ListCommentsRequest $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. - * - * @experimental - */ - public function listComments(ListCommentsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListComments', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php deleted file mode 100644 index bd9204cb0a37..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/Client/FeedServiceClient.php +++ /dev/null @@ -1,306 +0,0 @@ - showFeedAsync(ShowFeedRequest $request, array $optionalArgs = []) - */ -final class FeedServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2beta.FeedService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/feed_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/feed_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/feed_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/feed_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a case - * resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted case resource. - * - * @experimental - */ - public static function caseName(string $organization, string $case): string - { - return self::getPathTemplate('case')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * organization_case resource. - * - * @param string $organization - * @param string $case - * - * @return string The formatted organization_case resource. - * - * @experimental - */ - public static function organizationCaseName(string $organization, string $case): string - { - return self::getPathTemplate('organizationCase')->render([ - 'organization' => $organization, - 'case' => $case, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a project_case - * resource. - * - * @param string $project - * @param string $case - * - * @return string The formatted project_case resource. - * - * @experimental - */ - public static function projectCaseName(string $project, string $case): string - { - return self::getPathTemplate('projectCase')->render([ - 'project' => $project, - 'case' => $case, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - case: organizations/{organization}/cases/{case} - * - organizationCase: organizations/{organization}/cases/{case} - * - projectCase: projects/{project}/cases/{case} - * - * 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. - * - * @experimental - */ - 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 'cloudsupport.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\Support\V2beta\FeedServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new FeedServiceClient(['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 - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($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); - } - - /** - * Show items in the feed of this case, including case emails, - * attachments, and comments. - * - * The async variant is {@see FeedServiceClient::showFeedAsync()} . - * - * @example samples/V2beta/FeedServiceClient/show_feed.php - * - * @param ShowFeedRequest $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. - * - * @experimental - */ - public function showFeed(ShowFeedRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ShowFeed', $request, $callOptions); - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php b/owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php deleted file mode 100644 index 02add02328c2..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/Client/SupportEventSubscriptionServiceClient.php +++ /dev/null @@ -1,506 +0,0 @@ - createSupportEventSubscriptionAsync(CreateSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSupportEventSubscriptionAsync(DeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface expungeSupportEventSubscriptionAsync(ExpungeSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSupportEventSubscriptionAsync(GetSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSupportEventSubscriptionsAsync(ListSupportEventSubscriptionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface undeleteSupportEventSubscriptionAsync(UndeleteSupportEventSubscriptionRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSupportEventSubscriptionAsync(UpdateSupportEventSubscriptionRequest $request, array $optionalArgs = []) - */ -final class SupportEventSubscriptionServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.cloud.support.v2beta.SupportEventSubscriptionService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'cloudsupport.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'cloudsupport.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 static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/support_event_subscription_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/support_event_subscription_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a organization - * resource. - * - * @param string $organization - * - * @return string The formatted organization resource. - * - * @experimental - */ - public static function organizationName(string $organization): string - { - return self::getPathTemplate('organization')->render([ - 'organization' => $organization, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * support_event_subscription resource. - * - * @param string $organization - * @param string $supportEventSubscription - * - * @return string The formatted support_event_subscription resource. - * - * @experimental - */ - public static function supportEventSubscriptionName(string $organization, string $supportEventSubscription): string - { - return self::getPathTemplate('supportEventSubscription')->render([ - 'organization' => $organization, - 'support_event_subscription' => $supportEventSubscription, - ]); - } - - /** - * Parses a formatted name string and returns an associative array of the components in the name. - * The following name formats are supported: - * Template: Pattern - * - organization: organizations/{organization} - * - supportEventSubscription: organizations/{organization}/supportEventSubscriptions/{support_event_subscription} - * - * 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. - * - * @experimental - */ - 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 'cloudsupport.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\Support\V2beta\SupportEventSubscriptionServiceClient; - * $creds = new ServiceAccountCredentials($scopes, $json); - * $options = new SupportEventSubscriptionServiceClient(['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 - * - * @experimental - */ - public function __construct(array|ClientOptions $options = []) - { - $clientOptions = $this->buildClientOptions($options); - $this->setClientOptions($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); - } - - /** - * Creates a support event subscription for an organization. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::createSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/create_support_event_subscription.php - * - * @param CreateSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function createSupportEventSubscription(CreateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('CreateSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Soft deletes a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::deleteSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/delete_support_event_subscription.php - * - * @param DeleteSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function deleteSupportEventSubscription(DeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('DeleteSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Expunges a support event subscription. - * - * EXAMPLES: - * - * cURL: - * - * ```shell - * support_event_subscription="organizations/123456789/supportEventSubscriptions/abcdef123456" - * curl \ - * --request POST \ - * --header "Authorization: Bearer $(gcloud auth print-access-token)" \ - * "https://cloudsupport.googleapis.com/v2beta/$support_event_subscription:expunge" - * ``` - * - * Python: - * - * ```python - * import googleapiclient.discovery - * - * api_version = "v2beta" - * supportApiService = googleapiclient.discovery.build( - * serviceName="cloudsupport", - * version=api_version, - * discoveryServiceUrl=f"https://cloudsupport.googleapis.com/$discovery/rest?version={api_version}", - * ) - * - * request = supportApiService.supportEventSubscriptions().expunge( - * name="organizations/123456789/supportEventSubscriptions/abcdef123456" - * ) - * print(request.execute()) - * ``` - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::expungeSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/expunge_support_event_subscription.php - * - * @param ExpungeSupportEventSubscriptionRequest $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. - * } - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function expungeSupportEventSubscription(ExpungeSupportEventSubscriptionRequest $request, array $callOptions = []): void - { - $this->startApiCall('ExpungeSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Gets a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::getSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/get_support_event_subscription.php - * - * @param GetSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function getSupportEventSubscription(GetSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('GetSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Lists support event subscriptions for an organization. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::listSupportEventSubscriptionsAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/list_support_event_subscriptions.php - * - * @param ListSupportEventSubscriptionsRequest $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. - * - * @experimental - */ - public function listSupportEventSubscriptions(ListSupportEventSubscriptionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSupportEventSubscriptions', $request, $callOptions); - } - - /** - * Undeletes a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::undeleteSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/undelete_support_event_subscription.php - * - * @param UndeleteSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function undeleteSupportEventSubscription(UndeleteSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('UndeleteSupportEventSubscription', $request, $callOptions)->wait(); - } - - /** - * Updates a support event subscription. - * - * The async variant is - * {@see SupportEventSubscriptionServiceClient::updateSupportEventSubscriptionAsync()} - * . - * - * @example samples/V2beta/SupportEventSubscriptionServiceClient/update_support_event_subscription.php - * - * @param UpdateSupportEventSubscriptionRequest $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 SupportEventSubscription - * - * @throws ApiException Thrown if the API call fails. - * - * @experimental - */ - public function updateSupportEventSubscription(UpdateSupportEventSubscriptionRequest $request, array $callOptions = []): SupportEventSubscription - { - return $this->startApiCall('UpdateSupportEventSubscription', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json b/owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json deleted file mode 100644 index 5390be3dd93c..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/gapic_metadata.json +++ /dev/null @@ -1,159 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.cloud.support.v2beta", - "libraryPackage": "Google\\Cloud\\Support\\V2beta", - "services": { - "CaseAttachmentService": { - "clients": { - "grpc": { - "libraryClient": "CaseAttachmentServiceGapicClient", - "rpcs": { - "GetAttachment": { - "methods": [ - "getAttachment" - ] - }, - "ListAttachments": { - "methods": [ - "listAttachments" - ] - } - } - } - } - }, - "CaseService": { - "clients": { - "grpc": { - "libraryClient": "CaseServiceGapicClient", - "rpcs": { - "CloseCase": { - "methods": [ - "closeCase" - ] - }, - "CreateCase": { - "methods": [ - "createCase" - ] - }, - "EscalateCase": { - "methods": [ - "escalateCase" - ] - }, - "GetCase": { - "methods": [ - "getCase" - ] - }, - "ListCases": { - "methods": [ - "listCases" - ] - }, - "SearchCaseClassifications": { - "methods": [ - "searchCaseClassifications" - ] - }, - "SearchCases": { - "methods": [ - "searchCases" - ] - }, - "UpdateCase": { - "methods": [ - "updateCase" - ] - } - } - } - } - }, - "CommentService": { - "clients": { - "grpc": { - "libraryClient": "CommentServiceGapicClient", - "rpcs": { - "CreateComment": { - "methods": [ - "createComment" - ] - }, - "GetComment": { - "methods": [ - "getComment" - ] - }, - "ListComments": { - "methods": [ - "listComments" - ] - } - } - } - } - }, - "FeedService": { - "clients": { - "grpc": { - "libraryClient": "FeedServiceGapicClient", - "rpcs": { - "ShowFeed": { - "methods": [ - "showFeed" - ] - } - } - } - } - }, - "SupportEventSubscriptionService": { - "clients": { - "grpc": { - "libraryClient": "SupportEventSubscriptionServiceGapicClient", - "rpcs": { - "CreateSupportEventSubscription": { - "methods": [ - "createSupportEventSubscription" - ] - }, - "DeleteSupportEventSubscription": { - "methods": [ - "deleteSupportEventSubscription" - ] - }, - "ExpungeSupportEventSubscription": { - "methods": [ - "expungeSupportEventSubscription" - ] - }, - "GetSupportEventSubscription": { - "methods": [ - "getSupportEventSubscription" - ] - }, - "ListSupportEventSubscriptions": { - "methods": [ - "listSupportEventSubscriptions" - ] - }, - "UndeleteSupportEventSubscription": { - "methods": [ - "undeleteSupportEventSubscription" - ] - }, - "UpdateSupportEventSubscription": { - "methods": [ - "updateSupportEventSubscription" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json deleted file mode 100644 index f19639a4ac33..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_client_config.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2beta.CaseAttachmentService": { - "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": { - "GetAttachment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListAttachments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php deleted file mode 100644 index 287ae1c56302..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_descriptor_config.php +++ /dev/null @@ -1,68 +0,0 @@ - [ - 'google.cloud.support.v2beta.CaseAttachmentService' => [ - 'GetAttachment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\Attachment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListAttachments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getAttachments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\ListAttachmentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'attachment' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', - 'case' => 'organizations/{organization}/cases/{case}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'organizationCaseAttachmentId' => 'organizations/{organization}/cases/{case}/attachments/{attachment_id}', - 'projectCase' => 'projects/{project}/cases/{case}', - 'projectCaseAttachmentId' => 'projects/{project}/cases/{case}/attachments/{attachment_id}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php deleted file mode 100644 index 6622e38fed04..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_attachment_service_rest_client_config.php +++ /dev/null @@ -1,57 +0,0 @@ - [ - 'google.cloud.support.v2beta.CaseAttachmentService' => [ - 'GetAttachment' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=*/*/cases/*/attachments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListAttachments' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}/attachments', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}/attachments', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json deleted file mode 100644 index 110f290f14da..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_client_config.json +++ /dev/null @@ -1,84 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2beta.CaseService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CloseCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "CreateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "EscalateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetCase": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchCaseClassifications": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchCases": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateCase": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php deleted file mode 100644 index e197c704af4b..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_descriptor_config.php +++ /dev/null @@ -1,148 +0,0 @@ - [ - 'google.cloud.support.v2beta.CaseService' => [ - 'CloseCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'EscalateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListCases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCases', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\ListCasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'SearchCaseClassifications' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCaseClassifications', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SearchCaseClassificationsResponse', - ], - 'SearchCases' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getCases', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SearchCasesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCase' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\PBCase', - 'headerParams' => [ - [ - 'keyName' => 'case.name', - 'fieldAccessors' => [ - 'getCase', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'organization' => 'organizations/{organization}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'project' => 'projects/{project}', - 'projectCase' => 'projects/{project}/cases/{case}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php deleted file mode 100644 index 14753e7f357c..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/case_service_rest_client_config.php +++ /dev/null @@ -1,161 +0,0 @@ - [ - 'google.cloud.support.v2beta.CaseService' => [ - 'CloseCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=projects/*/cases/*}:close', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=organizations/*/cases/*}:close', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{parent=projects/*}/cases', - 'body' => 'case', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{parent=organizations/*}/cases', - 'body' => 'case', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'EscalateCase' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=projects/*/cases/*}:escalate', - 'body' => '*', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=organizations/*/cases/*}:escalate', - 'body' => '*', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetCase' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=projects/*/cases/*}', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=organizations/*/cases/*}', - ], - ], - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListCases' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=projects/*}/cases', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=organizations/*}/cases', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'SearchCaseClassifications' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/caseClassifications:search', - ], - 'SearchCases' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=projects/*}/cases:search', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=organizations/*}/cases:search', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UpdateCase' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2beta/{case.name=projects/*/cases/*}', - 'body' => 'case', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v2beta/{case.name=organizations/*/cases/*}', - 'body' => 'case', - ], - ], - 'placeholders' => [ - 'case.name' => [ - 'getters' => [ - 'getCase', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json deleted file mode 100644 index a12278e1bc21..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_client_config.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2beta.CommentService": { - "retry_codes": { - "no_retry_codes": [], - "retry_policy_1_codes": [ - "UNAVAILABLE" - ], - "no_retry_1_codes": [] - }, - "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 - }, - "no_retry_1_params": { - "initial_retry_delay_millis": 0, - "retry_delay_multiplier": 0.0, - "max_retry_delay_millis": 0, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 60000 - } - }, - "methods": { - "CreateComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_1_codes", - "retry_params_name": "no_retry_1_params" - }, - "GetComment": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListComments": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php deleted file mode 100644 index 615a3a58f6b9..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_descriptor_config.php +++ /dev/null @@ -1,80 +0,0 @@ - [ - 'google.cloud.support.v2beta.CommentService' => [ - 'CreateComment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\Comment', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'GetComment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\Comment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListComments' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getComments', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\ListCommentsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'comment' => 'organizations/{organization}/cases/{case}/comments/{comment}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'organizationCaseComment' => 'organizations/{organization}/cases/{case}/comments/{comment}', - 'projectCase' => 'projects/{project}/cases/{case}', - 'projectCaseComment' => 'projects/{project}/cases/{case}/comments/{comment}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php deleted file mode 100644 index 29cc3af0ddb0..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/comment_service_rest_client_config.php +++ /dev/null @@ -1,76 +0,0 @@ - [ - 'google.cloud.support.v2beta.CommentService' => [ - 'CreateComment' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}/comments', - 'body' => 'comment', - 'additionalBindings' => [ - [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}/comments', - 'body' => 'comment', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'GetComment' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=*/*/cases/*/comments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListComments' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}/comments', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}/comments', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json deleted file mode 100644 index 04b964759795..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_client_config.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2beta.FeedService": { - "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": { - "ShowFeed": { - "timeout_millis": 60000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php deleted file mode 100644 index d71f2a17c867..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_descriptor_config.php +++ /dev/null @@ -1,53 +0,0 @@ - [ - 'google.cloud.support.v2beta.FeedService' => [ - 'ShowFeed' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getFeedItems', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\ShowFeedResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'case' => 'organizations/{organization}/cases/{case}', - 'organizationCase' => 'organizations/{organization}/cases/{case}', - 'projectCase' => 'projects/{project}/cases/{case}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php deleted file mode 100644 index e5d5d3336a27..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/feed_service_rest_client_config.php +++ /dev/null @@ -1,46 +0,0 @@ - [ - 'google.cloud.support.v2beta.FeedService' => [ - 'ShowFeed' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=projects/*/cases/*}:showFeed', - 'additionalBindings' => [ - [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=organizations/*/cases/*}:showFeed', - ], - ], - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json deleted file mode 100644 index 619d72fecb7f..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_client_config.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "interfaces": { - "google.cloud.support.v2beta.SupportEventSubscriptionService": { - "retry_codes": { - "no_retry_codes": [] - }, - "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 - } - }, - "methods": { - "CreateSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "DeleteSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ExpungeSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "GetSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "ListSupportEventSubscriptions": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UndeleteSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - }, - "UpdateSupportEventSubscription": { - "timeout_millis": 60000, - "retry_codes_name": "no_retry_codes", - "retry_params_name": "no_retry_params" - } - } - } - } -} diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php deleted file mode 100644 index bd1cf86bccc1..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_descriptor_config.php +++ /dev/null @@ -1,125 +0,0 @@ - [ - 'google.cloud.support.v2beta.SupportEventSubscriptionService' => [ - 'CreateSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ExpungeSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListSupportEventSubscriptions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSupportEventSubscriptions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\ListSupportEventSubscriptionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'UndeleteSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSupportEventSubscription' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Cloud\Support\V2beta\SupportEventSubscription', - 'headerParams' => [ - [ - 'keyName' => 'support_event_subscription.name', - 'fieldAccessors' => [ - 'getSupportEventSubscription', - 'getName', - ], - ], - ], - ], - 'templateMap' => [ - 'organization' => 'organizations/{organization}', - 'supportEventSubscription' => 'organizations/{organization}/supportEventSubscriptions/{support_event_subscription}', - ], - ], - ], -]; diff --git a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php b/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php deleted file mode 100644 index 23433e486f8e..000000000000 --- a/owl-bot-staging/Support/v2beta/src/V2beta/resources/support_event_subscription_service_rest_client_config.php +++ /dev/null @@ -1,111 +0,0 @@ - [ - 'google.cloud.support.v2beta.SupportEventSubscriptionService' => [ - 'CreateSupportEventSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{parent=organizations/*}/supportEventSubscriptions', - 'body' => 'support_event_subscription', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'DeleteSupportEventSubscription' => [ - 'method' => 'delete', - 'uriTemplate' => '/v2beta/{name=organizations/*/supportEventSubscriptions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ExpungeSupportEventSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=organizations/*/supportEventSubscriptions/*}:expunge', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSupportEventSubscription' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{name=organizations/*/supportEventSubscriptions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListSupportEventSubscriptions' => [ - 'method' => 'get', - 'uriTemplate' => '/v2beta/{parent=organizations/*}/supportEventSubscriptions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'UndeleteSupportEventSubscription' => [ - 'method' => 'post', - 'uriTemplate' => '/v2beta/{name=organizations/*/supportEventSubscriptions/*}:undelete', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'UpdateSupportEventSubscription' => [ - 'method' => 'patch', - 'uriTemplate' => '/v2beta/{support_event_subscription.name=organizations/*/supportEventSubscriptions/*}', - 'body' => 'support_event_subscription', - 'placeholders' => [ - 'support_event_subscription.name' => [ - 'getters' => [ - 'getSupportEventSubscription', - 'getName', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php deleted file mode 100644 index 5e7448a0adcd..000000000000 --- a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseAttachmentServiceClientTest.php +++ /dev/null @@ -1,241 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CaseAttachmentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CaseAttachmentServiceClient($options); - } - - /** @test */ - public function getAttachmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $filename = 'filename-734768633'; - $mimeType = 'mimeType-196041627'; - $sizeBytes = 1796325715; - $expectedResponse = new Attachment(); - $expectedResponse->setName($name2); - $expectedResponse->setFilename($filename); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); - $request = (new GetAttachmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttachment($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.support.v2beta.CaseAttachmentService/GetAttachment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getAttachmentExceptionTest() - { - $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->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); - $request = (new GetAttachmentRequest()) - ->setName($formattedName); - try { - $gapicClient->getAttachment($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 listAttachmentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $attachmentsElement = new Attachment(); - $attachments = [ - $attachmentsElement, - ]; - $expectedResponse = new ListAttachmentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setAttachments($attachments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListAttachmentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listAttachments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getAttachments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CaseAttachmentService/ListAttachments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listAttachmentsExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListAttachmentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listAttachments($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 getAttachmentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $filename = 'filename-734768633'; - $mimeType = 'mimeType-196041627'; - $sizeBytes = 1796325715; - $expectedResponse = new Attachment(); - $expectedResponse->setName($name2); - $expectedResponse->setFilename($filename); - $expectedResponse->setMimeType($mimeType); - $expectedResponse->setSizeBytes($sizeBytes); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachmentName('[ORGANIZATION]', '[CASE]', '[ATTACHMENT_ID]'); - $request = (new GetAttachmentRequest()) - ->setName($formattedName); - $response = $gapicClient->getAttachmentAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CaseAttachmentService/GetAttachment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php deleted file mode 100644 index 64d4d93e4b7b..000000000000 --- a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CaseServiceClientTest.php +++ /dev/null @@ -1,712 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CaseServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CaseServiceClient($options); - } - - /** @test */ - public function closeCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->closeCase($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.support.v2beta.CaseService/CloseCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function closeCaseExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->closeCase($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 createCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $case = new PBCase(); - $request = (new CreateCaseRequest()) - ->setParent($formattedParent) - ->setCase($case); - $response = $gapicClient->createCase($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.support.v2beta.CaseService/CreateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getCase(); - $this->assertProtobufEquals($case, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCaseExceptionTest() - { - $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->projectName('[PROJECT]'); - $case = new PBCase(); - $request = (new CreateCaseRequest()) - ->setParent($formattedParent) - ->setCase($case); - try { - $gapicClient->createCase($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 escalateCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new EscalateCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->escalateCase($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.support.v2beta.CaseService/EscalateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function escalateCaseExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new EscalateCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->escalateCase($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 getCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new GetCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->getCase($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.support.v2beta.CaseService/GetCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCaseExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new GetCaseRequest()) - ->setName($formattedName); - try { - $gapicClient->getCase($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 listCasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $casesElement = new PBCase(); - $cases = [ - $casesElement, - ]; - $expectedResponse = new ListCasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCases($cases); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->projectName('[PROJECT]'); - $request = (new ListCasesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listCases($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CaseService/ListCases', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCasesExceptionTest() - { - $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->projectName('[PROJECT]'); - $request = (new ListCasesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listCases($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 searchCaseClassificationsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $caseClassificationsElement = new CaseClassification(); - $caseClassifications = [ - $caseClassificationsElement, - ]; - $expectedResponse = new SearchCaseClassificationsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCaseClassifications($caseClassifications); - $transport->addResponse($expectedResponse); - $request = new SearchCaseClassificationsRequest(); - $response = $gapicClient->searchCaseClassifications($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCaseClassifications()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CaseService/SearchCaseClassifications', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCaseClassificationsExceptionTest() - { - $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 SearchCaseClassificationsRequest(); - try { - $gapicClient->searchCaseClassifications($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 searchCasesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $casesElement = new PBCase(); - $cases = [ - $casesElement, - ]; - $expectedResponse = new SearchCasesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setCases($cases); - $transport->addResponse($expectedResponse); - $request = new SearchCasesRequest(); - $response = $gapicClient->searchCases($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getCases()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CaseService/SearchCases', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchCasesExceptionTest() - { - $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 SearchCasesRequest(); - try { - $gapicClient->searchCases($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 updateCaseTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $case = new PBCase(); - $request = (new UpdateCaseRequest()) - ->setCase($case); - $response = $gapicClient->updateCase($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.support.v2beta.CaseService/UpdateCase', $actualFuncCall); - $actualValue = $actualRequestObject->getCase(); - $this->assertProtobufEquals($case, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateCaseExceptionTest() - { - $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 - $case = new PBCase(); - $request = (new UpdateCaseRequest()) - ->setCase($case); - try { - $gapicClient->updateCase($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 closeCaseAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $displayName = 'displayName1615086568'; - $description = 'description-1724546052'; - $timeZone = 'timeZone36848094'; - $contactEmail = 'contactEmail947010237'; - $escalated = true; - $testCase = false; - $languageCode = 'languageCode-412800396'; - $expectedResponse = new PBCase(); - $expectedResponse->setName($name2); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setDescription($description); - $expectedResponse->setTimeZone($timeZone); - $expectedResponse->setContactEmail($contactEmail); - $expectedResponse->setEscalated($escalated); - $expectedResponse->setTestCase($testCase); - $expectedResponse->setLanguageCode($languageCode); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new CloseCaseRequest()) - ->setName($formattedName); - $response = $gapicClient->closeCaseAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CaseService/CloseCase', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php deleted file mode 100644 index 0e38fc9ee9d2..000000000000 --- a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/CommentServiceClientTest.php +++ /dev/null @@ -1,316 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return CommentServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new CommentServiceClient($options); - } - - /** @test */ - public function createCommentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - $response = $gapicClient->createComment($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.support.v2beta.CommentService/CreateComment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getComment(); - $this->assertProtobufEquals($comment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createCommentExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - try { - $gapicClient->createComment($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 getCommentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name2); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); - $request = (new GetCommentRequest()) - ->setName($formattedName); - $response = $gapicClient->getComment($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.support.v2beta.CommentService/GetComment', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getCommentExceptionTest() - { - $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->commentName('[ORGANIZATION]', '[CASE]', '[COMMENT]'); - $request = (new GetCommentRequest()) - ->setName($formattedName); - try { - $gapicClient->getComment($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 listCommentsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $commentsElement = new Comment(); - $comments = [ - $commentsElement, - ]; - $expectedResponse = new ListCommentsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setComments($comments); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListCommentsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listComments($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getComments()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CommentService/ListComments', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listCommentsExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ListCommentsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listComments($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 createCommentAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $body = 'body3029410'; - $plainTextBody = 'plainTextBody-2068348609'; - $expectedResponse = new Comment(); - $expectedResponse->setName($name); - $expectedResponse->setBody($body); - $expectedResponse->setPlainTextBody($plainTextBody); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $comment = new Comment(); - $request = (new CreateCommentRequest()) - ->setParent($formattedParent) - ->setComment($comment); - $response = $gapicClient->createCommentAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.CommentService/CreateComment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getComment(); - $this->assertProtobufEquals($comment, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php deleted file mode 100644 index 303a6a57e9b5..000000000000 --- a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/FeedServiceClientTest.php +++ /dev/null @@ -1,172 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return FeedServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new FeedServiceClient($options); - } - - /** @test */ - public function showFeedTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $feedItemsElement = new FeedItem(); - $feedItems = [ - $feedItemsElement, - ]; - $expectedResponse = new ShowFeedResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFeedItems($feedItems); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ShowFeedRequest()) - ->setParent($formattedParent); - $response = $gapicClient->showFeed($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFeedItems()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.FeedService/ShowFeed', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function showFeedExceptionTest() - { - $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->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ShowFeedRequest()) - ->setParent($formattedParent); - try { - $gapicClient->showFeed($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 showFeedAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $feedItemsElement = new FeedItem(); - $feedItems = [ - $feedItemsElement, - ]; - $expectedResponse = new ShowFeedResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setFeedItems($feedItems); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->caseName('[ORGANIZATION]', '[CASE]'); - $request = (new ShowFeedRequest()) - ->setParent($formattedParent); - $response = $gapicClient->showFeedAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getFeedItems()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.FeedService/ShowFeed', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -} diff --git a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php b/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php deleted file mode 100644 index 89b9140cdb6e..000000000000 --- a/owl-bot-staging/Support/v2beta/tests/Unit/V2beta/Client/SupportEventSubscriptionServiceClientTest.php +++ /dev/null @@ -1,584 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return SupportEventSubscriptionServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new SupportEventSubscriptionServiceClient($options); - } - - /** @test */ - public function createSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - $response = $gapicClient->createSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSupportEventSubscription(); - $this->assertProtobufEquals($supportEventSubscription, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSupportEventSubscriptionExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - try { - $gapicClient->createSupportEventSubscription($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 deleteSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name2); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new DeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/DeleteSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new DeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSupportEventSubscription($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 expungeSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new ExpungeSupportEventSubscriptionRequest()) - ->setName($formattedName); - $gapicClient->expungeSupportEventSubscription($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.SupportEventSubscriptionService/ExpungeSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function expungeSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new ExpungeSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->expungeSupportEventSubscription($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 getSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name2); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new GetSupportEventSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->getSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/GetSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new GetSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->getSupportEventSubscription($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 listSupportEventSubscriptionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $supportEventSubscriptionsElement = new SupportEventSubscription(); - $supportEventSubscriptions = [ - $supportEventSubscriptionsElement, - ]; - $expectedResponse = new ListSupportEventSubscriptionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSupportEventSubscriptions($supportEventSubscriptions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $request = (new ListSupportEventSubscriptionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listSupportEventSubscriptions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSupportEventSubscriptions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.SupportEventSubscriptionService/ListSupportEventSubscriptions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSupportEventSubscriptionsExceptionTest() - { - $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->organizationName('[ORGANIZATION]'); - $request = (new ListSupportEventSubscriptionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listSupportEventSubscriptions($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 undeleteSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name2); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new UndeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - $response = $gapicClient->undeleteSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/UndeleteSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function undeleteSupportEventSubscriptionExceptionTest() - { - $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->supportEventSubscriptionName('[ORGANIZATION]', '[SUPPORT_EVENT_SUBSCRIPTION]'); - $request = (new UndeleteSupportEventSubscriptionRequest()) - ->setName($formattedName); - try { - $gapicClient->undeleteSupportEventSubscription($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 updateSupportEventSubscriptionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new UpdateSupportEventSubscriptionRequest()) - ->setSupportEventSubscription($supportEventSubscription); - $response = $gapicClient->updateSupportEventSubscription($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.support.v2beta.SupportEventSubscriptionService/UpdateSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getSupportEventSubscription(); - $this->assertProtobufEquals($supportEventSubscription, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSupportEventSubscriptionExceptionTest() - { - $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 - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new UpdateSupportEventSubscriptionRequest()) - ->setSupportEventSubscription($supportEventSubscription); - try { - $gapicClient->updateSupportEventSubscription($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 createSupportEventSubscriptionAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $pubSubTopic = 'pubSubTopic-2117200978'; - $expectedResponse = new SupportEventSubscription(); - $expectedResponse->setName($name); - $expectedResponse->setPubSubTopic($pubSubTopic); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->organizationName('[ORGANIZATION]'); - $supportEventSubscription = new SupportEventSubscription(); - $supportEventSubscriptionPubSubTopic = 'supportEventSubscriptionPubSubTopic-1272370428'; - $supportEventSubscription->setPubSubTopic($supportEventSubscriptionPubSubTopic); - $request = (new CreateSupportEventSubscriptionRequest()) - ->setParent($formattedParent) - ->setSupportEventSubscription($supportEventSubscription); - $response = $gapicClient->createSupportEventSubscriptionAsync($request)->wait(); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.cloud.support.v2beta.SupportEventSubscriptionService/CreateSupportEventSubscription', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getSupportEventSubscription(); - $this->assertProtobufEquals($supportEventSubscription, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}