From 6589ccff7cfdfaeed289d47557e2418691f93054 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 4 Dec 2024 01:02:23 +0000 Subject: [PATCH 1/2] feat: Chat Apps can now retrieve the import mode expire time information to know when to complete the import mode properly docs: Update reference documentation to include import_mode_expire_time field PiperOrigin-RevId: 702468699 Source-Link: https://github.com/googleapis/googleapis/commit/608531f2fa278d8cdf362c1b04550c5b5f2a1599 Source-Link: https://github.com/googleapis/googleapis-gen/commit/59d7d9462080ce01d1e3642c1c571a35cfce3796 Copy-Tag: eyJwIjoiQXBwc0NoYXQvLk93bEJvdC55YW1sIiwiaCI6IjU5ZDdkOTQ2MjA4MGNlMDFkMWUzNjQyYzFjNTcxYTM1Y2ZjZTM3OTYifQ== --- .../GPBMetadata/Google/Apps/Card/V1/Card.php | Bin 0 -> 8612 bytes .../proto/src/Google/Apps/Card/V1/Action.php | 331 +++ .../Apps/Card/V1/Action/ActionParameter.php | 111 + .../Apps/Card/V1/Action/Interaction.php | 74 + .../Apps/Card/V1/Action/LoadIndicator.php | 60 + .../src/Google/Apps/Card/V1/BorderStyle.php | 148 ++ .../Apps/Card/V1/BorderStyle/BorderType.php | 66 + .../proto/src/Google/Apps/Card/V1/Button.php | 400 +++ .../src/Google/Apps/Card/V1/ButtonList.php | 72 + .../v1/proto/src/Google/Apps/Card/V1/Card.php | 638 +++++ .../Google/Apps/Card/V1/Card/CardAction.php | 118 + .../Apps/Card/V1/Card/CardFixedFooter.php | 146 ++ .../Google/Apps/Card/V1/Card/CardHeader.php | 233 ++ .../Google/Apps/Card/V1/Card/DisplayStyle.php | 71 + .../Google/Apps/Card/V1/Card/DividerStyle.php | 67 + .../src/Google/Apps/Card/V1/Card/Section.php | 255 ++ .../proto/src/Google/Apps/Card/V1/Columns.php | 91 + .../Google/Apps/Card/V1/Columns/Column.php | 188 ++ .../V1/Columns/Column/HorizontalSizeStyle.php | 73 + .../V1/Columns/Column/VerticalAlignment.php | 76 + .../Apps/Card/V1/Columns/Column/Widgets.php | 280 +++ .../Google/Apps/Card/V1/DateTimePicker.php | 314 +++ .../V1/DateTimePicker/DateTimePickerType.php | 67 + .../src/Google/Apps/Card/V1/DecoratedText.php | 480 ++++ .../Card/V1/DecoratedText/SwitchControl.php | 247 ++ .../SwitchControl/ControlType.php | 70 + .../proto/src/Google/Apps/Card/V1/Divider.php | 42 + .../v1/proto/src/Google/Apps/Card/V1/Grid.php | 281 +++ .../src/Google/Apps/Card/V1/Grid/GridItem.php | 223 ++ .../Card/V1/Grid/GridItem/GridItemLayout.php | 66 + .../v1/proto/src/Google/Apps/Card/V1/Icon.php | 318 +++ .../proto/src/Google/Apps/Card/V1/Image.php | 165 ++ .../Google/Apps/Card/V1/ImageComponent.php | 191 ++ .../Google/Apps/Card/V1/ImageCropStyle.php | 138 ++ .../Card/V1/ImageCropStyle/ImageCropType.php | 81 + .../src/Google/Apps/Card/V1/MaterialIcon.php | 250 ++ .../proto/src/Google/Apps/Card/V1/OnClick.php | 198 ++ .../src/Google/Apps/Card/V1/OpenLink.php | 157 ++ .../Google/Apps/Card/V1/OpenLink/OnClose.php | 67 + .../Google/Apps/Card/V1/OpenLink/OpenAs.php | 64 + .../Google/Apps/Card/V1/SelectionInput.php | 439 ++++ .../V1/SelectionInput/PlatformDataSource.php | 85 + .../PlatformDataSource/CommonDataSource.php | 61 + .../Card/V1/SelectionInput/SelectionItem.php | 245 ++ .../Card/V1/SelectionInput/SelectionType.php | 106 + .../src/Google/Apps/Card/V1/Suggestions.php | 84 + .../Card/V1/Suggestions/SuggestionItem.php | 83 + .../src/Google/Apps/Card/V1/TextInput.php | 532 ++++ .../Google/Apps/Card/V1/TextInput/Type.php | 62 + .../src/Google/Apps/Card/V1/TextParagraph.php | 79 + .../proto/src/Google/Apps/Card/V1/Widget.php | 1062 ++++++++ .../Card/V1/Widget/HorizontalAlignment.php | 76 + .../Google/Apps/Card/V1/Widget/ImageType.php | 61 + .../Google/Chat/V1/ActionStatus.php | 31 + .../GPBMetadata/Google/Chat/V1/Annotation.php | Bin 0 -> 2391 bytes .../GPBMetadata/Google/Chat/V1/Attachment.php | Bin 0 -> 1793 bytes .../Google/Chat/V1/ChatService.php | Bin 0 -> 7235 bytes .../Google/Chat/V1/ContextualAddon.php | Bin 0 -> 1493 bytes .../Google/Chat/V1/DeletionMetadata.php | Bin 0 -> 1037 bytes .../Google/Chat/V1/EventPayload.php | 71 + .../src/GPBMetadata/Google/Chat/V1/Group.php | 30 + .../Google/Chat/V1/HistoryState.php | Bin 0 -> 851 bytes .../GPBMetadata/Google/Chat/V1/MatchedUrl.php | 31 + .../GPBMetadata/Google/Chat/V1/Membership.php | Bin 0 -> 2784 bytes .../GPBMetadata/Google/Chat/V1/Message.php | Bin 0 -> 5788 bytes .../GPBMetadata/Google/Chat/V1/Reaction.php | Bin 0 -> 1861 bytes .../Google/Chat/V1/SlashCommand.php | 30 + .../src/GPBMetadata/Google/Chat/V1/Space.php | Bin 0 -> 4890 bytes .../GPBMetadata/Google/Chat/V1/SpaceEvent.php | Bin 0 -> 3151 bytes .../Google/Chat/V1/SpaceReadState.php | 41 + .../GPBMetadata/Google/Chat/V1/SpaceSetup.php | 35 + .../Google/Chat/V1/ThreadReadState.php | 37 + .../src/GPBMetadata/Google/Chat/V1/User.php | Bin 0 -> 1065 bytes .../GPBMetadata/Google/Chat/V1/Widgets.php | Bin 0 -> 2663 bytes .../Google/Apps/Chat/V1/AccessoryWidget.php | 77 + .../Google/Apps/Chat/V1/ActionResponse.php | 201 ++ .../Chat/V1/ActionResponse/ResponseType.php | 96 + .../Chat/V1/ActionResponse/SelectionItems.php | 70 + .../Chat/V1/ActionResponse/UpdatedWidget.php | 117 + .../src/Google/Apps/Chat/V1/ActionStatus.php | 106 + .../src/Google/Apps/Chat/V1/Annotation.php | 285 +++ .../Google/Apps/Chat/V1/AnnotationType.php | 68 + .../src/Google/Apps/Chat/V1/AttachedGif.php | 67 + .../src/Google/Apps/Chat/V1/Attachment.php | 338 +++ .../Google/Apps/Chat/V1/Attachment/Source.php | 64 + .../Google/Apps/Chat/V1/AttachmentDataRef.php | 113 + .../src/Google/Apps/Chat/V1/CardWithId.php | 121 + .../Google/Apps/Chat/V1/ChatSpaceLinkData.php | 147 ++ .../Chat/V1/CompleteImportSpaceRequest.php | 71 + .../Chat/V1/CompleteImportSpaceResponse.php | 77 + .../Apps/Chat/V1/ContextualAddOnMarkup.php | 33 + .../Chat/V1/ContextualAddOnMarkup/Card.php | 183 ++ .../ContextualAddOnMarkup/Card/CardAction.php | 118 + .../ContextualAddOnMarkup/Card/CardHeader.php | 178 ++ .../Card/CardHeader/ImageStyle.php | 60 + .../V1/ContextualAddOnMarkup/Card/Section.php | 139 ++ .../Apps/Chat/V1/CreateMembershipRequest.php | 283 +++ .../Apps/Chat/V1/CreateMessageRequest.php | 370 +++ .../MessageReplyOption.php | 74 + .../Apps/Chat/V1/CreateReactionRequest.php | 133 + .../Apps/Chat/V1/CreateSpaceRequest.php | 192 ++ .../src/Google/Apps/Chat/V1/CustomEmoji.php | 67 + .../Apps/Chat/V1/DeleteMembershipRequest.php | 196 ++ .../Apps/Chat/V1/DeleteMessageRequest.php | 162 ++ .../Apps/Chat/V1/DeleteReactionRequest.php | 87 + .../Apps/Chat/V1/DeleteSpaceRequest.php | 145 ++ .../Google/Apps/Chat/V1/DeletionMetadata.php | 68 + .../Chat/V1/DeletionMetadata/DeletionType.php | 92 + .../proto/src/Google/Apps/Chat/V1/Dialog.php | 85 + .../src/Google/Apps/Chat/V1/DialogAction.php | 139 ++ .../src/Google/Apps/Chat/V1/DriveDataRef.php | 67 + .../src/Google/Apps/Chat/V1/DriveLinkData.php | 119 + .../proto/src/Google/Apps/Chat/V1/Emoji.php | 108 + .../Apps/Chat/V1/EmojiReactionSummary.php | 121 + .../Apps/Chat/V1/FindDirectMessageRequest.php | 111 + .../Apps/Chat/V1/GetAttachmentRequest.php | 86 + .../Apps/Chat/V1/GetMembershipRequest.php | 195 ++ .../Google/Apps/Chat/V1/GetMessageRequest.php | 108 + .../Apps/Chat/V1/GetSpaceEventRequest.php | 87 + .../Apps/Chat/V1/GetSpaceReadStateRequest.php | 127 + .../Google/Apps/Chat/V1/GetSpaceRequest.php | 145 ++ .../Chat/V1/GetThreadReadStateRequest.php | 132 + .../proto/src/Google/Apps/Chat/V1/Group.php | 83 + .../src/Google/Apps/Chat/V1/HistoryState.php | 65 + .../Apps/Chat/V1/ListMembershipsRequest.php | 512 ++++ .../Apps/Chat/V1/ListMembershipsResponse.php | 105 + .../Apps/Chat/V1/ListMessagesRequest.php | 421 ++++ .../Apps/Chat/V1/ListMessagesResponse.php | 105 + .../Apps/Chat/V1/ListReactionsRequest.php | 349 +++ .../Apps/Chat/V1/ListReactionsResponse.php | 105 + .../Apps/Chat/V1/ListSpaceEventsRequest.php | 444 ++++ .../Apps/Chat/V1/ListSpaceEventsResponse.php | 113 + .../Google/Apps/Chat/V1/ListSpacesRequest.php | 219 ++ .../Apps/Chat/V1/ListSpacesResponse.php | 113 + .../src/Google/Apps/Chat/V1/MatchedUrl.php | 69 + .../src/Google/Apps/Chat/V1/Membership.php | 342 +++ .../Chat/V1/Membership/MembershipRole.php | 73 + .../Chat/V1/Membership/MembershipState.php | 73 + .../V1/MembershipBatchCreatedEventData.php | 68 + .../V1/MembershipBatchDeletedEventData.php | 68 + .../V1/MembershipBatchUpdatedEventData.php | 68 + .../Chat/V1/MembershipCreatedEventData.php | 78 + .../Chat/V1/MembershipDeletedEventData.php | 78 + .../Chat/V1/MembershipUpdatedEventData.php | 78 + .../proto/src/Google/Apps/Chat/V1/Message.php | 1426 +++++++++++ .../Chat/V1/MessageBatchCreatedEventData.php | 68 + .../Chat/V1/MessageBatchDeletedEventData.php | 68 + .../Chat/V1/MessageBatchUpdatedEventData.php | 68 + .../Apps/Chat/V1/MessageCreatedEventData.php | 78 + .../Apps/Chat/V1/MessageDeletedEventData.php | 82 + .../Apps/Chat/V1/MessageUpdatedEventData.php | 78 + .../Apps/Chat/V1/QuotedMessageMetadata.php | 119 + .../src/Google/Apps/Chat/V1/Reaction.php | 159 ++ .../Chat/V1/ReactionBatchCreatedEventData.php | 68 + .../Chat/V1/ReactionBatchDeletedEventData.php | 68 + .../Apps/Chat/V1/ReactionCreatedEventData.php | 78 + .../Apps/Chat/V1/ReactionDeletedEventData.php | 78 + .../Google/Apps/Chat/V1/RichLinkMetadata.php | 176 ++ .../Chat/V1/RichLinkMetadata/RichLinkType.php | 64 + .../Apps/Chat/V1/SearchSpacesRequest.php | 539 ++++ .../Apps/Chat/V1/SearchSpacesResponse.php | 143 ++ .../Google/Apps/Chat/V1/SetUpSpaceRequest.php | 317 +++ .../src/Google/Apps/Chat/V1/SlashCommand.php | 69 + .../Apps/Chat/V1/SlashCommandMetadata.php | 213 ++ .../Chat/V1/SlashCommandMetadata/Type.php | 62 + .../proto/src/Google/Apps/Chat/V1/Space.php | 978 ++++++++ .../Apps/Chat/V1/Space/AccessSettings.php | 149 ++ .../V1/Space/AccessSettings/AccessState.php | 74 + .../Apps/Chat/V1/Space/MembershipCount.php | 108 + .../Apps/Chat/V1/Space/PermissionSetting.php | 104 + .../Apps/Chat/V1/Space/PermissionSettings.php | 391 +++ .../V1/Space/PredefinedPermissionSettings.php | 69 + .../Apps/Chat/V1/Space/SpaceDetails.php | 116 + .../Chat/V1/Space/SpaceThreadingState.php | 75 + .../Google/Apps/Chat/V1/Space/SpaceType.php | 74 + .../src/Google/Apps/Chat/V1/Space/Type.php | 65 + .../Chat/V1/SpaceBatchUpdatedEventData.php | 68 + .../src/Google/Apps/Chat/V1/SpaceEvent.php | 956 ++++++++ .../Google/Apps/Chat/V1/SpaceReadState.php | 124 + .../Apps/Chat/V1/SpaceUpdatedEventData.php | 78 + .../proto/src/Google/Apps/Chat/V1/Thread.php | 134 + .../Google/Apps/Chat/V1/ThreadReadState.php | 120 + .../Apps/Chat/V1/UpdateMembershipRequest.php | 216 ++ .../Apps/Chat/V1/UpdateMessageRequest.php | 238 ++ .../Chat/V1/UpdateSpaceReadStateRequest.php | 230 ++ .../Apps/Chat/V1/UpdateSpaceRequest.php | 480 ++++ .../Apps/Chat/V1/UploadAttachmentRequest.php | 105 + .../Apps/Chat/V1/UploadAttachmentResponse.php | 77 + .../v1/proto/src/Google/Apps/Chat/V1/User.php | 275 +++ .../src/Google/Apps/Chat/V1/User/Type.php | 62 + .../Apps/Chat/V1/UserMentionMetadata.php | 111 + .../Apps/Chat/V1/UserMentionMetadata/Type.php | 62 + .../src/Google/Apps/Chat/V1/WidgetMarkup.php | 179 ++ .../Apps/Chat/V1/WidgetMarkup/Button.php | 111 + .../Apps/Chat/V1/WidgetMarkup/FormAction.php | 117 + .../FormAction/ActionParameter.php | 107 + .../Google/Apps/Chat/V1/WidgetMarkup/Icon.php | 198 ++ .../Apps/Chat/V1/WidgetMarkup/Image.php | 160 ++ .../Apps/Chat/V1/WidgetMarkup/ImageButton.php | 196 ++ .../Apps/Chat/V1/WidgetMarkup/KeyValue.php | 425 ++++ .../Apps/Chat/V1/WidgetMarkup/OnClick.php | 111 + .../Apps/Chat/V1/WidgetMarkup/OpenLink.php | 70 + .../Apps/Chat/V1/WidgetMarkup/TextButton.php | 114 + .../Chat/V1/WidgetMarkup/TextParagraph.php | 70 + .../complete_import_space.php | 78 + .../ChatServiceClient/create_membership.php | 94 + .../V1/ChatServiceClient/create_message.php | 98 + .../V1/ChatServiceClient/create_reaction.php | 80 + .../V1/ChatServiceClient/create_space.php | 73 + .../ChatServiceClient/delete_membership.php | 89 + .../V1/ChatServiceClient/delete_message.php | 88 + .../V1/ChatServiceClient/delete_reaction.php | 76 + .../V1/ChatServiceClient/delete_space.php | 78 + .../ChatServiceClient/find_direct_message.php | 100 + .../V1/ChatServiceClient/get_attachment.php | 79 + .../V1/ChatServiceClient/get_membership.php | 93 + .../V1/ChatServiceClient/get_message.php | 90 + .../V1/ChatServiceClient/get_space.php | 83 + .../V1/ChatServiceClient/get_space_event.php | 89 + .../get_space_read_state.php | 91 + .../get_thread_read_state.php | 92 + .../V1/ChatServiceClient/list_memberships.php | 97 + .../V1/ChatServiceClient/list_messages.php | 86 + .../V1/ChatServiceClient/list_reactions.php | 82 + .../ChatServiceClient/list_space_events.php | 147 ++ .../V1/ChatServiceClient/list_spaces.php | 80 + .../V1/ChatServiceClient/search_spaces.php | 146 ++ .../V1/ChatServiceClient/set_up_space.php | 110 + .../ChatServiceClient/update_membership.php | 66 + .../V1/ChatServiceClient/update_message.php | 74 + .../V1/ChatServiceClient/update_space.php | 68 + .../update_space_read_state.php | 67 + .../ChatServiceClient/upload_attachment.php | 83 + .../v1/src/V1/Client/ChatServiceClient.php | 1551 ++++++++++++ .../AppsChat/v1/src/V1/gapic_metadata.json | 163 ++ .../resources/chat_service_client_config.json | 179 ++ .../chat_service_descriptor_config.php | 400 +++ .../chat_service_rest_client_config.php | 344 +++ .../Unit/V1/Client/ChatServiceClientTest.php | 2177 +++++++++++++++++ 239 files changed, 38864 insertions(+) create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/GPBMetadata/Google/Apps/Card/V1/Card.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/ActionParameter.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/Interaction.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/LoadIndicator.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle/BorderType.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Button.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ButtonList.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardAction.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardFixedFooter.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardHeader.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DisplayStyle.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DividerStyle.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/Section.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/HorizontalSizeStyle.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/VerticalAlignment.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/Widgets.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker/DateTimePickerType.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl/ControlType.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Divider.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem/GridItemLayout.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Icon.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Image.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageComponent.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle/ImageCropType.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/MaterialIcon.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OnClick.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OnClose.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OpenAs.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource/CommonDataSource.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionItem.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionType.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions/SuggestionItem.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput/Type.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextParagraph.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/HorizontalAlignment.php create mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/ImageType.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ActionStatus.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Annotation.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Attachment.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ChatService.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ContextualAddon.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/DeletionMetadata.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/EventPayload.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Group.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/HistoryState.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/MatchedUrl.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Membership.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Message.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Reaction.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SlashCommand.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Space.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceEvent.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceReadState.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceSetup.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ThreadReadState.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/User.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Widgets.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AccessoryWidget.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/ResponseType.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/SelectionItems.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/UpdatedWidget.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionStatus.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Annotation.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AnnotationType.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachedGif.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment/Source.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachmentDataRef.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CardWithId.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ChatSpaceLinkData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceResponse.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardAction.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader/ImageStyle.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/Section.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMembershipRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest/MessageReplyOption.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateReactionRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateSpaceRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CustomEmoji.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMembershipRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMessageRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteReactionRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteSpaceRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata/DeletionType.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Dialog.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DialogAction.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveDataRef.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveLinkData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Emoji.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/EmojiReactionSummary.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/FindDirectMessageRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetAttachmentRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMembershipRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMessageRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceEventRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceReadStateRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetThreadReadStateRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Group.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/HistoryState.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsResponse.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesResponse.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsResponse.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsResponse.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesResponse.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MatchedUrl.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipRole.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipState.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchCreatedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchDeletedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchUpdatedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipCreatedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipDeletedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipUpdatedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Message.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchCreatedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchDeletedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchUpdatedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageCreatedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageDeletedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageUpdatedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/QuotedMessageMetadata.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Reaction.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchCreatedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchDeletedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionCreatedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionDeletedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata/RichLinkType.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesResponse.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SetUpSpaceRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommand.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata/Type.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings/AccessState.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/MembershipCount.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSetting.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSettings.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PredefinedPermissionSettings.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceDetails.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceThreadingState.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceType.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/Type.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceBatchUpdatedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceEvent.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceReadState.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceUpdatedEventData.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Thread.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ThreadReadState.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMembershipRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMessageRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceReadStateRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentRequest.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentResponse.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User/Type.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata/Type.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Button.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction/ActionParameter.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Icon.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Image.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/ImageButton.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/KeyValue.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OnClick.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OpenLink.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextButton.php create mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextParagraph.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/complete_import_space.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_membership.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_message.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_reaction.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_space.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_membership.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_message.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_reaction.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_space.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/find_direct_message.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_attachment.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_membership.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_message.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_event.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_read_state.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_thread_read_state.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_memberships.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_messages.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_reactions.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_space_events.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_spaces.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/search_spaces.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/set_up_space.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_membership.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_message.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space_read_state.php create mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/upload_attachment.php create mode 100644 owl-bot-staging/AppsChat/v1/src/V1/Client/ChatServiceClient.php create mode 100644 owl-bot-staging/AppsChat/v1/src/V1/gapic_metadata.json create mode 100644 owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_client_config.json create mode 100644 owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_descriptor_config.php create mode 100644 owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_rest_client_config.php create mode 100644 owl-bot-staging/AppsChat/v1/tests/Unit/V1/Client/ChatServiceClientTest.php diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/GPBMetadata/Google/Apps/Card/V1/Card.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/GPBMetadata/Google/Apps/Card/V1/Card.php new file mode 100644 index 0000000000000000000000000000000000000000..2b741a7e434713f65e36108693fe4b643097aeab GIT binary patch literal 8612 zcmeHNJ98V?6&AoJ4oHYz(Kbz4Hnfs0DYl>xvaK;>Nx@6xMj!wKAZ0n6*;x`xa!0@} zyt|MrXH+;vCVl!;nPiea{sCz+lN6bBnN+EhHf?6|oqI1{)Dp7Oq=^a2k?vT?A|3_5A}omp<~mqmF&U>h*#f2bSNy@nl2%&4{IlT&rsbJ?p?uZ`KRjc4)P& z(AwJ+Tzh$N?G?ebx4Uth=%8Z-L7KnQk136Rz5ag3IY%3U|+qKmTNNY<(`K#-boMSsPnOLae)2*hRlfP%! zsu{Lw=E;WsheeuY+h`xq{IPAdZGSD6j$KV=FJ~giGfXP}+Y+?eO{_w2k0d?lZ@I!Jyrt<+c;_I@U9FlKGdP zM3Bpq+@+PCZ9g`}ag-GngbXh^jkLo0&tpU^k}}FN&4o?~eX=DJ+6rvc-pKE zPS-lJ%@9twHX~$xC-Srpoi>6bV=y&)to8~eBx~RADDAyQDf!6igl1@e84CR+*1wL? z!ocLI3GYg1@6*ClvGl-g&QIB1J4Z>tSI6oF&OVOC=2_G((RskZ=&`95G!MMK8?Lbh z=GGfhG0N(zv?QIy>{$DDN9iX+i=Jy90FxfWhuQbvj1;Ek7MW)KIh{Re|C^NR`A~xY z%-rvXq35a~iau3AkZ2#$3c|p1+hc5U|7mP`ot7rT-~zo-GIotpxnVY2k1Azzr`oKS zi^hGUTv|B;gDp2}6{BP-qLrAIBC6Jg-{X3TR~&Okv0}4c$v=u*5r|PQmmgrEBrP<` zpevSF;`&eLXX?;Msbw+!S=7c{fW2{Fq8SIfD z##U`8QRF-6eC*E2Z1h&80V(eZ?vE%b?PYeHAQb+b%)TADp)^_rWZ?UNNF2~{dwuEd z$?RK^Y`l@dRN%TxX9K$nIz{~oO%&mwA_u5I?atU64Y68?>MRS3vD)j;`Db4A*G($amUnB*c6pQp`;d$h8rS{jM9VC8q=tG9J@_ zVVhQuJ>U7tb3?0RBKse?T^oVB2<}w&M&w=!j<$w;`2m}Li4wvm1WFOjH$UCUH_8YA zd@dS|Vx_zi(|<(gB6zjSl-{Z}jL&P;R=#59E5>GZyIgIZh@=F~HCy>c3y#lgf}q@3 ziE9fqQ?8a)W(xB(%Vm&$ftDv+nv)HCi-a3}Z;$4Lq?1@GvHCk=5o7xhb=mO~dV&^| z{q$eV(ei}HBeZ56AdU*hXnPtUD8$!d+I1q-KYnNmmZd2!z$|>4(CaB=6|xKuF0(8M zo&pR;DPmCrAn$v?%dTSMa7bw5N|63N6_6q5yh2^}on&?ze8Ta5NU7kd6CNBRQ@Ek; zbyP5XKhotU6qsoW#-ilITGwgOcH2@z((O-I>eiX{uj4@D@g;_Zh%`Sk_Y8`Zi_6v$T@>^)v@Iwd&^v=P%HY-D)BW?DoL4T%I6H4%6{@)51dg4=NQw0onv1) zB$^M6R&fg(z;BB25 zm>lS?=ZHp`l*>RFxr5E4^)5N|f6im4iKIB)XYMJFkOl5Wv|%RJ%M6zn%KX7VGqXZ7 z-)#lfO=P^v?jri6%FcUN=X4scPE&+T}x&^`Zjv4D}IzD zR#OZafQF9&hC}tUwk8tgD83~Ea2qoThG;xS3CisIj%rBIE~u;`0)+LQSpQv&v=^n& zY|;>iU4ZJiS{RK}+0Fm%WI#z?aQvwHHCj3Ol&j~R>VsrsS9? zTrP~XB)oD0PtTwPSZd@;M$Ihjv|6>QtWFdZ#~F%Cjat3LyUZ}H00XmGu9S<~07n6kp@| zH!+%*Aa%lr5y-OQl8xQz#esH_=1@O-zDV@RtTyny5IGGVgBF=fI)$giN<>C-i z2@5TATlLK2<)Wyy^xwy5R+Mk6M2}tXsVi$4QH~(=HCp8A55d)uH3^>OXt@i;`ltGKymZP9K{ckZ!iR!%Qdp$Xw8Ke;j3eibml10u-cm?6nJa!0r==)5x zsg5TU8PmU@bL1(lC#j*0Cp^)`bskBvtkicPy+y#VX@4y678Io&Kj8 zn&nQJ{cU_Ww=pO&ZiS6UwW@2Q+)=OnS{5CS~D(>On1{1vDC|H)+(KvMC zta1_*tp8?)7S!kej~$2CI+?Ehyiv&)(9SmNJb8|3uaPEx**2=i_Rh9?9@jskS6*~Co!;6lH(Ew<%A{{J-iz^g zuT`sK&WDGE8Y*n$R{ig|+89(>m_Dfnosc0yY zOJw99zPS)Q$W^J1XQ4fJ+rUR$GK)$lm5shfREt!=VGJ1H$*CT8$0dU)dZ0j9Y!S$o z6c@pkxV=;(uDvUfexnvP_~Ka7uV1IL^65xeSoE>|OdWkVNfX79{w^&~iUox>>qfPT z{#10T)fz@iG5t0r$9Bgoogle.apps.card.v1.Action + */ +class Action extends \Google\Protobuf\Internal\Message +{ + /** + * A custom function to invoke when the containing element is + * clicked or othrwise activated. + * For example usage, see [Read form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string function = 1; + */ + protected $function = ''; + /** + * List of action parameters. + * + * Generated from protobuf field repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + */ + private $parameters; + /** + * Specifies the loading indicator that the action displays while + * making the call to the action. + * + * Generated from protobuf field .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + */ + protected $load_indicator = 0; + /** + * Indicates whether form values persist after the action. The default value + * is `false`. + * If `true`, form values remain after the action is triggered. To let the + * user make changes while the action is being processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `NONE`. For [card + * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) + * in Chat apps, you must also set the action's + * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) + * to `UPDATE_MESSAGE` and use the same + * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) + * from the card that contained the action. + * If `false`, the form values are cleared when the action is triggered. + * To prevent the user from making changes while the action is being + * processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `SPINNER`. + * + * Generated from protobuf field bool persist_values = 4; + */ + protected $persist_values = false; + /** + * Optional. Required when opening a + * [dialog](https://developers.google.com/workspace/chat/dialogs). + * What to do in response to an interaction with a user, such as a user + * clicking a button in a card message. + * If unspecified, the app responds by executing an `action`—like opening a + * link or running a function—as normal. + * By specifying an `interaction`, the app can respond in special interactive + * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can + * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When + * specified, a loading indicator isn't shown. If specified for + * an add-on, the entire card is stripped and nothing is shown in the client. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field .google.apps.card.v1.Action.Interaction interaction = 5; + */ + protected $interaction = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $function + * A custom function to invoke when the containing element is + * clicked or othrwise activated. + * For example usage, see [Read form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type array<\Google\Apps\Card\V1\Action\ActionParameter>|\Google\Protobuf\Internal\RepeatedField $parameters + * List of action parameters. + * @type int $load_indicator + * Specifies the loading indicator that the action displays while + * making the call to the action. + * @type bool $persist_values + * Indicates whether form values persist after the action. The default value + * is `false`. + * If `true`, form values remain after the action is triggered. To let the + * user make changes while the action is being processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `NONE`. For [card + * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) + * in Chat apps, you must also set the action's + * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) + * to `UPDATE_MESSAGE` and use the same + * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) + * from the card that contained the action. + * If `false`, the form values are cleared when the action is triggered. + * To prevent the user from making changes while the action is being + * processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `SPINNER`. + * @type int $interaction + * Optional. Required when opening a + * [dialog](https://developers.google.com/workspace/chat/dialogs). + * What to do in response to an interaction with a user, such as a user + * clicking a button in a card message. + * If unspecified, the app responds by executing an `action`—like opening a + * link or running a function—as normal. + * By specifying an `interaction`, the app can respond in special interactive + * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can + * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When + * specified, a loading indicator isn't shown. If specified for + * an add-on, the entire card is stripped and nothing is shown in the client. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * A custom function to invoke when the containing element is + * clicked or othrwise activated. + * For example usage, see [Read form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string function = 1; + * @return string + */ + public function getFunction() + { + return $this->function; + } + + /** + * A custom function to invoke when the containing element is + * clicked or othrwise activated. + * For example usage, see [Read form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string function = 1; + * @param string $var + * @return $this + */ + public function setFunction($var) + { + GPBUtil::checkString($var, True); + $this->function = $var; + + return $this; + } + + /** + * List of action parameters. + * + * Generated from protobuf field repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * List of action parameters. + * + * Generated from protobuf field repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; + * @param array<\Google\Apps\Card\V1\Action\ActionParameter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Action\ActionParameter::class); + $this->parameters = $arr; + + return $this; + } + + /** + * Specifies the loading indicator that the action displays while + * making the call to the action. + * + * Generated from protobuf field .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * @return int + */ + public function getLoadIndicator() + { + return $this->load_indicator; + } + + /** + * Specifies the loading indicator that the action displays while + * making the call to the action. + * + * Generated from protobuf field .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; + * @param int $var + * @return $this + */ + public function setLoadIndicator($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Action\LoadIndicator::class); + $this->load_indicator = $var; + + return $this; + } + + /** + * Indicates whether form values persist after the action. The default value + * is `false`. + * If `true`, form values remain after the action is triggered. To let the + * user make changes while the action is being processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `NONE`. For [card + * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) + * in Chat apps, you must also set the action's + * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) + * to `UPDATE_MESSAGE` and use the same + * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) + * from the card that contained the action. + * If `false`, the form values are cleared when the action is triggered. + * To prevent the user from making changes while the action is being + * processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `SPINNER`. + * + * Generated from protobuf field bool persist_values = 4; + * @return bool + */ + public function getPersistValues() + { + return $this->persist_values; + } + + /** + * Indicates whether form values persist after the action. The default value + * is `false`. + * If `true`, form values remain after the action is triggered. To let the + * user make changes while the action is being processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `NONE`. For [card + * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) + * in Chat apps, you must also set the action's + * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) + * to `UPDATE_MESSAGE` and use the same + * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) + * from the card that contained the action. + * If `false`, the form values are cleared when the action is triggered. + * To prevent the user from making changes while the action is being + * processed, set + * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) + * to `SPINNER`. + * + * Generated from protobuf field bool persist_values = 4; + * @param bool $var + * @return $this + */ + public function setPersistValues($var) + { + GPBUtil::checkBool($var); + $this->persist_values = $var; + + return $this; + } + + /** + * Optional. Required when opening a + * [dialog](https://developers.google.com/workspace/chat/dialogs). + * What to do in response to an interaction with a user, such as a user + * clicking a button in a card message. + * If unspecified, the app responds by executing an `action`—like opening a + * link or running a function—as normal. + * By specifying an `interaction`, the app can respond in special interactive + * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can + * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When + * specified, a loading indicator isn't shown. If specified for + * an add-on, the entire card is stripped and nothing is shown in the client. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field .google.apps.card.v1.Action.Interaction interaction = 5; + * @return int + */ + public function getInteraction() + { + return $this->interaction; + } + + /** + * Optional. Required when opening a + * [dialog](https://developers.google.com/workspace/chat/dialogs). + * What to do in response to an interaction with a user, such as a user + * clicking a button in a card message. + * If unspecified, the app responds by executing an `action`—like opening a + * link or running a function—as normal. + * By specifying an `interaction`, the app can respond in special interactive + * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can + * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When + * specified, a loading indicator isn't shown. If specified for + * an add-on, the entire card is stripped and nothing is shown in the client. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field .google.apps.card.v1.Action.Interaction interaction = 5; + * @param int $var + * @return $this + */ + public function setInteraction($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Action\Interaction::class); + $this->interaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/ActionParameter.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/ActionParameter.php new file mode 100644 index 000000000000..97c1de9eec28 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/ActionParameter.php @@ -0,0 +1,111 @@ +google.apps.card.v1.Action.ActionParameter + */ +class ActionParameter extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the parameter for the action script. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The value of the parameter. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The name of the parameter for the action script. + * @type string $value + * The value of the parameter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The name of the parameter for the action script. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The name of the parameter for the action script. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The value of the parameter. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the parameter. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ActionParameter::class, \Google\Apps\Card\V1\Action_ActionParameter::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/Interaction.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/Interaction.php new file mode 100644 index 000000000000..8a61e46ee077 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/Interaction.php @@ -0,0 +1,74 @@ +google.apps.card.v1.Action.Interaction + */ +class Interaction +{ + /** + * Default value. The `action` executes as normal. + * + * Generated from protobuf enum INTERACTION_UNSPECIFIED = 0; + */ + const INTERACTION_UNSPECIFIED = 0; + /** + * Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a + * windowed, card-based interface that Chat apps use to interact with users. + * Only supported by Chat apps in response to button-clicks on card + * messages. If specified for + * an add-on, the entire card is stripped and nothing is shown in the + * client. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf enum OPEN_DIALOG = 1; + */ + const OPEN_DIALOG = 1; + + private static $valueToName = [ + self::INTERACTION_UNSPECIFIED => 'INTERACTION_UNSPECIFIED', + self::OPEN_DIALOG => 'OPEN_DIALOG', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Interaction::class, \Google\Apps\Card\V1\Action_Interaction::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/LoadIndicator.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/LoadIndicator.php new file mode 100644 index 000000000000..89fe775ce3c4 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/LoadIndicator.php @@ -0,0 +1,60 @@ +google.apps.card.v1.Action.LoadIndicator + */ +class LoadIndicator +{ + /** + * Displays a spinner to indicate that content is loading. + * + * Generated from protobuf enum SPINNER = 0; + */ + const SPINNER = 0; + /** + * Nothing is displayed. + * + * Generated from protobuf enum NONE = 1; + */ + const NONE = 1; + + private static $valueToName = [ + self::SPINNER => 'SPINNER', + self::NONE => 'NONE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(LoadIndicator::class, \Google\Apps\Card\V1\Action_LoadIndicator::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle.php new file mode 100644 index 000000000000..4cf88c737048 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle.php @@ -0,0 +1,148 @@ +google.apps.card.v1.BorderStyle + */ +class BorderStyle extends \Google\Protobuf\Internal\Message +{ + /** + * The border type. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle.BorderType type = 1; + */ + protected $type = 0; + /** + * The colors to use when the type is `BORDER_TYPE_STROKE`. + * + * Generated from protobuf field .google.type.Color stroke_color = 2; + */ + protected $stroke_color = null; + /** + * The corner radius for the border. + * + * Generated from protobuf field int32 corner_radius = 3; + */ + protected $corner_radius = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The border type. + * @type \Google\Type\Color $stroke_color + * The colors to use when the type is `BORDER_TYPE_STROKE`. + * @type int $corner_radius + * The corner radius for the border. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The border type. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle.BorderType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The border type. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle.BorderType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\BorderStyle\BorderType::class); + $this->type = $var; + + return $this; + } + + /** + * The colors to use when the type is `BORDER_TYPE_STROKE`. + * + * Generated from protobuf field .google.type.Color stroke_color = 2; + * @return \Google\Type\Color|null + */ + public function getStrokeColor() + { + return $this->stroke_color; + } + + public function hasStrokeColor() + { + return isset($this->stroke_color); + } + + public function clearStrokeColor() + { + unset($this->stroke_color); + } + + /** + * The colors to use when the type is `BORDER_TYPE_STROKE`. + * + * Generated from protobuf field .google.type.Color stroke_color = 2; + * @param \Google\Type\Color $var + * @return $this + */ + public function setStrokeColor($var) + { + GPBUtil::checkMessage($var, \Google\Type\Color::class); + $this->stroke_color = $var; + + return $this; + } + + /** + * The corner radius for the border. + * + * Generated from protobuf field int32 corner_radius = 3; + * @return int + */ + public function getCornerRadius() + { + return $this->corner_radius; + } + + /** + * The corner radius for the border. + * + * Generated from protobuf field int32 corner_radius = 3; + * @param int $var + * @return $this + */ + public function setCornerRadius($var) + { + GPBUtil::checkInt32($var); + $this->corner_radius = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle/BorderType.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle/BorderType.php new file mode 100644 index 000000000000..4278b12efd3b --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle/BorderType.php @@ -0,0 +1,66 @@ +google.apps.card.v1.BorderStyle.BorderType + */ +class BorderType +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum BORDER_TYPE_UNSPECIFIED = 0; + */ + const BORDER_TYPE_UNSPECIFIED = 0; + /** + * Default value. No border. + * + * Generated from protobuf enum NO_BORDER = 1; + */ + const NO_BORDER = 1; + /** + * Outline. + * + * Generated from protobuf enum STROKE = 2; + */ + const STROKE = 2; + + private static $valueToName = [ + self::BORDER_TYPE_UNSPECIFIED => 'BORDER_TYPE_UNSPECIFIED', + self::NO_BORDER => 'NO_BORDER', + self::STROKE => 'STROKE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(BorderType::class, \Google\Apps\Card\V1\BorderStyle_BorderType::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Button.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Button.php new file mode 100644 index 000000000000..8e966b18cf47 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Button.php @@ -0,0 +1,400 @@ +google.apps.card.v1.Button + */ +class Button extends \Google\Protobuf\Internal\Message +{ + /** + * The text displayed inside the button. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * The icon image. If both `icon` and `text` are set, then the icon appears + * before the text. + * + * Generated from protobuf field .google.apps.card.v1.Icon icon = 2; + */ + protected $icon = null; + /** + * If set, the button is filled with a solid background color and the font + * color changes to maintain contrast with the background color. For example, + * setting a blue background likely results in white text. + * If unset, the image background is white and the font color is blue. + * For red, green, and blue, the value of each field is a `float` number that + * you can express in either of two ways: as a number between 0 and 255 + * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents + * the absence of a color and 1 or 255/255 represent the full presence of that + * color on the RGB scale. + * Optionally set `alpha`, which sets a level of transparency using this + * equation: + * ``` + * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * ``` + * For `alpha`, a value of `1` corresponds with a solid color, and a value of + * `0` corresponds with a completely transparent color. + * For example, the following color represents a half transparent red: + * ``` + * "color": { + * "red": 1, + * "green": 0, + * "blue": 0, + * "alpha": 0.5 + * } + * ``` + * + * Generated from protobuf field .google.type.Color color = 3; + */ + protected $color = null; + /** + * Required. The action to perform when a user clicks the button, such as + * opening a hyperlink or running a custom function. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 4; + */ + protected $on_click = null; + /** + * If `true`, the button is displayed in an inactive state and doesn't respond + * to user actions. + * + * Generated from protobuf field bool disabled = 5; + */ + protected $disabled = false; + /** + * The alternative text that's used for accessibility. + * Set descriptive text that lets users know what the button does. For + * example, if a button opens a hyperlink, you might write: "Opens a new + * browser tab and navigates to the Google Chat developer documentation at + * https://developers.google.com/workspace/chat". + * + * Generated from protobuf field string alt_text = 6; + */ + protected $alt_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The text displayed inside the button. + * @type \Google\Apps\Card\V1\Icon $icon + * The icon image. If both `icon` and `text` are set, then the icon appears + * before the text. + * @type \Google\Type\Color $color + * If set, the button is filled with a solid background color and the font + * color changes to maintain contrast with the background color. For example, + * setting a blue background likely results in white text. + * If unset, the image background is white and the font color is blue. + * For red, green, and blue, the value of each field is a `float` number that + * you can express in either of two ways: as a number between 0 and 255 + * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents + * the absence of a color and 1 or 255/255 represent the full presence of that + * color on the RGB scale. + * Optionally set `alpha`, which sets a level of transparency using this + * equation: + * ``` + * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * ``` + * For `alpha`, a value of `1` corresponds with a solid color, and a value of + * `0` corresponds with a completely transparent color. + * For example, the following color represents a half transparent red: + * ``` + * "color": { + * "red": 1, + * "green": 0, + * "blue": 0, + * "alpha": 0.5 + * } + * ``` + * @type \Google\Apps\Card\V1\OnClick $on_click + * Required. The action to perform when a user clicks the button, such as + * opening a hyperlink or running a custom function. + * @type bool $disabled + * If `true`, the button is displayed in an inactive state and doesn't respond + * to user actions. + * @type string $alt_text + * The alternative text that's used for accessibility. + * Set descriptive text that lets users know what the button does. For + * example, if a button opens a hyperlink, you might write: "Opens a new + * browser tab and navigates to the Google Chat developer documentation at + * https://developers.google.com/workspace/chat". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The text displayed inside the button. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The text displayed inside the button. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * The icon image. If both `icon` and `text` are set, then the icon appears + * before the text. + * + * Generated from protobuf field .google.apps.card.v1.Icon icon = 2; + * @return \Google\Apps\Card\V1\Icon|null + */ + public function getIcon() + { + return $this->icon; + } + + public function hasIcon() + { + return isset($this->icon); + } + + public function clearIcon() + { + unset($this->icon); + } + + /** + * The icon image. If both `icon` and `text` are set, then the icon appears + * before the text. + * + * Generated from protobuf field .google.apps.card.v1.Icon icon = 2; + * @param \Google\Apps\Card\V1\Icon $var + * @return $this + */ + public function setIcon($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Icon::class); + $this->icon = $var; + + return $this; + } + + /** + * If set, the button is filled with a solid background color and the font + * color changes to maintain contrast with the background color. For example, + * setting a blue background likely results in white text. + * If unset, the image background is white and the font color is blue. + * For red, green, and blue, the value of each field is a `float` number that + * you can express in either of two ways: as a number between 0 and 255 + * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents + * the absence of a color and 1 or 255/255 represent the full presence of that + * color on the RGB scale. + * Optionally set `alpha`, which sets a level of transparency using this + * equation: + * ``` + * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * ``` + * For `alpha`, a value of `1` corresponds with a solid color, and a value of + * `0` corresponds with a completely transparent color. + * For example, the following color represents a half transparent red: + * ``` + * "color": { + * "red": 1, + * "green": 0, + * "blue": 0, + * "alpha": 0.5 + * } + * ``` + * + * Generated from protobuf field .google.type.Color color = 3; + * @return \Google\Type\Color|null + */ + public function getColor() + { + return $this->color; + } + + public function hasColor() + { + return isset($this->color); + } + + public function clearColor() + { + unset($this->color); + } + + /** + * If set, the button is filled with a solid background color and the font + * color changes to maintain contrast with the background color. For example, + * setting a blue background likely results in white text. + * If unset, the image background is white and the font color is blue. + * For red, green, and blue, the value of each field is a `float` number that + * you can express in either of two ways: as a number between 0 and 255 + * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents + * the absence of a color and 1 or 255/255 represent the full presence of that + * color on the RGB scale. + * Optionally set `alpha`, which sets a level of transparency using this + * equation: + * ``` + * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) + * ``` + * For `alpha`, a value of `1` corresponds with a solid color, and a value of + * `0` corresponds with a completely transparent color. + * For example, the following color represents a half transparent red: + * ``` + * "color": { + * "red": 1, + * "green": 0, + * "blue": 0, + * "alpha": 0.5 + * } + * ``` + * + * Generated from protobuf field .google.type.Color color = 3; + * @param \Google\Type\Color $var + * @return $this + */ + public function setColor($var) + { + GPBUtil::checkMessage($var, \Google\Type\Color::class); + $this->color = $var; + + return $this; + } + + /** + * Required. The action to perform when a user clicks the button, such as + * opening a hyperlink or running a custom function. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 4; + * @return \Google\Apps\Card\V1\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * Required. The action to perform when a user clicks the button, such as + * opening a hyperlink or running a custom function. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 4; + * @param \Google\Apps\Card\V1\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); + $this->on_click = $var; + + return $this; + } + + /** + * If `true`, the button is displayed in an inactive state and doesn't respond + * to user actions. + * + * Generated from protobuf field bool disabled = 5; + * @return bool + */ + public function getDisabled() + { + return $this->disabled; + } + + /** + * If `true`, the button is displayed in an inactive state and doesn't respond + * to user actions. + * + * Generated from protobuf field bool disabled = 5; + * @param bool $var + * @return $this + */ + public function setDisabled($var) + { + GPBUtil::checkBool($var); + $this->disabled = $var; + + return $this; + } + + /** + * The alternative text that's used for accessibility. + * Set descriptive text that lets users know what the button does. For + * example, if a button opens a hyperlink, you might write: "Opens a new + * browser tab and navigates to the Google Chat developer documentation at + * https://developers.google.com/workspace/chat". + * + * Generated from protobuf field string alt_text = 6; + * @return string + */ + public function getAltText() + { + return $this->alt_text; + } + + /** + * The alternative text that's used for accessibility. + * Set descriptive text that lets users know what the button does. For + * example, if a button opens a hyperlink, you might write: "Opens a new + * browser tab and navigates to the Google Chat developer documentation at + * https://developers.google.com/workspace/chat". + * + * Generated from protobuf field string alt_text = 6; + * @param string $var + * @return $this + */ + public function setAltText($var) + { + GPBUtil::checkString($var, True); + $this->alt_text = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ButtonList.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ButtonList.php new file mode 100644 index 000000000000..10b74b56debe --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ButtonList.php @@ -0,0 +1,72 @@ +google.apps.card.v1.ButtonList + */ +class ButtonList extends \Google\Protobuf\Internal\Message +{ + /** + * An array of buttons. + * + * Generated from protobuf field repeated .google.apps.card.v1.Button buttons = 1; + */ + private $buttons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Card\V1\Button>|\Google\Protobuf\Internal\RepeatedField $buttons + * An array of buttons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * An array of buttons. + * + * Generated from protobuf field repeated .google.apps.card.v1.Button buttons = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getButtons() + { + return $this->buttons; + } + + /** + * An array of buttons. + * + * Generated from protobuf field repeated .google.apps.card.v1.Button buttons = 1; + * @param array<\Google\Apps\Card\V1\Button>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setButtons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Button::class); + $this->buttons = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card.php new file mode 100644 index 000000000000..75ffe057a2b8 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card.php @@ -0,0 +1,638 @@ +Online" + * } + * }, + * { + * "decoratedText": { + * "startIcon": { + * "knownIcon": "PHONE" + * }, + * "text": "+1 (555) 555-1234" + * } + * }, + * { + * "buttonList": { + * "buttons": [ + * { + * "text": "Share", + * "onClick": { + * "openLink": { + * "url": "https://example.com/share" + * } + * } + * }, + * { + * "text": "Edit", + * "onClick": { + * "action": { + * "function": "goToView", + * "parameters": [ + * { + * "key": "viewType", + * "value": "EDIT" + * } + * ] + * } + * } + * } + * ] + * } + * } + * ] + * } + * ] + * } + * } + * ] + * } + * ``` + * + * Generated from protobuf message google.apps.card.v1.Card + */ +class Card extends \Google\Protobuf\Internal\Message +{ + /** + * The header of the card. A header usually contains a leading image and a + * title. Headers always appear at the top of a card. + * + * Generated from protobuf field .google.apps.card.v1.Card.CardHeader header = 1; + */ + protected $header = null; + /** + * Contains a collection of widgets. Each section has its own, optional + * header. Sections are visually separated by a line divider. For an example + * in Google Chat apps, see [Define a section of a + * card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). + * + * Generated from protobuf field repeated .google.apps.card.v1.Card.Section sections = 2; + */ + private $sections; + /** + * The divider style between sections. + * + * Generated from protobuf field .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; + */ + protected $section_divider_style = 0; + /** + * The card's actions. Actions are added to the card's toolbar menu. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * For example, the following JSON constructs a card action menu with + * `Settings` and `Send Feedback` options: + * ``` + * "card_actions": [ + * { + * "actionLabel": "Settings", + * "onClick": { + * "action": { + * "functionName": "goToView", + * "parameters": [ + * { + * "key": "viewType", + * "value": "SETTING" + * } + * ], + * "loadIndicator": "LoadIndicator.SPINNER" + * } + * } + * }, + * { + * "actionLabel": "Send Feedback", + * "onClick": { + * "openLink": { + * "url": "https://example.com/feedback" + * } + * } + * } + * ] + * ``` + * + * Generated from protobuf field repeated .google.apps.card.v1.Card.CardAction card_actions = 3; + */ + private $card_actions; + /** + * Name of the card. Used as a card identifier in card navigation. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + /** + * The fixed footer shown at the bottom of this card. + * Setting `fixedFooter` without specifying a `primaryButton` or a + * `secondaryButton` causes an error. For Chat apps, you can use fixed footers + * in + * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not + * [card + * messages](https://developers.google.com/workspace/chat/create-messages#create). + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5; + */ + protected $fixed_footer = null; + /** + * In Google Workspace Add-ons, sets the display properties of the + * `peekCardHeader`. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card.DisplayStyle display_style = 6; + */ + protected $display_style = 0; + /** + * When displaying contextual content, the peek card header acts as a + * placeholder so that the user can navigate forward between the homepage + * cards and the contextual cards. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card.CardHeader peek_card_header = 7; + */ + protected $peek_card_header = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\Card\CardHeader $header + * The header of the card. A header usually contains a leading image and a + * title. Headers always appear at the top of a card. + * @type array<\Google\Apps\Card\V1\Card\Section>|\Google\Protobuf\Internal\RepeatedField $sections + * Contains a collection of widgets. Each section has its own, optional + * header. Sections are visually separated by a line divider. For an example + * in Google Chat apps, see [Define a section of a + * card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). + * @type int $section_divider_style + * The divider style between sections. + * @type array<\Google\Apps\Card\V1\Card\CardAction>|\Google\Protobuf\Internal\RepeatedField $card_actions + * The card's actions. Actions are added to the card's toolbar menu. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * For example, the following JSON constructs a card action menu with + * `Settings` and `Send Feedback` options: + * ``` + * "card_actions": [ + * { + * "actionLabel": "Settings", + * "onClick": { + * "action": { + * "functionName": "goToView", + * "parameters": [ + * { + * "key": "viewType", + * "value": "SETTING" + * } + * ], + * "loadIndicator": "LoadIndicator.SPINNER" + * } + * } + * }, + * { + * "actionLabel": "Send Feedback", + * "onClick": { + * "openLink": { + * "url": "https://example.com/feedback" + * } + * } + * } + * ] + * ``` + * @type string $name + * Name of the card. Used as a card identifier in card navigation. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * @type \Google\Apps\Card\V1\Card\CardFixedFooter $fixed_footer + * The fixed footer shown at the bottom of this card. + * Setting `fixedFooter` without specifying a `primaryButton` or a + * `secondaryButton` causes an error. For Chat apps, you can use fixed footers + * in + * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not + * [card + * messages](https://developers.google.com/workspace/chat/create-messages#create). + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * @type int $display_style + * In Google Workspace Add-ons, sets the display properties of the + * `peekCardHeader`. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * @type \Google\Apps\Card\V1\Card\CardHeader $peek_card_header + * When displaying contextual content, the peek card header acts as a + * placeholder so that the user can navigate forward between the homepage + * cards and the contextual cards. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The header of the card. A header usually contains a leading image and a + * title. Headers always appear at the top of a card. + * + * Generated from protobuf field .google.apps.card.v1.Card.CardHeader header = 1; + * @return \Google\Apps\Card\V1\Card\CardHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * The header of the card. A header usually contains a leading image and a + * title. Headers always appear at the top of a card. + * + * Generated from protobuf field .google.apps.card.v1.Card.CardHeader header = 1; + * @param \Google\Apps\Card\V1\Card\CardHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card\CardHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Contains a collection of widgets. Each section has its own, optional + * header. Sections are visually separated by a line divider. For an example + * in Google Chat apps, see [Define a section of a + * card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). + * + * Generated from protobuf field repeated .google.apps.card.v1.Card.Section sections = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSections() + { + return $this->sections; + } + + /** + * Contains a collection of widgets. Each section has its own, optional + * header. Sections are visually separated by a line divider. For an example + * in Google Chat apps, see [Define a section of a + * card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). + * + * Generated from protobuf field repeated .google.apps.card.v1.Card.Section sections = 2; + * @param array<\Google\Apps\Card\V1\Card\Section>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Card\Section::class); + $this->sections = $arr; + + return $this; + } + + /** + * The divider style between sections. + * + * Generated from protobuf field .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; + * @return int + */ + public function getSectionDividerStyle() + { + return $this->section_divider_style; + } + + /** + * The divider style between sections. + * + * Generated from protobuf field .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; + * @param int $var + * @return $this + */ + public function setSectionDividerStyle($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Card\DividerStyle::class); + $this->section_divider_style = $var; + + return $this; + } + + /** + * The card's actions. Actions are added to the card's toolbar menu. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * For example, the following JSON constructs a card action menu with + * `Settings` and `Send Feedback` options: + * ``` + * "card_actions": [ + * { + * "actionLabel": "Settings", + * "onClick": { + * "action": { + * "functionName": "goToView", + * "parameters": [ + * { + * "key": "viewType", + * "value": "SETTING" + * } + * ], + * "loadIndicator": "LoadIndicator.SPINNER" + * } + * } + * }, + * { + * "actionLabel": "Send Feedback", + * "onClick": { + * "openLink": { + * "url": "https://example.com/feedback" + * } + * } + * } + * ] + * ``` + * + * Generated from protobuf field repeated .google.apps.card.v1.Card.CardAction card_actions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCardActions() + { + return $this->card_actions; + } + + /** + * The card's actions. Actions are added to the card's toolbar menu. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * For example, the following JSON constructs a card action menu with + * `Settings` and `Send Feedback` options: + * ``` + * "card_actions": [ + * { + * "actionLabel": "Settings", + * "onClick": { + * "action": { + * "functionName": "goToView", + * "parameters": [ + * { + * "key": "viewType", + * "value": "SETTING" + * } + * ], + * "loadIndicator": "LoadIndicator.SPINNER" + * } + * } + * }, + * { + * "actionLabel": "Send Feedback", + * "onClick": { + * "openLink": { + * "url": "https://example.com/feedback" + * } + * } + * } + * ] + * ``` + * + * Generated from protobuf field repeated .google.apps.card.v1.Card.CardAction card_actions = 3; + * @param array<\Google\Apps\Card\V1\Card\CardAction>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCardActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Card\CardAction::class); + $this->card_actions = $arr; + + return $this; + } + + /** + * Name of the card. Used as a card identifier in card navigation. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the card. Used as a card identifier in card navigation. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The fixed footer shown at the bottom of this card. + * Setting `fixedFooter` without specifying a `primaryButton` or a + * `secondaryButton` causes an error. For Chat apps, you can use fixed footers + * in + * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not + * [card + * messages](https://developers.google.com/workspace/chat/create-messages#create). + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5; + * @return \Google\Apps\Card\V1\Card\CardFixedFooter|null + */ + public function getFixedFooter() + { + return $this->fixed_footer; + } + + public function hasFixedFooter() + { + return isset($this->fixed_footer); + } + + public function clearFixedFooter() + { + unset($this->fixed_footer); + } + + /** + * The fixed footer shown at the bottom of this card. + * Setting `fixedFooter` without specifying a `primaryButton` or a + * `secondaryButton` causes an error. For Chat apps, you can use fixed footers + * in + * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not + * [card + * messages](https://developers.google.com/workspace/chat/create-messages#create). + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5; + * @param \Google\Apps\Card\V1\Card\CardFixedFooter $var + * @return $this + */ + public function setFixedFooter($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card\CardFixedFooter::class); + $this->fixed_footer = $var; + + return $this; + } + + /** + * In Google Workspace Add-ons, sets the display properties of the + * `peekCardHeader`. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card.DisplayStyle display_style = 6; + * @return int + */ + public function getDisplayStyle() + { + return $this->display_style; + } + + /** + * In Google Workspace Add-ons, sets the display properties of the + * `peekCardHeader`. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card.DisplayStyle display_style = 6; + * @param int $var + * @return $this + */ + public function setDisplayStyle($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Card\DisplayStyle::class); + $this->display_style = $var; + + return $this; + } + + /** + * When displaying contextual content, the peek card header acts as a + * placeholder so that the user can navigate forward between the homepage + * cards and the contextual cards. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card.CardHeader peek_card_header = 7; + * @return \Google\Apps\Card\V1\Card\CardHeader|null + */ + public function getPeekCardHeader() + { + return $this->peek_card_header; + } + + public function hasPeekCardHeader() + { + return isset($this->peek_card_header); + } + + public function clearPeekCardHeader() + { + unset($this->peek_card_header); + } + + /** + * When displaying contextual content, the peek card header acts as a + * placeholder so that the user can navigate forward between the homepage + * cards and the contextual cards. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card.CardHeader peek_card_header = 7; + * @param \Google\Apps\Card\V1\Card\CardHeader $var + * @return $this + */ + public function setPeekCardHeader($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card\CardHeader::class); + $this->peek_card_header = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardAction.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardAction.php new file mode 100644 index 000000000000..f5aa428beae4 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardAction.php @@ -0,0 +1,118 @@ +google.apps.card.v1.Card.CardAction + */ +class CardAction extends \Google\Protobuf\Internal\Message +{ + /** + * The label that displays as the action menu item. + * + * Generated from protobuf field string action_label = 1; + */ + protected $action_label = ''; + /** + * The `onClick` action for this action item. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; + */ + protected $on_click = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $action_label + * The label that displays as the action menu item. + * @type \Google\Apps\Card\V1\OnClick $on_click + * The `onClick` action for this action item. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The label that displays as the action menu item. + * + * Generated from protobuf field string action_label = 1; + * @return string + */ + public function getActionLabel() + { + return $this->action_label; + } + + /** + * The label that displays as the action menu item. + * + * Generated from protobuf field string action_label = 1; + * @param string $var + * @return $this + */ + public function setActionLabel($var) + { + GPBUtil::checkString($var, True); + $this->action_label = $var; + + return $this; + } + + /** + * The `onClick` action for this action item. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; + * @return \Google\Apps\Card\V1\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * The `onClick` action for this action item. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; + * @param \Google\Apps\Card\V1\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); + $this->on_click = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CardAction::class, \Google\Apps\Card\V1\Card_CardAction::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardFixedFooter.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardFixedFooter.php new file mode 100644 index 000000000000..533e532eec85 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardFixedFooter.php @@ -0,0 +1,146 @@ +google.apps.card.v1.Card.CardFixedFooter + */ +class CardFixedFooter extends \Google\Protobuf\Internal\Message +{ + /** + * The primary button of the fixed footer. The button must be a text button + * with text and color set. + * + * Generated from protobuf field .google.apps.card.v1.Button primary_button = 1; + */ + protected $primary_button = null; + /** + * The secondary button of the fixed footer. The button must be a text + * button with text and color set. + * If `secondaryButton` is set, you must also set `primaryButton`. + * + * Generated from protobuf field .google.apps.card.v1.Button secondary_button = 2; + */ + protected $secondary_button = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\Button $primary_button + * The primary button of the fixed footer. The button must be a text button + * with text and color set. + * @type \Google\Apps\Card\V1\Button $secondary_button + * The secondary button of the fixed footer. The button must be a text + * button with text and color set. + * If `secondaryButton` is set, you must also set `primaryButton`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The primary button of the fixed footer. The button must be a text button + * with text and color set. + * + * Generated from protobuf field .google.apps.card.v1.Button primary_button = 1; + * @return \Google\Apps\Card\V1\Button|null + */ + public function getPrimaryButton() + { + return $this->primary_button; + } + + public function hasPrimaryButton() + { + return isset($this->primary_button); + } + + public function clearPrimaryButton() + { + unset($this->primary_button); + } + + /** + * The primary button of the fixed footer. The button must be a text button + * with text and color set. + * + * Generated from protobuf field .google.apps.card.v1.Button primary_button = 1; + * @param \Google\Apps\Card\V1\Button $var + * @return $this + */ + public function setPrimaryButton($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Button::class); + $this->primary_button = $var; + + return $this; + } + + /** + * The secondary button of the fixed footer. The button must be a text + * button with text and color set. + * If `secondaryButton` is set, you must also set `primaryButton`. + * + * Generated from protobuf field .google.apps.card.v1.Button secondary_button = 2; + * @return \Google\Apps\Card\V1\Button|null + */ + public function getSecondaryButton() + { + return $this->secondary_button; + } + + public function hasSecondaryButton() + { + return isset($this->secondary_button); + } + + public function clearSecondaryButton() + { + unset($this->secondary_button); + } + + /** + * The secondary button of the fixed footer. The button must be a text + * button with text and color set. + * If `secondaryButton` is set, you must also set `primaryButton`. + * + * Generated from protobuf field .google.apps.card.v1.Button secondary_button = 2; + * @param \Google\Apps\Card\V1\Button $var + * @return $this + */ + public function setSecondaryButton($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Button::class); + $this->secondary_button = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CardFixedFooter::class, \Google\Apps\Card\V1\Card_CardFixedFooter::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardHeader.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardHeader.php new file mode 100644 index 000000000000..9ebae5225130 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardHeader.php @@ -0,0 +1,233 @@ +google.apps.card.v1.Card.CardHeader + */ +class CardHeader extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The title of the card header. + * The header has a fixed height: if both a + * title and subtitle are specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * + * Generated from protobuf field string title = 1; + */ + protected $title = ''; + /** + * The subtitle of the card header. If specified, appears on its own line + * below the `title`. + * + * Generated from protobuf field string subtitle = 2; + */ + protected $subtitle = ''; + /** + * The shape used to crop the image. + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 3; + */ + protected $image_type = 0; + /** + * The HTTPS URL of the image in the card header. + * + * Generated from protobuf field string image_url = 4; + */ + protected $image_url = ''; + /** + * The alternative text of this image that's used for accessibility. + * + * Generated from protobuf field string image_alt_text = 5; + */ + protected $image_alt_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * Required. The title of the card header. + * The header has a fixed height: if both a + * title and subtitle are specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * @type string $subtitle + * The subtitle of the card header. If specified, appears on its own line + * below the `title`. + * @type int $image_type + * The shape used to crop the image. + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * @type string $image_url + * The HTTPS URL of the image in the card header. + * @type string $image_alt_text + * The alternative text of this image that's used for accessibility. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * Required. The title of the card header. + * The header has a fixed height: if both a + * title and subtitle are specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * + * Generated from protobuf field string title = 1; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Required. The title of the card header. + * The header has a fixed height: if both a + * title and subtitle are specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * + * Generated from protobuf field string title = 1; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * The subtitle of the card header. If specified, appears on its own line + * below the `title`. + * + * Generated from protobuf field string subtitle = 2; + * @return string + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * The subtitle of the card header. If specified, appears on its own line + * below the `title`. + * + * Generated from protobuf field string subtitle = 2; + * @param string $var + * @return $this + */ + public function setSubtitle($var) + { + GPBUtil::checkString($var, True); + $this->subtitle = $var; + + return $this; + } + + /** + * The shape used to crop the image. + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 3; + * @return int + */ + public function getImageType() + { + return $this->image_type; + } + + /** + * The shape used to crop the image. + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 3; + * @param int $var + * @return $this + */ + public function setImageType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\ImageType::class); + $this->image_type = $var; + + return $this; + } + + /** + * The HTTPS URL of the image in the card header. + * + * Generated from protobuf field string image_url = 4; + * @return string + */ + public function getImageUrl() + { + return $this->image_url; + } + + /** + * The HTTPS URL of the image in the card header. + * + * Generated from protobuf field string image_url = 4; + * @param string $var + * @return $this + */ + public function setImageUrl($var) + { + GPBUtil::checkString($var, True); + $this->image_url = $var; + + return $this; + } + + /** + * The alternative text of this image that's used for accessibility. + * + * Generated from protobuf field string image_alt_text = 5; + * @return string + */ + public function getImageAltText() + { + return $this->image_alt_text; + } + + /** + * The alternative text of this image that's used for accessibility. + * + * Generated from protobuf field string image_alt_text = 5; + * @param string $var + * @return $this + */ + public function setImageAltText($var) + { + GPBUtil::checkString($var, True); + $this->image_alt_text = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CardHeader::class, \Google\Apps\Card\V1\Card_CardHeader::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DisplayStyle.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DisplayStyle.php new file mode 100644 index 000000000000..6b00f8d7bf7f --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DisplayStyle.php @@ -0,0 +1,71 @@ +google.apps.card.v1.Card.DisplayStyle + */ +class DisplayStyle +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum DISPLAY_STYLE_UNSPECIFIED = 0; + */ + const DISPLAY_STYLE_UNSPECIFIED = 0; + /** + * The header of the card appears at the bottom of the + * sidebar, partially covering the current top card of the stack. Clicking + * the header pops the card into the card stack. If the card has no header, + * a generated header is used instead. + * + * Generated from protobuf enum PEEK = 1; + */ + const PEEK = 1; + /** + * Default value. The card is shown by replacing the view of the top card in + * the card stack. + * + * Generated from protobuf enum REPLACE = 2; + */ + const REPLACE = 2; + + private static $valueToName = [ + self::DISPLAY_STYLE_UNSPECIFIED => 'DISPLAY_STYLE_UNSPECIFIED', + self::PEEK => 'PEEK', + self::REPLACE => 'REPLACE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DisplayStyle::class, \Google\Apps\Card\V1\Card_DisplayStyle::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DividerStyle.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DividerStyle.php new file mode 100644 index 000000000000..b2ff24d3caf4 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DividerStyle.php @@ -0,0 +1,67 @@ +google.apps.card.v1.Card.DividerStyle + */ +class DividerStyle +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum DIVIDER_STYLE_UNSPECIFIED = 0; + */ + const DIVIDER_STYLE_UNSPECIFIED = 0; + /** + * Default option. Render a solid divider between sections. + * + * Generated from protobuf enum SOLID_DIVIDER = 1; + */ + const SOLID_DIVIDER = 1; + /** + * If set, no divider is rendered between sections. + * + * Generated from protobuf enum NO_DIVIDER = 2; + */ + const NO_DIVIDER = 2; + + private static $valueToName = [ + self::DIVIDER_STYLE_UNSPECIFIED => 'DIVIDER_STYLE_UNSPECIFIED', + self::SOLID_DIVIDER => 'SOLID_DIVIDER', + self::NO_DIVIDER => 'NO_DIVIDER', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DividerStyle::class, \Google\Apps\Card\V1\Card_DividerStyle::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/Section.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/Section.php new file mode 100644 index 000000000000..4a737f780527 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/Section.php @@ -0,0 +1,255 @@ +google.apps.card.v1.Card.Section + */ +class Section extends \Google\Protobuf\Internal\Message +{ + /** + * Text that appears at the top of a section. + * Supports simple HTML formatted text. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string header = 1; + */ + protected $header = ''; + /** + * All the widgets in the section. + * Must contain at least one widget. + * + * Generated from protobuf field repeated .google.apps.card.v1.Widget widgets = 2; + */ + private $widgets; + /** + * Indicates whether this section is collapsible. + * Collapsible sections hide some or all widgets, but users can expand the + * section to reveal the hidden widgets by clicking **Show more**. Users + * can hide the widgets again by clicking **Show less**. + * To determine which widgets are hidden, specify + * `uncollapsibleWidgetsCount`. + * + * Generated from protobuf field bool collapsible = 5; + */ + protected $collapsible = false; + /** + * The number of uncollapsible widgets which remain visible even when a + * section is collapsed. + * For example, when a section + * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, + * the first two widgets are always shown and the last three are collapsed + * by default. The `uncollapsibleWidgetsCount` is taken into account only + * when `collapsible` is `true`. + * + * Generated from protobuf field int32 uncollapsible_widgets_count = 6; + */ + protected $uncollapsible_widgets_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $header + * Text that appears at the top of a section. + * Supports simple HTML formatted text. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * @type array<\Google\Apps\Card\V1\Widget>|\Google\Protobuf\Internal\RepeatedField $widgets + * All the widgets in the section. + * Must contain at least one widget. + * @type bool $collapsible + * Indicates whether this section is collapsible. + * Collapsible sections hide some or all widgets, but users can expand the + * section to reveal the hidden widgets by clicking **Show more**. Users + * can hide the widgets again by clicking **Show less**. + * To determine which widgets are hidden, specify + * `uncollapsibleWidgetsCount`. + * @type int $uncollapsible_widgets_count + * The number of uncollapsible widgets which remain visible even when a + * section is collapsed. + * For example, when a section + * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, + * the first two widgets are always shown and the last three are collapsed + * by default. The `uncollapsibleWidgetsCount` is taken into account only + * when `collapsible` is `true`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * Text that appears at the top of a section. + * Supports simple HTML formatted text. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string header = 1; + * @return string + */ + public function getHeader() + { + return $this->header; + } + + /** + * Text that appears at the top of a section. + * Supports simple HTML formatted text. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string header = 1; + * @param string $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkString($var, True); + $this->header = $var; + + return $this; + } + + /** + * All the widgets in the section. + * Must contain at least one widget. + * + * Generated from protobuf field repeated .google.apps.card.v1.Widget widgets = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWidgets() + { + return $this->widgets; + } + + /** + * All the widgets in the section. + * Must contain at least one widget. + * + * Generated from protobuf field repeated .google.apps.card.v1.Widget widgets = 2; + * @param array<\Google\Apps\Card\V1\Widget>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWidgets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Widget::class); + $this->widgets = $arr; + + return $this; + } + + /** + * Indicates whether this section is collapsible. + * Collapsible sections hide some or all widgets, but users can expand the + * section to reveal the hidden widgets by clicking **Show more**. Users + * can hide the widgets again by clicking **Show less**. + * To determine which widgets are hidden, specify + * `uncollapsibleWidgetsCount`. + * + * Generated from protobuf field bool collapsible = 5; + * @return bool + */ + public function getCollapsible() + { + return $this->collapsible; + } + + /** + * Indicates whether this section is collapsible. + * Collapsible sections hide some or all widgets, but users can expand the + * section to reveal the hidden widgets by clicking **Show more**. Users + * can hide the widgets again by clicking **Show less**. + * To determine which widgets are hidden, specify + * `uncollapsibleWidgetsCount`. + * + * Generated from protobuf field bool collapsible = 5; + * @param bool $var + * @return $this + */ + public function setCollapsible($var) + { + GPBUtil::checkBool($var); + $this->collapsible = $var; + + return $this; + } + + /** + * The number of uncollapsible widgets which remain visible even when a + * section is collapsed. + * For example, when a section + * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, + * the first two widgets are always shown and the last three are collapsed + * by default. The `uncollapsibleWidgetsCount` is taken into account only + * when `collapsible` is `true`. + * + * Generated from protobuf field int32 uncollapsible_widgets_count = 6; + * @return int + */ + public function getUncollapsibleWidgetsCount() + { + return $this->uncollapsible_widgets_count; + } + + /** + * The number of uncollapsible widgets which remain visible even when a + * section is collapsed. + * For example, when a section + * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, + * the first two widgets are always shown and the last three are collapsed + * by default. The `uncollapsibleWidgetsCount` is taken into account only + * when `collapsible` is `true`. + * + * Generated from protobuf field int32 uncollapsible_widgets_count = 6; + * @param int $var + * @return $this + */ + public function setUncollapsibleWidgetsCount($var) + { + GPBUtil::checkInt32($var); + $this->uncollapsible_widgets_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Section::class, \Google\Apps\Card\V1\Card_Section::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns.php new file mode 100644 index 000000000000..f2e8cff1b175 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns.php @@ -0,0 +1,91 @@ +google.apps.card.v1.Columns + */ +class Columns extends \Google\Protobuf\Internal\Message +{ + /** + * An array of columns. You can include up to 2 columns in a card or dialog. + * + * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column column_items = 2; + */ + private $column_items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Card\V1\Columns\Column>|\Google\Protobuf\Internal\RepeatedField $column_items + * An array of columns. You can include up to 2 columns in a card or dialog. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * An array of columns. You can include up to 2 columns in a card or dialog. + * + * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column column_items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getColumnItems() + { + return $this->column_items; + } + + /** + * An array of columns. You can include up to 2 columns in a card or dialog. + * + * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column column_items = 2; + * @param array<\Google\Apps\Card\V1\Columns\Column>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setColumnItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Columns\Column::class); + $this->column_items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column.php new file mode 100644 index 000000000000..3b58fdef7751 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column.php @@ -0,0 +1,188 @@ +google.apps.card.v1.Columns.Column + */ +class Column extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies how a column fills the width of the card. + * + * Generated from protobuf field .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1; + */ + protected $horizontal_size_style = 0; + /** + * Specifies whether widgets align to the left, right, or center of a + * column. + * + * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2; + */ + protected $horizontal_alignment = 0; + /** + * Specifies whether widgets align to the top, bottom, or center of a + * column. + * + * Generated from protobuf field .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3; + */ + protected $vertical_alignment = 0; + /** + * An array of widgets included in a column. Widgets appear in the order + * that they are specified. + * + * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4; + */ + private $widgets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $horizontal_size_style + * Specifies how a column fills the width of the card. + * @type int $horizontal_alignment + * Specifies whether widgets align to the left, right, or center of a + * column. + * @type int $vertical_alignment + * Specifies whether widgets align to the top, bottom, or center of a + * column. + * @type array<\Google\Apps\Card\V1\Columns\Column\Widgets>|\Google\Protobuf\Internal\RepeatedField $widgets + * An array of widgets included in a column. Widgets appear in the order + * that they are specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * Specifies how a column fills the width of the card. + * + * Generated from protobuf field .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1; + * @return int + */ + public function getHorizontalSizeStyle() + { + return $this->horizontal_size_style; + } + + /** + * Specifies how a column fills the width of the card. + * + * Generated from protobuf field .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1; + * @param int $var + * @return $this + */ + public function setHorizontalSizeStyle($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Columns\Column\HorizontalSizeStyle::class); + $this->horizontal_size_style = $var; + + return $this; + } + + /** + * Specifies whether widgets align to the left, right, or center of a + * column. + * + * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2; + * @return int + */ + public function getHorizontalAlignment() + { + return $this->horizontal_alignment; + } + + /** + * Specifies whether widgets align to the left, right, or center of a + * column. + * + * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2; + * @param int $var + * @return $this + */ + public function setHorizontalAlignment($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\HorizontalAlignment::class); + $this->horizontal_alignment = $var; + + return $this; + } + + /** + * Specifies whether widgets align to the top, bottom, or center of a + * column. + * + * Generated from protobuf field .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3; + * @return int + */ + public function getVerticalAlignment() + { + return $this->vertical_alignment; + } + + /** + * Specifies whether widgets align to the top, bottom, or center of a + * column. + * + * Generated from protobuf field .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3; + * @param int $var + * @return $this + */ + public function setVerticalAlignment($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Columns\Column\VerticalAlignment::class); + $this->vertical_alignment = $var; + + return $this; + } + + /** + * An array of widgets included in a column. Widgets appear in the order + * that they are specified. + * + * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWidgets() + { + return $this->widgets; + } + + /** + * An array of widgets included in a column. Widgets appear in the order + * that they are specified. + * + * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4; + * @param array<\Google\Apps\Card\V1\Columns\Column\Widgets>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWidgets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Columns\Column\Widgets::class); + $this->widgets = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Column::class, \Google\Apps\Card\V1\Columns_Column::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/HorizontalSizeStyle.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/HorizontalSizeStyle.php new file mode 100644 index 000000000000..f6e8683abc05 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/HorizontalSizeStyle.php @@ -0,0 +1,73 @@ +google.apps.card.v1.Columns.Column.HorizontalSizeStyle + */ +class HorizontalSizeStyle +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0; + */ + const HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0; + /** + * Default value. Column fills the available space, up to 70% of the + * card's width. If both columns are set to `FILL_AVAILABLE_SPACE`, each + * column fills 50% of the space. + * + * Generated from protobuf enum FILL_AVAILABLE_SPACE = 1; + */ + const FILL_AVAILABLE_SPACE = 1; + /** + * Column fills the least amount of space possible and no more than 30% of + * the card's width. + * + * Generated from protobuf enum FILL_MINIMUM_SPACE = 2; + */ + const FILL_MINIMUM_SPACE = 2; + + private static $valueToName = [ + self::HORIZONTAL_SIZE_STYLE_UNSPECIFIED => 'HORIZONTAL_SIZE_STYLE_UNSPECIFIED', + self::FILL_AVAILABLE_SPACE => 'FILL_AVAILABLE_SPACE', + self::FILL_MINIMUM_SPACE => 'FILL_MINIMUM_SPACE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HorizontalSizeStyle::class, \Google\Apps\Card\V1\Columns_Column_HorizontalSizeStyle::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/VerticalAlignment.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/VerticalAlignment.php new file mode 100644 index 000000000000..10e16d17fb44 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/VerticalAlignment.php @@ -0,0 +1,76 @@ +google.apps.card.v1.Columns.Column.VerticalAlignment + */ +class VerticalAlignment +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum VERTICAL_ALIGNMENT_UNSPECIFIED = 0; + */ + const VERTICAL_ALIGNMENT_UNSPECIFIED = 0; + /** + * Default value. Aligns widgets to the center of a column. + * + * Generated from protobuf enum CENTER = 1; + */ + const CENTER = 1; + /** + * Aligns widgets to the top of a column. + * + * Generated from protobuf enum TOP = 2; + */ + const TOP = 2; + /** + * Aligns widgets to the bottom of a column. + * + * Generated from protobuf enum BOTTOM = 3; + */ + const BOTTOM = 3; + + private static $valueToName = [ + self::VERTICAL_ALIGNMENT_UNSPECIFIED => 'VERTICAL_ALIGNMENT_UNSPECIFIED', + self::CENTER => 'CENTER', + self::TOP => 'TOP', + self::BOTTOM => 'BOTTOM', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(VerticalAlignment::class, \Google\Apps\Card\V1\Columns_Column_VerticalAlignment::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/Widgets.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/Widgets.php new file mode 100644 index 000000000000..5e2cecc1f34d --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/Widgets.php @@ -0,0 +1,280 @@ +google.apps.card.v1.Columns.Column.Widgets + */ +class Widgets extends \Google\Protobuf\Internal\Message +{ + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\TextParagraph $text_paragraph + * [TextParagraph][google.apps.card.v1.TextParagraph] widget. + * @type \Google\Apps\Card\V1\Image $image + * [Image][google.apps.card.v1.Image] widget. + * @type \Google\Apps\Card\V1\DecoratedText $decorated_text + * [DecoratedText][google.apps.card.v1.DecoratedText] widget. + * @type \Google\Apps\Card\V1\ButtonList $button_list + * [ButtonList][google.apps.card.v1.ButtonList] widget. + * @type \Google\Apps\Card\V1\TextInput $text_input + * [TextInput][google.apps.card.v1.TextInput] widget. + * @type \Google\Apps\Card\V1\SelectionInput $selection_input + * [SelectionInput][google.apps.card.v1.SelectionInput] widget. + * @type \Google\Apps\Card\V1\DateTimePicker $date_time_picker + * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * [TextParagraph][google.apps.card.v1.TextParagraph] widget. + * + * Generated from protobuf field .google.apps.card.v1.TextParagraph text_paragraph = 1; + * @return \Google\Apps\Card\V1\TextParagraph|null + */ + public function getTextParagraph() + { + return $this->readOneof(1); + } + + public function hasTextParagraph() + { + return $this->hasOneof(1); + } + + /** + * [TextParagraph][google.apps.card.v1.TextParagraph] widget. + * + * Generated from protobuf field .google.apps.card.v1.TextParagraph text_paragraph = 1; + * @param \Google\Apps\Card\V1\TextParagraph $var + * @return $this + */ + public function setTextParagraph($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\TextParagraph::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * [Image][google.apps.card.v1.Image] widget. + * + * Generated from protobuf field .google.apps.card.v1.Image image = 2; + * @return \Google\Apps\Card\V1\Image|null + */ + public function getImage() + { + return $this->readOneof(2); + } + + public function hasImage() + { + return $this->hasOneof(2); + } + + /** + * [Image][google.apps.card.v1.Image] widget. + * + * Generated from protobuf field .google.apps.card.v1.Image image = 2; + * @param \Google\Apps\Card\V1\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Image::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * [DecoratedText][google.apps.card.v1.DecoratedText] widget. + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText decorated_text = 3; + * @return \Google\Apps\Card\V1\DecoratedText|null + */ + public function getDecoratedText() + { + return $this->readOneof(3); + } + + public function hasDecoratedText() + { + return $this->hasOneof(3); + } + + /** + * [DecoratedText][google.apps.card.v1.DecoratedText] widget. + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText decorated_text = 3; + * @param \Google\Apps\Card\V1\DecoratedText $var + * @return $this + */ + public function setDecoratedText($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DecoratedText::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * [ButtonList][google.apps.card.v1.ButtonList] widget. + * + * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 4; + * @return \Google\Apps\Card\V1\ButtonList|null + */ + public function getButtonList() + { + return $this->readOneof(4); + } + + public function hasButtonList() + { + return $this->hasOneof(4); + } + + /** + * [ButtonList][google.apps.card.v1.ButtonList] widget. + * + * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 4; + * @param \Google\Apps\Card\V1\ButtonList $var + * @return $this + */ + public function setButtonList($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ButtonList::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * [TextInput][google.apps.card.v1.TextInput] widget. + * + * Generated from protobuf field .google.apps.card.v1.TextInput text_input = 5; + * @return \Google\Apps\Card\V1\TextInput|null + */ + public function getTextInput() + { + return $this->readOneof(5); + } + + public function hasTextInput() + { + return $this->hasOneof(5); + } + + /** + * [TextInput][google.apps.card.v1.TextInput] widget. + * + * Generated from protobuf field .google.apps.card.v1.TextInput text_input = 5; + * @param \Google\Apps\Card\V1\TextInput $var + * @return $this + */ + public function setTextInput($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\TextInput::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * [SelectionInput][google.apps.card.v1.SelectionInput] widget. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput selection_input = 6; + * @return \Google\Apps\Card\V1\SelectionInput|null + */ + public function getSelectionInput() + { + return $this->readOneof(6); + } + + public function hasSelectionInput() + { + return $this->hasOneof(6); + } + + /** + * [SelectionInput][google.apps.card.v1.SelectionInput] widget. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput selection_input = 6; + * @param \Google\Apps\Card\V1\SelectionInput $var + * @return $this + */ + public function setSelectionInput($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\SelectionInput::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget. + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker date_time_picker = 7; + * @return \Google\Apps\Card\V1\DateTimePicker|null + */ + public function getDateTimePicker() + { + return $this->readOneof(7); + } + + public function hasDateTimePicker() + { + return $this->hasOneof(7); + } + + /** + * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget. + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker date_time_picker = 7; + * @param \Google\Apps\Card\V1\DateTimePicker $var + * @return $this + */ + public function setDateTimePicker($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DateTimePicker::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Widgets::class, \Google\Apps\Card\V1\Columns_Column_Widgets::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker.php new file mode 100644 index 000000000000..324bcac7ae7c --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker.php @@ -0,0 +1,314 @@ +google.apps.card.v1.DateTimePicker + */ +class DateTimePicker extends \Google\Protobuf\Internal\Message +{ + /** + * The name by which the `DateTimePicker` is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The text that prompts users to input a date, a time, or a date and time. + * For example, if users are scheduling an appointment, use a label such as + * `Appointment date` or `Appointment date and time`. + * + * Generated from protobuf field string label = 2; + */ + protected $label = ''; + /** + * Whether the widget supports inputting a date, a time, or the date and time. + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3; + */ + protected $type = 0; + /** + * The default value displayed in the widget, in milliseconds since [Unix + * epoch time](https://en.wikipedia.org/wiki/Unix_time). + * Specify the value based on the type of picker (`DateTimePickerType`): + * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to + * represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. + * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent + * January 1, 2023, use `1672531200000`. + * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use + * `43200000` (or `12 * 60 * 60 * 1000`). + * + * Generated from protobuf field int64 value_ms_epoch = 4; + */ + protected $value_ms_epoch = 0; + /** + * The number representing the time zone offset from UTC, in minutes. + * If set, the `value_ms_epoch` is displayed in the specified time zone. + * If unset, the value defaults to the user's time zone setting. + * + * Generated from protobuf field int32 timezone_offset_date = 5; + */ + protected $timezone_offset_date = 0; + /** + * Triggered when the user clicks **Save** or **Clear** from the + * `DateTimePicker` interface. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; + */ + protected $on_change_action = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name by which the `DateTimePicker` is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type string $label + * The text that prompts users to input a date, a time, or a date and time. + * For example, if users are scheduling an appointment, use a label such as + * `Appointment date` or `Appointment date and time`. + * @type int $type + * Whether the widget supports inputting a date, a time, or the date and time. + * @type int|string $value_ms_epoch + * The default value displayed in the widget, in milliseconds since [Unix + * epoch time](https://en.wikipedia.org/wiki/Unix_time). + * Specify the value based on the type of picker (`DateTimePickerType`): + * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to + * represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. + * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent + * January 1, 2023, use `1672531200000`. + * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use + * `43200000` (or `12 * 60 * 60 * 1000`). + * @type int $timezone_offset_date + * The number representing the time zone offset from UTC, in minutes. + * If set, the `value_ms_epoch` is displayed in the specified time zone. + * If unset, the value defaults to the user's time zone setting. + * @type \Google\Apps\Card\V1\Action $on_change_action + * Triggered when the user clicks **Save** or **Clear** from the + * `DateTimePicker` interface. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The name by which the `DateTimePicker` is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name by which the `DateTimePicker` is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The text that prompts users to input a date, a time, or a date and time. + * For example, if users are scheduling an appointment, use a label such as + * `Appointment date` or `Appointment date and time`. + * + * Generated from protobuf field string label = 2; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * The text that prompts users to input a date, a time, or a date and time. + * For example, if users are scheduling an appointment, use a label such as + * `Appointment date` or `Appointment date and time`. + * + * Generated from protobuf field string label = 2; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * Whether the widget supports inputting a date, a time, or the date and time. + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Whether the widget supports inputting a date, a time, or the date and time. + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\DateTimePicker\DateTimePickerType::class); + $this->type = $var; + + return $this; + } + + /** + * The default value displayed in the widget, in milliseconds since [Unix + * epoch time](https://en.wikipedia.org/wiki/Unix_time). + * Specify the value based on the type of picker (`DateTimePickerType`): + * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to + * represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. + * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent + * January 1, 2023, use `1672531200000`. + * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use + * `43200000` (or `12 * 60 * 60 * 1000`). + * + * Generated from protobuf field int64 value_ms_epoch = 4; + * @return int|string + */ + public function getValueMsEpoch() + { + return $this->value_ms_epoch; + } + + /** + * The default value displayed in the widget, in milliseconds since [Unix + * epoch time](https://en.wikipedia.org/wiki/Unix_time). + * Specify the value based on the type of picker (`DateTimePickerType`): + * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to + * represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. + * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent + * January 1, 2023, use `1672531200000`. + * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use + * `43200000` (or `12 * 60 * 60 * 1000`). + * + * Generated from protobuf field int64 value_ms_epoch = 4; + * @param int|string $var + * @return $this + */ + public function setValueMsEpoch($var) + { + GPBUtil::checkInt64($var); + $this->value_ms_epoch = $var; + + return $this; + } + + /** + * The number representing the time zone offset from UTC, in minutes. + * If set, the `value_ms_epoch` is displayed in the specified time zone. + * If unset, the value defaults to the user's time zone setting. + * + * Generated from protobuf field int32 timezone_offset_date = 5; + * @return int + */ + public function getTimezoneOffsetDate() + { + return $this->timezone_offset_date; + } + + /** + * The number representing the time zone offset from UTC, in minutes. + * If set, the `value_ms_epoch` is displayed in the specified time zone. + * If unset, the value defaults to the user's time zone setting. + * + * Generated from protobuf field int32 timezone_offset_date = 5; + * @param int $var + * @return $this + */ + public function setTimezoneOffsetDate($var) + { + GPBUtil::checkInt32($var); + $this->timezone_offset_date = $var; + + return $this; + } + + /** + * Triggered when the user clicks **Save** or **Clear** from the + * `DateTimePicker` interface. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getOnChangeAction() + { + return $this->on_change_action; + } + + public function hasOnChangeAction() + { + return isset($this->on_change_action); + } + + public function clearOnChangeAction() + { + unset($this->on_change_action); + } + + /** + * Triggered when the user clicks **Save** or **Clear** from the + * `DateTimePicker` interface. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setOnChangeAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->on_change_action = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker/DateTimePickerType.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker/DateTimePickerType.php new file mode 100644 index 000000000000..e4866cc072b0 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker/DateTimePickerType.php @@ -0,0 +1,67 @@ +google.apps.card.v1.DateTimePicker.DateTimePickerType + */ +class DateTimePickerType +{ + /** + * Users input a date and time. + * + * Generated from protobuf enum DATE_AND_TIME = 0; + */ + const DATE_AND_TIME = 0; + /** + * Users input a date. + * + * Generated from protobuf enum DATE_ONLY = 1; + */ + const DATE_ONLY = 1; + /** + * Users input a time. + * + * Generated from protobuf enum TIME_ONLY = 2; + */ + const TIME_ONLY = 2; + + private static $valueToName = [ + self::DATE_AND_TIME => 'DATE_AND_TIME', + self::DATE_ONLY => 'DATE_ONLY', + self::TIME_ONLY => 'TIME_ONLY', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DateTimePickerType::class, \Google\Apps\Card\V1\DateTimePicker_DateTimePickerType::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText.php new file mode 100644 index 000000000000..b8526ef893b8 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText.php @@ -0,0 +1,480 @@ +google.apps.card.v1.DecoratedText + */ +class DecoratedText extends \Google\Protobuf\Internal\Message +{ + /** + * Deprecated in favor of `startIcon`. + * + * Generated from protobuf field .google.apps.card.v1.Icon icon = 1 [deprecated = true]; + * @deprecated + */ + protected $icon = null; + /** + * The icon displayed in front of the text. + * + * Generated from protobuf field .google.apps.card.v1.Icon start_icon = 12; + */ + protected $start_icon = null; + /** + * The text that appears above `text`. Always truncates. + * + * Generated from protobuf field string top_label = 3; + */ + protected $top_label = ''; + /** + * Required. The primary text. + * Supports simple formatting. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string text = 4; + */ + protected $text = ''; + /** + * The wrap text setting. If `true`, the text wraps and displays on + * multiple lines. Otherwise, the text is truncated. + * Only applies to `text`, not `topLabel` and `bottomLabel`. + * + * Generated from protobuf field bool wrap_text = 5; + */ + protected $wrap_text = false; + /** + * The text that appears below `text`. Always wraps. + * + * Generated from protobuf field string bottom_label = 6; + */ + protected $bottom_label = ''; + /** + * This action is triggered when users click `topLabel` or `bottomLabel`. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 7; + */ + protected $on_click = null; + protected $control; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\Icon $icon + * Deprecated in favor of `startIcon`. + * @type \Google\Apps\Card\V1\Icon $start_icon + * The icon displayed in front of the text. + * @type string $top_label + * The text that appears above `text`. Always truncates. + * @type string $text + * Required. The primary text. + * Supports simple formatting. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * @type bool $wrap_text + * The wrap text setting. If `true`, the text wraps and displays on + * multiple lines. Otherwise, the text is truncated. + * Only applies to `text`, not `topLabel` and `bottomLabel`. + * @type string $bottom_label + * The text that appears below `text`. Always wraps. + * @type \Google\Apps\Card\V1\OnClick $on_click + * This action is triggered when users click `topLabel` or `bottomLabel`. + * @type \Google\Apps\Card\V1\Button $button + * A button that a user can click to trigger an action. + * @type \Google\Apps\Card\V1\DecoratedText\SwitchControl $switch_control + * A switch widget that a user can click to change its state and trigger an + * action. + * @type \Google\Apps\Card\V1\Icon $end_icon + * An icon displayed after the text. + * Supports + * [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) + * and + * [custom](https://developers.google.com/workspace/chat/format-messages#customicons) + * icons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * Deprecated in favor of `startIcon`. + * + * Generated from protobuf field .google.apps.card.v1.Icon icon = 1 [deprecated = true]; + * @return \Google\Apps\Card\V1\Icon|null + * @deprecated + */ + public function getIcon() + { + @trigger_error('icon is deprecated.', E_USER_DEPRECATED); + return $this->icon; + } + + public function hasIcon() + { + @trigger_error('icon is deprecated.', E_USER_DEPRECATED); + return isset($this->icon); + } + + public function clearIcon() + { + @trigger_error('icon is deprecated.', E_USER_DEPRECATED); + unset($this->icon); + } + + /** + * Deprecated in favor of `startIcon`. + * + * Generated from protobuf field .google.apps.card.v1.Icon icon = 1 [deprecated = true]; + * @param \Google\Apps\Card\V1\Icon $var + * @return $this + * @deprecated + */ + public function setIcon($var) + { + @trigger_error('icon is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Icon::class); + $this->icon = $var; + + return $this; + } + + /** + * The icon displayed in front of the text. + * + * Generated from protobuf field .google.apps.card.v1.Icon start_icon = 12; + * @return \Google\Apps\Card\V1\Icon|null + */ + public function getStartIcon() + { + return $this->start_icon; + } + + public function hasStartIcon() + { + return isset($this->start_icon); + } + + public function clearStartIcon() + { + unset($this->start_icon); + } + + /** + * The icon displayed in front of the text. + * + * Generated from protobuf field .google.apps.card.v1.Icon start_icon = 12; + * @param \Google\Apps\Card\V1\Icon $var + * @return $this + */ + public function setStartIcon($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Icon::class); + $this->start_icon = $var; + + return $this; + } + + /** + * The text that appears above `text`. Always truncates. + * + * Generated from protobuf field string top_label = 3; + * @return string + */ + public function getTopLabel() + { + return $this->top_label; + } + + /** + * The text that appears above `text`. Always truncates. + * + * Generated from protobuf field string top_label = 3; + * @param string $var + * @return $this + */ + public function setTopLabel($var) + { + GPBUtil::checkString($var, True); + $this->top_label = $var; + + return $this; + } + + /** + * Required. The primary text. + * Supports simple formatting. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string text = 4; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Required. The primary text. + * Supports simple formatting. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string text = 4; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * The wrap text setting. If `true`, the text wraps and displays on + * multiple lines. Otherwise, the text is truncated. + * Only applies to `text`, not `topLabel` and `bottomLabel`. + * + * Generated from protobuf field bool wrap_text = 5; + * @return bool + */ + public function getWrapText() + { + return $this->wrap_text; + } + + /** + * The wrap text setting. If `true`, the text wraps and displays on + * multiple lines. Otherwise, the text is truncated. + * Only applies to `text`, not `topLabel` and `bottomLabel`. + * + * Generated from protobuf field bool wrap_text = 5; + * @param bool $var + * @return $this + */ + public function setWrapText($var) + { + GPBUtil::checkBool($var); + $this->wrap_text = $var; + + return $this; + } + + /** + * The text that appears below `text`. Always wraps. + * + * Generated from protobuf field string bottom_label = 6; + * @return string + */ + public function getBottomLabel() + { + return $this->bottom_label; + } + + /** + * The text that appears below `text`. Always wraps. + * + * Generated from protobuf field string bottom_label = 6; + * @param string $var + * @return $this + */ + public function setBottomLabel($var) + { + GPBUtil::checkString($var, True); + $this->bottom_label = $var; + + return $this; + } + + /** + * This action is triggered when users click `topLabel` or `bottomLabel`. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 7; + * @return \Google\Apps\Card\V1\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * This action is triggered when users click `topLabel` or `bottomLabel`. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 7; + * @param \Google\Apps\Card\V1\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); + $this->on_click = $var; + + return $this; + } + + /** + * A button that a user can click to trigger an action. + * + * Generated from protobuf field .google.apps.card.v1.Button button = 8; + * @return \Google\Apps\Card\V1\Button|null + */ + public function getButton() + { + return $this->readOneof(8); + } + + public function hasButton() + { + return $this->hasOneof(8); + } + + /** + * A button that a user can click to trigger an action. + * + * Generated from protobuf field .google.apps.card.v1.Button button = 8; + * @param \Google\Apps\Card\V1\Button $var + * @return $this + */ + public function setButton($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Button::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * A switch widget that a user can click to change its state and trigger an + * action. + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9; + * @return \Google\Apps\Card\V1\DecoratedText\SwitchControl|null + */ + public function getSwitchControl() + { + return $this->readOneof(9); + } + + public function hasSwitchControl() + { + return $this->hasOneof(9); + } + + /** + * A switch widget that a user can click to change its state and trigger an + * action. + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9; + * @param \Google\Apps\Card\V1\DecoratedText\SwitchControl $var + * @return $this + */ + public function setSwitchControl($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DecoratedText\SwitchControl::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * An icon displayed after the text. + * Supports + * [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) + * and + * [custom](https://developers.google.com/workspace/chat/format-messages#customicons) + * icons. + * + * Generated from protobuf field .google.apps.card.v1.Icon end_icon = 11; + * @return \Google\Apps\Card\V1\Icon|null + */ + public function getEndIcon() + { + return $this->readOneof(11); + } + + public function hasEndIcon() + { + return $this->hasOneof(11); + } + + /** + * An icon displayed after the text. + * Supports + * [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) + * and + * [custom](https://developers.google.com/workspace/chat/format-messages#customicons) + * icons. + * + * Generated from protobuf field .google.apps.card.v1.Icon end_icon = 11; + * @param \Google\Apps\Card\V1\Icon $var + * @return $this + */ + public function setEndIcon($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Icon::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * @return string + */ + public function getControl() + { + return $this->whichOneof("control"); + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl.php new file mode 100644 index 000000000000..9949152ee710 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl.php @@ -0,0 +1,247 @@ +google.apps.card.v1.DecoratedText.SwitchControl + */ +class SwitchControl extends \Google\Protobuf\Internal\Message +{ + /** + * The name by which the switch widget is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + /** + * When `true`, the switch is selected. + * + * Generated from protobuf field bool selected = 3; + */ + protected $selected = false; + /** + * The action to perform when the switch state is changed, such as what + * function to run. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 4; + */ + protected $on_change_action = null; + /** + * How the switch appears in the user interface. + * [Google Workspace Add-ons + * and Chat apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5; + */ + protected $control_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name by which the switch widget is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type string $value + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type bool $selected + * When `true`, the switch is selected. + * @type \Google\Apps\Card\V1\Action $on_change_action + * The action to perform when the switch state is changed, such as what + * function to run. + * @type int $control_type + * How the switch appears in the user interface. + * [Google Workspace Add-ons + * and Chat apps](https://developers.google.com/workspace/extend): + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The name by which the switch widget is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name by which the switch widget is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * When `true`, the switch is selected. + * + * Generated from protobuf field bool selected = 3; + * @return bool + */ + public function getSelected() + { + return $this->selected; + } + + /** + * When `true`, the switch is selected. + * + * Generated from protobuf field bool selected = 3; + * @param bool $var + * @return $this + */ + public function setSelected($var) + { + GPBUtil::checkBool($var); + $this->selected = $var; + + return $this; + } + + /** + * The action to perform when the switch state is changed, such as what + * function to run. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 4; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getOnChangeAction() + { + return $this->on_change_action; + } + + public function hasOnChangeAction() + { + return isset($this->on_change_action); + } + + public function clearOnChangeAction() + { + unset($this->on_change_action); + } + + /** + * The action to perform when the switch state is changed, such as what + * function to run. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 4; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setOnChangeAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->on_change_action = $var; + + return $this; + } + + /** + * How the switch appears in the user interface. + * [Google Workspace Add-ons + * and Chat apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5; + * @return int + */ + public function getControlType() + { + return $this->control_type; + } + + /** + * How the switch appears in the user interface. + * [Google Workspace Add-ons + * and Chat apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5; + * @param int $var + * @return $this + */ + public function setControlType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\DecoratedText\SwitchControl\ControlType::class); + $this->control_type = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SwitchControl::class, \Google\Apps\Card\V1\DecoratedText_SwitchControl::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl/ControlType.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl/ControlType.php new file mode 100644 index 000000000000..1dee8d9b7f50 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl/ControlType.php @@ -0,0 +1,70 @@ +google.apps.card.v1.DecoratedText.SwitchControl.ControlType + */ +class ControlType +{ + /** + * A toggle-style switch. + * + * Generated from protobuf enum SWITCH = 0; + */ + const PBSWITCH = 0; + /** + * Deprecated in favor of `CHECK_BOX`. + * + * Generated from protobuf enum CHECKBOX = 1; + */ + const CHECKBOX = 1; + /** + * A checkbox. + * + * Generated from protobuf enum CHECK_BOX = 2; + */ + const CHECK_BOX = 2; + + private static $valueToName = [ + self::PBSWITCH => 'SWITCH', + self::CHECKBOX => 'CHECKBOX', + self::CHECK_BOX => 'CHECK_BOX', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ControlType::class, \Google\Apps\Card\V1\DecoratedText_SwitchControl_ControlType::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Divider.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Divider.php new file mode 100644 index 000000000000..302c3a2b4e4f --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Divider.php @@ -0,0 +1,42 @@ +google.apps.card.v1.Divider + */ +class Divider extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid.php new file mode 100644 index 000000000000..daf8a87f9278 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid.php @@ -0,0 +1,281 @@ +google.apps.card.v1.Grid + */ +class Grid extends \Google\Protobuf\Internal\Message +{ + /** + * The text that displays in the grid header. + * + * Generated from protobuf field string title = 1; + */ + protected $title = ''; + /** + * The items to display in the grid. + * + * Generated from protobuf field repeated .google.apps.card.v1.Grid.GridItem items = 2; + */ + private $items; + /** + * The border style to apply to each grid item. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 3; + */ + protected $border_style = null; + /** + * The number of columns to display in the grid. A default value + * is used if this field isn't specified, and that default value is + * different depending on where the grid is shown (dialog versus companion). + * + * Generated from protobuf field int32 column_count = 4; + */ + protected $column_count = 0; + /** + * This callback is reused by each individual grid item, but with the + * item's identifier and index in the items list added to the callback's + * parameters. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 5; + */ + protected $on_click = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * The text that displays in the grid header. + * @type array<\Google\Apps\Card\V1\Grid\GridItem>|\Google\Protobuf\Internal\RepeatedField $items + * The items to display in the grid. + * @type \Google\Apps\Card\V1\BorderStyle $border_style + * The border style to apply to each grid item. + * @type int $column_count + * The number of columns to display in the grid. A default value + * is used if this field isn't specified, and that default value is + * different depending on where the grid is shown (dialog versus companion). + * @type \Google\Apps\Card\V1\OnClick $on_click + * This callback is reused by each individual grid item, but with the + * item's identifier and index in the items list added to the callback's + * parameters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The text that displays in the grid header. + * + * Generated from protobuf field string title = 1; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * The text that displays in the grid header. + * + * Generated from protobuf field string title = 1; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * The items to display in the grid. + * + * Generated from protobuf field repeated .google.apps.card.v1.Grid.GridItem items = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * The items to display in the grid. + * + * Generated from protobuf field repeated .google.apps.card.v1.Grid.GridItem items = 2; + * @param array<\Google\Apps\Card\V1\Grid\GridItem>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Grid\GridItem::class); + $this->items = $arr; + + return $this; + } + + /** + * The border style to apply to each grid item. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 3; + * @return \Google\Apps\Card\V1\BorderStyle|null + */ + public function getBorderStyle() + { + return $this->border_style; + } + + public function hasBorderStyle() + { + return isset($this->border_style); + } + + public function clearBorderStyle() + { + unset($this->border_style); + } + + /** + * The border style to apply to each grid item. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 3; + * @param \Google\Apps\Card\V1\BorderStyle $var + * @return $this + */ + public function setBorderStyle($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\BorderStyle::class); + $this->border_style = $var; + + return $this; + } + + /** + * The number of columns to display in the grid. A default value + * is used if this field isn't specified, and that default value is + * different depending on where the grid is shown (dialog versus companion). + * + * Generated from protobuf field int32 column_count = 4; + * @return int + */ + public function getColumnCount() + { + return $this->column_count; + } + + /** + * The number of columns to display in the grid. A default value + * is used if this field isn't specified, and that default value is + * different depending on where the grid is shown (dialog versus companion). + * + * Generated from protobuf field int32 column_count = 4; + * @param int $var + * @return $this + */ + public function setColumnCount($var) + { + GPBUtil::checkInt32($var); + $this->column_count = $var; + + return $this; + } + + /** + * This callback is reused by each individual grid item, but with the + * item's identifier and index in the items list added to the callback's + * parameters. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 5; + * @return \Google\Apps\Card\V1\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * This callback is reused by each individual grid item, but with the + * item's identifier and index in the items list added to the callback's + * parameters. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 5; + * @param \Google\Apps\Card\V1\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); + $this->on_click = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem.php new file mode 100644 index 000000000000..d795142ccd5d --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem.php @@ -0,0 +1,223 @@ +google.apps.card.v1.Grid.GridItem + */ +class GridItem extends \Google\Protobuf\Internal\Message +{ + /** + * A user-specified identifier for this grid item. This identifier is + * returned in the parent grid's `onClick` callback parameters. + * + * Generated from protobuf field string id = 1; + */ + protected $id = ''; + /** + * The image that displays in the grid item. + * + * Generated from protobuf field .google.apps.card.v1.ImageComponent image = 2; + */ + protected $image = null; + /** + * The grid item's title. + * + * Generated from protobuf field string title = 3; + */ + protected $title = ''; + /** + * The grid item's subtitle. + * + * Generated from protobuf field string subtitle = 4; + */ + protected $subtitle = ''; + /** + * The layout to use for the grid item. + * + * Generated from protobuf field .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9; + */ + protected $layout = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $id + * A user-specified identifier for this grid item. This identifier is + * returned in the parent grid's `onClick` callback parameters. + * @type \Google\Apps\Card\V1\ImageComponent $image + * The image that displays in the grid item. + * @type string $title + * The grid item's title. + * @type string $subtitle + * The grid item's subtitle. + * @type int $layout + * The layout to use for the grid item. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * A user-specified identifier for this grid item. This identifier is + * returned in the parent grid's `onClick` callback parameters. + * + * Generated from protobuf field string id = 1; + * @return string + */ + public function getId() + { + return $this->id; + } + + /** + * A user-specified identifier for this grid item. This identifier is + * returned in the parent grid's `onClick` callback parameters. + * + * Generated from protobuf field string id = 1; + * @param string $var + * @return $this + */ + public function setId($var) + { + GPBUtil::checkString($var, True); + $this->id = $var; + + return $this; + } + + /** + * The image that displays in the grid item. + * + * Generated from protobuf field .google.apps.card.v1.ImageComponent image = 2; + * @return \Google\Apps\Card\V1\ImageComponent|null + */ + public function getImage() + { + return $this->image; + } + + public function hasImage() + { + return isset($this->image); + } + + public function clearImage() + { + unset($this->image); + } + + /** + * The image that displays in the grid item. + * + * Generated from protobuf field .google.apps.card.v1.ImageComponent image = 2; + * @param \Google\Apps\Card\V1\ImageComponent $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ImageComponent::class); + $this->image = $var; + + return $this; + } + + /** + * The grid item's title. + * + * Generated from protobuf field string title = 3; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * The grid item's title. + * + * Generated from protobuf field string title = 3; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * The grid item's subtitle. + * + * Generated from protobuf field string subtitle = 4; + * @return string + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * The grid item's subtitle. + * + * Generated from protobuf field string subtitle = 4; + * @param string $var + * @return $this + */ + public function setSubtitle($var) + { + GPBUtil::checkString($var, True); + $this->subtitle = $var; + + return $this; + } + + /** + * The layout to use for the grid item. + * + * Generated from protobuf field .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9; + * @return int + */ + public function getLayout() + { + return $this->layout; + } + + /** + * The layout to use for the grid item. + * + * Generated from protobuf field .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9; + * @param int $var + * @return $this + */ + public function setLayout($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Grid\GridItem\GridItemLayout::class); + $this->layout = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GridItem::class, \Google\Apps\Card\V1\Grid_GridItem::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem/GridItemLayout.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem/GridItemLayout.php new file mode 100644 index 000000000000..1606b65a4919 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem/GridItemLayout.php @@ -0,0 +1,66 @@ +google.apps.card.v1.Grid.GridItem.GridItemLayout + */ +class GridItemLayout +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum GRID_ITEM_LAYOUT_UNSPECIFIED = 0; + */ + const GRID_ITEM_LAYOUT_UNSPECIFIED = 0; + /** + * The title and subtitle are shown below the grid item's image. + * + * Generated from protobuf enum TEXT_BELOW = 1; + */ + const TEXT_BELOW = 1; + /** + * The title and subtitle are shown above the grid item's image. + * + * Generated from protobuf enum TEXT_ABOVE = 2; + */ + const TEXT_ABOVE = 2; + + private static $valueToName = [ + self::GRID_ITEM_LAYOUT_UNSPECIFIED => 'GRID_ITEM_LAYOUT_UNSPECIFIED', + self::TEXT_BELOW => 'TEXT_BELOW', + self::TEXT_ABOVE => 'TEXT_ABOVE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(GridItemLayout::class, \Google\Apps\Card\V1\Grid_GridItem_GridItemLayout::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Icon.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Icon.php new file mode 100644 index 000000000000..e3ef2178b1cb --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Icon.php @@ -0,0 +1,318 @@ +google.apps.card.v1.Icon + */ +class Icon extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A description of the icon used for accessibility. + * If unspecified, the default value `Button` is provided. As a best practice, + * you should set a helpful description for what the icon displays, and if + * applicable, what it does. For example, `A user's account portrait`, or + * `Opens a new browser tab and navigates to the Google Chat developer + * documentation at https://developers.google.com/workspace/chat`. + * If the icon is set in a [`Button`][google.apps.card.v1.Button], the + * `altText` appears as helper text when the user hovers over the button. + * However, if the button also sets `text`, the icon's `altText` is ignored. + * + * Generated from protobuf field string alt_text = 3; + */ + protected $alt_text = ''; + /** + * The crop style applied to the image. In some cases, applying a + * `CIRCLE` crop causes the image to be drawn larger than a built-in + * icon. + * + * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 4; + */ + protected $image_type = 0; + protected $icons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $known_icon + * Display one of the built-in icons provided by Google Workspace. + * For example, to display an airplane icon, specify `AIRPLANE`. + * For a bus, specify `BUS`. + * For a full list of supported icons, see [built-in + * icons](https://developers.google.com/workspace/chat/format-messages#builtinicons). + * @type string $icon_url + * Display a custom icon hosted at an HTTPS URL. + * For example: + * ``` + * "iconUrl": + * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png" + * ``` + * Supported file types include `.png` and `.jpg`. + * @type \Google\Apps\Card\V1\MaterialIcon $material_icon + * Display one of the [Google Material + * Icons](https://fonts.google.com/icons). + * For example, to display a [checkbox + * icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), + * use + * ``` + * "material_icon": { + * "name": "check_box" + * } + * ``` + * [Google Chat apps](https://developers.google.com/workspace/chat): + * @type string $alt_text + * Optional. A description of the icon used for accessibility. + * If unspecified, the default value `Button` is provided. As a best practice, + * you should set a helpful description for what the icon displays, and if + * applicable, what it does. For example, `A user's account portrait`, or + * `Opens a new browser tab and navigates to the Google Chat developer + * documentation at https://developers.google.com/workspace/chat`. + * If the icon is set in a [`Button`][google.apps.card.v1.Button], the + * `altText` appears as helper text when the user hovers over the button. + * However, if the button also sets `text`, the icon's `altText` is ignored. + * @type int $image_type + * The crop style applied to the image. In some cases, applying a + * `CIRCLE` crop causes the image to be drawn larger than a built-in + * icon. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * Display one of the built-in icons provided by Google Workspace. + * For example, to display an airplane icon, specify `AIRPLANE`. + * For a bus, specify `BUS`. + * For a full list of supported icons, see [built-in + * icons](https://developers.google.com/workspace/chat/format-messages#builtinicons). + * + * Generated from protobuf field string known_icon = 1; + * @return string + */ + public function getKnownIcon() + { + return $this->readOneof(1); + } + + public function hasKnownIcon() + { + return $this->hasOneof(1); + } + + /** + * Display one of the built-in icons provided by Google Workspace. + * For example, to display an airplane icon, specify `AIRPLANE`. + * For a bus, specify `BUS`. + * For a full list of supported icons, see [built-in + * icons](https://developers.google.com/workspace/chat/format-messages#builtinicons). + * + * Generated from protobuf field string known_icon = 1; + * @param string $var + * @return $this + */ + public function setKnownIcon($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Display a custom icon hosted at an HTTPS URL. + * For example: + * ``` + * "iconUrl": + * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png" + * ``` + * Supported file types include `.png` and `.jpg`. + * + * Generated from protobuf field string icon_url = 2; + * @return string + */ + public function getIconUrl() + { + return $this->readOneof(2); + } + + public function hasIconUrl() + { + return $this->hasOneof(2); + } + + /** + * Display a custom icon hosted at an HTTPS URL. + * For example: + * ``` + * "iconUrl": + * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png" + * ``` + * Supported file types include `.png` and `.jpg`. + * + * Generated from protobuf field string icon_url = 2; + * @param string $var + * @return $this + */ + public function setIconUrl($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Display one of the [Google Material + * Icons](https://fonts.google.com/icons). + * For example, to display a [checkbox + * icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), + * use + * ``` + * "material_icon": { + * "name": "check_box" + * } + * ``` + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field .google.apps.card.v1.MaterialIcon material_icon = 5; + * @return \Google\Apps\Card\V1\MaterialIcon|null + */ + public function getMaterialIcon() + { + return $this->readOneof(5); + } + + public function hasMaterialIcon() + { + return $this->hasOneof(5); + } + + /** + * Display one of the [Google Material + * Icons](https://fonts.google.com/icons). + * For example, to display a [checkbox + * icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), + * use + * ``` + * "material_icon": { + * "name": "check_box" + * } + * ``` + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field .google.apps.card.v1.MaterialIcon material_icon = 5; + * @param \Google\Apps\Card\V1\MaterialIcon $var + * @return $this + */ + public function setMaterialIcon($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\MaterialIcon::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Optional. A description of the icon used for accessibility. + * If unspecified, the default value `Button` is provided. As a best practice, + * you should set a helpful description for what the icon displays, and if + * applicable, what it does. For example, `A user's account portrait`, or + * `Opens a new browser tab and navigates to the Google Chat developer + * documentation at https://developers.google.com/workspace/chat`. + * If the icon is set in a [`Button`][google.apps.card.v1.Button], the + * `altText` appears as helper text when the user hovers over the button. + * However, if the button also sets `text`, the icon's `altText` is ignored. + * + * Generated from protobuf field string alt_text = 3; + * @return string + */ + public function getAltText() + { + return $this->alt_text; + } + + /** + * Optional. A description of the icon used for accessibility. + * If unspecified, the default value `Button` is provided. As a best practice, + * you should set a helpful description for what the icon displays, and if + * applicable, what it does. For example, `A user's account portrait`, or + * `Opens a new browser tab and navigates to the Google Chat developer + * documentation at https://developers.google.com/workspace/chat`. + * If the icon is set in a [`Button`][google.apps.card.v1.Button], the + * `altText` appears as helper text when the user hovers over the button. + * However, if the button also sets `text`, the icon's `altText` is ignored. + * + * Generated from protobuf field string alt_text = 3; + * @param string $var + * @return $this + */ + public function setAltText($var) + { + GPBUtil::checkString($var, True); + $this->alt_text = $var; + + return $this; + } + + /** + * The crop style applied to the image. In some cases, applying a + * `CIRCLE` crop causes the image to be drawn larger than a built-in + * icon. + * + * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 4; + * @return int + */ + public function getImageType() + { + return $this->image_type; + } + + /** + * The crop style applied to the image. In some cases, applying a + * `CIRCLE` crop causes the image to be drawn larger than a built-in + * icon. + * + * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 4; + * @param int $var + * @return $this + */ + public function setImageType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\ImageType::class); + $this->image_type = $var; + + return $this; + } + + /** + * @return string + */ + public function getIcons() + { + return $this->whichOneof("icons"); + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Image.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Image.php new file mode 100644 index 000000000000..9cd6c58f1608 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Image.php @@ -0,0 +1,165 @@ +google.apps.card.v1.Image + */ +class Image extends \Google\Protobuf\Internal\Message +{ + /** + * The HTTPS URL that hosts the image. + * For example: + * ``` + * https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png + * ``` + * + * Generated from protobuf field string image_url = 1; + */ + protected $image_url = ''; + /** + * When a user clicks the image, the click triggers this action. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; + */ + protected $on_click = null; + /** + * The alternative text of this image that's used for accessibility. + * + * Generated from protobuf field string alt_text = 3; + */ + protected $alt_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_url + * The HTTPS URL that hosts the image. + * For example: + * ``` + * https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png + * ``` + * @type \Google\Apps\Card\V1\OnClick $on_click + * When a user clicks the image, the click triggers this action. + * @type string $alt_text + * The alternative text of this image that's used for accessibility. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The HTTPS URL that hosts the image. + * For example: + * ``` + * https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png + * ``` + * + * Generated from protobuf field string image_url = 1; + * @return string + */ + public function getImageUrl() + { + return $this->image_url; + } + + /** + * The HTTPS URL that hosts the image. + * For example: + * ``` + * https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png + * ``` + * + * Generated from protobuf field string image_url = 1; + * @param string $var + * @return $this + */ + public function setImageUrl($var) + { + GPBUtil::checkString($var, True); + $this->image_url = $var; + + return $this; + } + + /** + * When a user clicks the image, the click triggers this action. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; + * @return \Google\Apps\Card\V1\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * When a user clicks the image, the click triggers this action. + * + * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; + * @param \Google\Apps\Card\V1\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); + $this->on_click = $var; + + return $this; + } + + /** + * The alternative text of this image that's used for accessibility. + * + * Generated from protobuf field string alt_text = 3; + * @return string + */ + public function getAltText() + { + return $this->alt_text; + } + + /** + * The alternative text of this image that's used for accessibility. + * + * Generated from protobuf field string alt_text = 3; + * @param string $var + * @return $this + */ + public function setAltText($var) + { + GPBUtil::checkString($var, True); + $this->alt_text = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageComponent.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageComponent.php new file mode 100644 index 000000000000..b0b07608f838 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageComponent.php @@ -0,0 +1,191 @@ +google.apps.card.v1.ImageComponent + */ +class ImageComponent extends \Google\Protobuf\Internal\Message +{ + /** + * The image URL. + * + * Generated from protobuf field string image_uri = 1; + */ + protected $image_uri = ''; + /** + * The accessibility label for the image. + * + * Generated from protobuf field string alt_text = 2; + */ + protected $alt_text = ''; + /** + * The crop style to apply to the image. + * + * Generated from protobuf field .google.apps.card.v1.ImageCropStyle crop_style = 3; + */ + protected $crop_style = null; + /** + * The border style to apply to the image. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 4; + */ + protected $border_style = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_uri + * The image URL. + * @type string $alt_text + * The accessibility label for the image. + * @type \Google\Apps\Card\V1\ImageCropStyle $crop_style + * The crop style to apply to the image. + * @type \Google\Apps\Card\V1\BorderStyle $border_style + * The border style to apply to the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The image URL. + * + * Generated from protobuf field string image_uri = 1; + * @return string + */ + public function getImageUri() + { + return $this->image_uri; + } + + /** + * The image URL. + * + * Generated from protobuf field string image_uri = 1; + * @param string $var + * @return $this + */ + public function setImageUri($var) + { + GPBUtil::checkString($var, True); + $this->image_uri = $var; + + return $this; + } + + /** + * The accessibility label for the image. + * + * Generated from protobuf field string alt_text = 2; + * @return string + */ + public function getAltText() + { + return $this->alt_text; + } + + /** + * The accessibility label for the image. + * + * Generated from protobuf field string alt_text = 2; + * @param string $var + * @return $this + */ + public function setAltText($var) + { + GPBUtil::checkString($var, True); + $this->alt_text = $var; + + return $this; + } + + /** + * The crop style to apply to the image. + * + * Generated from protobuf field .google.apps.card.v1.ImageCropStyle crop_style = 3; + * @return \Google\Apps\Card\V1\ImageCropStyle|null + */ + public function getCropStyle() + { + return $this->crop_style; + } + + public function hasCropStyle() + { + return isset($this->crop_style); + } + + public function clearCropStyle() + { + unset($this->crop_style); + } + + /** + * The crop style to apply to the image. + * + * Generated from protobuf field .google.apps.card.v1.ImageCropStyle crop_style = 3; + * @param \Google\Apps\Card\V1\ImageCropStyle $var + * @return $this + */ + public function setCropStyle($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ImageCropStyle::class); + $this->crop_style = $var; + + return $this; + } + + /** + * The border style to apply to the image. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 4; + * @return \Google\Apps\Card\V1\BorderStyle|null + */ + public function getBorderStyle() + { + return $this->border_style; + } + + public function hasBorderStyle() + { + return isset($this->border_style); + } + + public function clearBorderStyle() + { + unset($this->border_style); + } + + /** + * The border style to apply to the image. + * + * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 4; + * @param \Google\Apps\Card\V1\BorderStyle $var + * @return $this + */ + public function setBorderStyle($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\BorderStyle::class); + $this->border_style = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle.php new file mode 100644 index 000000000000..eb70bd52adf0 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle.php @@ -0,0 +1,138 @@ +google.apps.card.v1.ImageCropStyle + */ +class ImageCropStyle extends \Google\Protobuf\Internal\Message +{ + /** + * The crop type. + * + * Generated from protobuf field .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1; + */ + protected $type = 0; + /** + * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. + * For example, here's how to apply a 16:9 aspect ratio: + * ``` + * cropStyle { + * "type": "RECTANGLE_CUSTOM", + * "aspectRatio": 16/9 + * } + * ``` + * + * Generated from protobuf field double aspect_ratio = 2; + */ + protected $aspect_ratio = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The crop type. + * @type float $aspect_ratio + * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. + * For example, here's how to apply a 16:9 aspect ratio: + * ``` + * cropStyle { + * "type": "RECTANGLE_CUSTOM", + * "aspectRatio": 16/9 + * } + * ``` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The crop type. + * + * Generated from protobuf field .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The crop type. + * + * Generated from protobuf field .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\ImageCropStyle\ImageCropType::class); + $this->type = $var; + + return $this; + } + + /** + * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. + * For example, here's how to apply a 16:9 aspect ratio: + * ``` + * cropStyle { + * "type": "RECTANGLE_CUSTOM", + * "aspectRatio": 16/9 + * } + * ``` + * + * Generated from protobuf field double aspect_ratio = 2; + * @return float + */ + public function getAspectRatio() + { + return $this->aspect_ratio; + } + + /** + * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. + * For example, here's how to apply a 16:9 aspect ratio: + * ``` + * cropStyle { + * "type": "RECTANGLE_CUSTOM", + * "aspectRatio": 16/9 + * } + * ``` + * + * Generated from protobuf field double aspect_ratio = 2; + * @param float $var + * @return $this + */ + public function setAspectRatio($var) + { + GPBUtil::checkDouble($var); + $this->aspect_ratio = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle/ImageCropType.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle/ImageCropType.php new file mode 100644 index 000000000000..2f8d14d52fba --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle/ImageCropType.php @@ -0,0 +1,81 @@ +google.apps.card.v1.ImageCropStyle.ImageCropType + */ +class ImageCropType +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum IMAGE_CROP_TYPE_UNSPECIFIED = 0; + */ + const IMAGE_CROP_TYPE_UNSPECIFIED = 0; + /** + * Default value. Applies a square crop. + * + * Generated from protobuf enum SQUARE = 1; + */ + const SQUARE = 1; + /** + * Applies a circular crop. + * + * Generated from protobuf enum CIRCLE = 2; + */ + const CIRCLE = 2; + /** + * Applies a rectangular crop with a custom aspect ratio. Set the custom + * aspect ratio with `aspectRatio`. + * + * Generated from protobuf enum RECTANGLE_CUSTOM = 3; + */ + const RECTANGLE_CUSTOM = 3; + /** + * Applies a rectangular crop with a 4:3 aspect ratio. + * + * Generated from protobuf enum RECTANGLE_4_3 = 4; + */ + const RECTANGLE_4_3 = 4; + + private static $valueToName = [ + self::IMAGE_CROP_TYPE_UNSPECIFIED => 'IMAGE_CROP_TYPE_UNSPECIFIED', + self::SQUARE => 'SQUARE', + self::CIRCLE => 'CIRCLE', + self::RECTANGLE_CUSTOM => 'RECTANGLE_CUSTOM', + self::RECTANGLE_4_3 => 'RECTANGLE_4_3', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ImageCropType::class, \Google\Apps\Card\V1\ImageCropStyle_ImageCropType::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/MaterialIcon.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/MaterialIcon.php new file mode 100644 index 000000000000..f37b5ed6e401 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/MaterialIcon.php @@ -0,0 +1,250 @@ +google.apps.card.v1.MaterialIcon + */ +class MaterialIcon extends \Google\Protobuf\Internal\Message +{ + /** + * The icon name defined in the [Google Material + * Icon](https://fonts.google.com/icons), for example, `check_box`. Any + * invalid names are abandoned and replaced with empty string and + * results in the icon failing to render. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Whether the icon renders as filled. Default value is false. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field bool fill = 2; + */ + protected $fill = false; + /** + * The stroke weight of the icon. Choose from {100, 200, 300, 400, + * 500, 600, 700}. If absent, default value is 400. If any other value is + * specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field int32 weight = 3; + */ + protected $weight = 0; + /** + * Weight and grade affect a symbol’s thickness. Adjustments to grade are more + * granular than adjustments to weight and have a small impact on the size of + * the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If + * any other value is specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field int32 grade = 4; + */ + protected $grade = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The icon name defined in the [Google Material + * Icon](https://fonts.google.com/icons), for example, `check_box`. Any + * invalid names are abandoned and replaced with empty string and + * results in the icon failing to render. + * @type bool $fill + * Whether the icon renders as filled. Default value is false. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * @type int $weight + * The stroke weight of the icon. Choose from {100, 200, 300, 400, + * 500, 600, 700}. If absent, default value is 400. If any other value is + * specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * @type int $grade + * Weight and grade affect a symbol’s thickness. Adjustments to grade are more + * granular than adjustments to weight and have a small impact on the size of + * the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If + * any other value is specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The icon name defined in the [Google Material + * Icon](https://fonts.google.com/icons), for example, `check_box`. Any + * invalid names are abandoned and replaced with empty string and + * results in the icon failing to render. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The icon name defined in the [Google Material + * Icon](https://fonts.google.com/icons), for example, `check_box`. Any + * invalid names are abandoned and replaced with empty string and + * results in the icon failing to render. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Whether the icon renders as filled. Default value is false. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field bool fill = 2; + * @return bool + */ + public function getFill() + { + return $this->fill; + } + + /** + * Whether the icon renders as filled. Default value is false. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field bool fill = 2; + * @param bool $var + * @return $this + */ + public function setFill($var) + { + GPBUtil::checkBool($var); + $this->fill = $var; + + return $this; + } + + /** + * The stroke weight of the icon. Choose from {100, 200, 300, 400, + * 500, 600, 700}. If absent, default value is 400. If any other value is + * specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field int32 weight = 3; + * @return int + */ + public function getWeight() + { + return $this->weight; + } + + /** + * The stroke weight of the icon. Choose from {100, 200, 300, 400, + * 500, 600, 700}. If absent, default value is 400. If any other value is + * specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field int32 weight = 3; + * @param int $var + * @return $this + */ + public function setWeight($var) + { + GPBUtil::checkInt32($var); + $this->weight = $var; + + return $this; + } + + /** + * Weight and grade affect a symbol’s thickness. Adjustments to grade are more + * granular than adjustments to weight and have a small impact on the size of + * the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If + * any other value is specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field int32 grade = 4; + * @return int + */ + public function getGrade() + { + return $this->grade; + } + + /** + * Weight and grade affect a symbol’s thickness. Adjustments to grade are more + * granular than adjustments to weight and have a small impact on the size of + * the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If + * any other value is specified, the default value is used. + * To preview different icon settings, go to + * [Google Font Icons](https://fonts.google.com/icons) and adjust the + * settings under **Customize**. + * + * Generated from protobuf field int32 grade = 4; + * @param int $var + * @return $this + */ + public function setGrade($var) + { + GPBUtil::checkInt32($var); + $this->grade = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OnClick.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OnClick.php new file mode 100644 index 000000000000..7fe0139a6eda --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OnClick.php @@ -0,0 +1,198 @@ +google.apps.card.v1.OnClick + */ +class OnClick extends \Google\Protobuf\Internal\Message +{ + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\Action $action + * If specified, an action is triggered by this `onClick`. + * @type \Google\Apps\Card\V1\OpenLink $open_link + * If specified, this `onClick` triggers an open link action. + * @type \Google\Apps\Card\V1\Action $open_dynamic_link_action + * An add-on triggers this action when the action needs to open a + * link. This differs from the `open_link` above in that this needs to talk + * to server to get the link. Thus some preparation work is required for + * web client to do before the open link action response comes back. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * @type \Google\Apps\Card\V1\Card $card + * A new card is pushed to the card stack after clicking if specified. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * If specified, an action is triggered by this `onClick`. + * + * Generated from protobuf field .google.apps.card.v1.Action action = 1; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getAction() + { + return $this->readOneof(1); + } + + public function hasAction() + { + return $this->hasOneof(1); + } + + /** + * If specified, an action is triggered by this `onClick`. + * + * Generated from protobuf field .google.apps.card.v1.Action action = 1; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * If specified, this `onClick` triggers an open link action. + * + * Generated from protobuf field .google.apps.card.v1.OpenLink open_link = 2; + * @return \Google\Apps\Card\V1\OpenLink|null + */ + public function getOpenLink() + { + return $this->readOneof(2); + } + + public function hasOpenLink() + { + return $this->hasOneof(2); + } + + /** + * If specified, this `onClick` triggers an open link action. + * + * Generated from protobuf field .google.apps.card.v1.OpenLink open_link = 2; + * @param \Google\Apps\Card\V1\OpenLink $var + * @return $this + */ + public function setOpenLink($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OpenLink::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * An add-on triggers this action when the action needs to open a + * link. This differs from the `open_link` above in that this needs to talk + * to server to get the link. Thus some preparation work is required for + * web client to do before the open link action response comes back. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Action open_dynamic_link_action = 3; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getOpenDynamicLinkAction() + { + return $this->readOneof(3); + } + + public function hasOpenDynamicLinkAction() + { + return $this->hasOneof(3); + } + + /** + * An add-on triggers this action when the action needs to open a + * link. This differs from the `open_link` above in that this needs to talk + * to server to get the link. Thus some preparation work is required for + * web client to do before the open link action response comes back. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Action open_dynamic_link_action = 3; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setOpenDynamicLinkAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A new card is pushed to the card stack after clicking if specified. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card card = 4; + * @return \Google\Apps\Card\V1\Card|null + */ + public function getCard() + { + return $this->readOneof(4); + } + + public function hasCard() + { + return $this->hasOneof(4); + } + + /** + * A new card is pushed to the card stack after clicking if specified. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Card card = 4; + * @param \Google\Apps\Card\V1\Card $var + * @return $this + */ + public function setCard($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink.php new file mode 100644 index 000000000000..f401cd8d1c40 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink.php @@ -0,0 +1,157 @@ +google.apps.card.v1.OpenLink + */ +class OpenLink extends \Google\Protobuf\Internal\Message +{ + /** + * The URL to open. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + /** + * How to open a link. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.OpenLink.OpenAs open_as = 2; + */ + protected $open_as = 0; + /** + * Whether the client forgets about a link after opening it, or observes it + * until the window closes. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.OpenLink.OnClose on_close = 3; + */ + protected $on_close = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * The URL to open. + * @type int $open_as + * How to open a link. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * @type int $on_close + * Whether the client forgets about a link after opening it, or observes it + * until the window closes. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The URL to open. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The URL to open. + * + * Generated from protobuf field string url = 1; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * How to open a link. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.OpenLink.OpenAs open_as = 2; + * @return int + */ + public function getOpenAs() + { + return $this->open_as; + } + + /** + * How to open a link. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.OpenLink.OpenAs open_as = 2; + * @param int $var + * @return $this + */ + public function setOpenAs($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\OpenLink\OpenAs::class); + $this->open_as = $var; + + return $this; + } + + /** + * Whether the client forgets about a link after opening it, or observes it + * until the window closes. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.OpenLink.OnClose on_close = 3; + * @return int + */ + public function getOnClose() + { + return $this->on_close; + } + + /** + * Whether the client forgets about a link after opening it, or observes it + * until the window closes. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.OpenLink.OnClose on_close = 3; + * @param int $var + * @return $this + */ + public function setOnClose($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\OpenLink\OnClose::class); + $this->on_close = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OnClose.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OnClose.php new file mode 100644 index 000000000000..59451bd34764 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OnClose.php @@ -0,0 +1,67 @@ +google.apps.card.v1.OpenLink.OnClose + */ +class OnClose +{ + /** + * Default value. The card doesn't reload; nothing happens. + * + * Generated from protobuf enum NOTHING = 0; + */ + const NOTHING = 0; + /** + * Reloads the card after the child window closes. + * If used in conjunction with + * [`OpenAs.OVERLAY`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#openas), + * the child window acts as a modal dialog and the parent card is blocked + * until the child window closes. + * + * Generated from protobuf enum RELOAD = 1; + */ + const RELOAD = 1; + + private static $valueToName = [ + self::NOTHING => 'NOTHING', + self::RELOAD => 'RELOAD', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OnClose::class, \Google\Apps\Card\V1\OpenLink_OnClose::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OpenAs.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OpenAs.php new file mode 100644 index 000000000000..766a2b61633d --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OpenAs.php @@ -0,0 +1,64 @@ +google.apps.card.v1.OpenLink.OpenAs + */ +class OpenAs +{ + /** + * The link opens as a full-size window (if that's the frame used by the + * client). + * + * Generated from protobuf enum FULL_SIZE = 0; + */ + const FULL_SIZE = 0; + /** + * The link opens as an overlay, such as a pop-up. + * + * Generated from protobuf enum OVERLAY = 1; + */ + const OVERLAY = 1; + + private static $valueToName = [ + self::FULL_SIZE => 'FULL_SIZE', + self::OVERLAY => 'OVERLAY', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OpenAs::class, \Google\Apps\Card\V1\OpenLink_OpenAs::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput.php new file mode 100644 index 000000000000..8ae42a18e5d9 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput.php @@ -0,0 +1,439 @@ +google.apps.card.v1.SelectionInput + */ +class SelectionInput extends \Google\Protobuf\Internal\Message +{ + /** + * The name that identifies the selection input in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The text that appears above the selection input field in the user + * interface. + * Specify text that helps the user enter the information your app needs. + * For example, if users are selecting the urgency of a work ticket from a + * drop-down menu, the label might be "Urgency" or "Select urgency". + * + * Generated from protobuf field string label = 2; + */ + protected $label = ''; + /** + * The type of items that are displayed to users in a `SelectionInput` widget. + * Selection types support different types of interactions. For example, users + * can select one or more checkboxes, but they can only select one value from + * a dropdown menu. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.SelectionType type = 3; + */ + protected $type = 0; + /** + * An array of selectable items. For example, an array of radio buttons or + * checkboxes. Supports up to 100 items. + * + * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4; + */ + private $items; + /** + * If specified, the form is submitted when the selection changes. If not + * specified, you must specify a separate button that submits the form. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 5; + */ + protected $on_change_action = null; + /** + * For multiselect menus, the maximum number of items that a user can select. + * Minimum value is 1 item. If unspecified, defaults to 3 items. + * + * Generated from protobuf field int32 multi_select_max_selected_items = 6; + */ + protected $multi_select_max_selected_items = 0; + /** + * For multiselect menus, the number of text characters that a user inputs + * before the app queries autocomplete and displays suggested items + * in the menu. + * If unspecified, defaults to 0 characters for static data sources and 3 + * characters for external data sources. + * + * Generated from protobuf field int32 multi_select_min_query_length = 7; + */ + protected $multi_select_min_query_length = 0; + protected $multi_select_data_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name that identifies the selection input in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type string $label + * The text that appears above the selection input field in the user + * interface. + * Specify text that helps the user enter the information your app needs. + * For example, if users are selecting the urgency of a work ticket from a + * drop-down menu, the label might be "Urgency" or "Select urgency". + * @type int $type + * The type of items that are displayed to users in a `SelectionInput` widget. + * Selection types support different types of interactions. For example, users + * can select one or more checkboxes, but they can only select one value from + * a dropdown menu. + * @type array<\Google\Apps\Card\V1\SelectionInput\SelectionItem>|\Google\Protobuf\Internal\RepeatedField $items + * An array of selectable items. For example, an array of radio buttons or + * checkboxes. Supports up to 100 items. + * @type \Google\Apps\Card\V1\Action $on_change_action + * If specified, the form is submitted when the selection changes. If not + * specified, you must specify a separate button that submits the form. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type int $multi_select_max_selected_items + * For multiselect menus, the maximum number of items that a user can select. + * Minimum value is 1 item. If unspecified, defaults to 3 items. + * @type int $multi_select_min_query_length + * For multiselect menus, the number of text characters that a user inputs + * before the app queries autocomplete and displays suggested items + * in the menu. + * If unspecified, defaults to 0 characters for static data sources and 3 + * characters for external data sources. + * @type \Google\Apps\Card\V1\Action $external_data_source + * An external data source, such as a relational data base. + * @type \Google\Apps\Card\V1\SelectionInput\PlatformDataSource $platform_data_source + * A data source from Google Workspace. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The name that identifies the selection input in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name that identifies the selection input in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The text that appears above the selection input field in the user + * interface. + * Specify text that helps the user enter the information your app needs. + * For example, if users are selecting the urgency of a work ticket from a + * drop-down menu, the label might be "Urgency" or "Select urgency". + * + * Generated from protobuf field string label = 2; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * The text that appears above the selection input field in the user + * interface. + * Specify text that helps the user enter the information your app needs. + * For example, if users are selecting the urgency of a work ticket from a + * drop-down menu, the label might be "Urgency" or "Select urgency". + * + * Generated from protobuf field string label = 2; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * The type of items that are displayed to users in a `SelectionInput` widget. + * Selection types support different types of interactions. For example, users + * can select one or more checkboxes, but they can only select one value from + * a dropdown menu. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.SelectionType type = 3; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of items that are displayed to users in a `SelectionInput` widget. + * Selection types support different types of interactions. For example, users + * can select one or more checkboxes, but they can only select one value from + * a dropdown menu. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.SelectionType type = 3; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\SelectionInput\SelectionType::class); + $this->type = $var; + + return $this; + } + + /** + * An array of selectable items. For example, an array of radio buttons or + * checkboxes. Supports up to 100 items. + * + * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * An array of selectable items. For example, an array of radio buttons or + * checkboxes. Supports up to 100 items. + * + * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4; + * @param array<\Google\Apps\Card\V1\SelectionInput\SelectionItem>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\SelectionInput\SelectionItem::class); + $this->items = $arr; + + return $this; + } + + /** + * If specified, the form is submitted when the selection changes. If not + * specified, you must specify a separate button that submits the form. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 5; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getOnChangeAction() + { + return $this->on_change_action; + } + + public function hasOnChangeAction() + { + return isset($this->on_change_action); + } + + public function clearOnChangeAction() + { + unset($this->on_change_action); + } + + /** + * If specified, the form is submitted when the selection changes. If not + * specified, you must specify a separate button that submits the form. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 5; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setOnChangeAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->on_change_action = $var; + + return $this; + } + + /** + * For multiselect menus, the maximum number of items that a user can select. + * Minimum value is 1 item. If unspecified, defaults to 3 items. + * + * Generated from protobuf field int32 multi_select_max_selected_items = 6; + * @return int + */ + public function getMultiSelectMaxSelectedItems() + { + return $this->multi_select_max_selected_items; + } + + /** + * For multiselect menus, the maximum number of items that a user can select. + * Minimum value is 1 item. If unspecified, defaults to 3 items. + * + * Generated from protobuf field int32 multi_select_max_selected_items = 6; + * @param int $var + * @return $this + */ + public function setMultiSelectMaxSelectedItems($var) + { + GPBUtil::checkInt32($var); + $this->multi_select_max_selected_items = $var; + + return $this; + } + + /** + * For multiselect menus, the number of text characters that a user inputs + * before the app queries autocomplete and displays suggested items + * in the menu. + * If unspecified, defaults to 0 characters for static data sources and 3 + * characters for external data sources. + * + * Generated from protobuf field int32 multi_select_min_query_length = 7; + * @return int + */ + public function getMultiSelectMinQueryLength() + { + return $this->multi_select_min_query_length; + } + + /** + * For multiselect menus, the number of text characters that a user inputs + * before the app queries autocomplete and displays suggested items + * in the menu. + * If unspecified, defaults to 0 characters for static data sources and 3 + * characters for external data sources. + * + * Generated from protobuf field int32 multi_select_min_query_length = 7; + * @param int $var + * @return $this + */ + public function setMultiSelectMinQueryLength($var) + { + GPBUtil::checkInt32($var); + $this->multi_select_min_query_length = $var; + + return $this; + } + + /** + * An external data source, such as a relational data base. + * + * Generated from protobuf field .google.apps.card.v1.Action external_data_source = 8; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getExternalDataSource() + { + return $this->readOneof(8); + } + + public function hasExternalDataSource() + { + return $this->hasOneof(8); + } + + /** + * An external data source, such as a relational data base. + * + * Generated from protobuf field .google.apps.card.v1.Action external_data_source = 8; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setExternalDataSource($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->writeOneof(8, $var); + + return $this; + } + + /** + * A data source from Google Workspace. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9; + * @return \Google\Apps\Card\V1\SelectionInput\PlatformDataSource|null + */ + public function getPlatformDataSource() + { + return $this->readOneof(9); + } + + public function hasPlatformDataSource() + { + return $this->hasOneof(9); + } + + /** + * A data source from Google Workspace. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9; + * @param \Google\Apps\Card\V1\SelectionInput\PlatformDataSource $var + * @return $this + */ + public function setPlatformDataSource($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\SelectionInput\PlatformDataSource::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * @return string + */ + public function getMultiSelectDataSource() + { + return $this->whichOneof("multi_select_data_source"); + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource.php new file mode 100644 index 000000000000..024e15ecdbc6 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource.php @@ -0,0 +1,85 @@ +google.apps.card.v1.SelectionInput.PlatformDataSource + */ +class PlatformDataSource extends \Google\Protobuf\Internal\Message +{ + protected $data_source; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $common_data_source + * A data source shared by all Google Workspace applications, such as + * users in a Google Workspace organization. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * A data source shared by all Google Workspace applications, such as + * users in a Google Workspace organization. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1; + * @return int + */ + public function getCommonDataSource() + { + return $this->readOneof(1); + } + + public function hasCommonDataSource() + { + return $this->hasOneof(1); + } + + /** + * A data source shared by all Google Workspace applications, such as + * users in a Google Workspace organization. + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1; + * @param int $var + * @return $this + */ + public function setCommonDataSource($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\SelectionInput\PlatformDataSource\CommonDataSource::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getDataSource() + { + return $this->whichOneof("data_source"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PlatformDataSource::class, \Google\Apps\Card\V1\SelectionInput_PlatformDataSource::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource/CommonDataSource.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource/CommonDataSource.php new file mode 100644 index 000000000000..21ad04475763 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource/CommonDataSource.php @@ -0,0 +1,61 @@ +google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource + */ +class CommonDataSource +{ + /** + * Default value. Don't use. + * + * Generated from protobuf enum UNKNOWN = 0; + */ + const UNKNOWN = 0; + /** + * Google Workspace users. The user can only view and select users from + * their Google Workspace organization. + * + * Generated from protobuf enum USER = 1; + */ + const USER = 1; + + private static $valueToName = [ + self::UNKNOWN => 'UNKNOWN', + self::USER => 'USER', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CommonDataSource::class, \Google\Apps\Card\V1\SelectionInput_PlatformDataSource_CommonDataSource::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionItem.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionItem.php new file mode 100644 index 000000000000..fbbde773450d --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionItem.php @@ -0,0 +1,245 @@ +google.apps.card.v1.SelectionInput.SelectionItem + */ +class SelectionItem extends \Google\Protobuf\Internal\Message +{ + /** + * The text that identifies or describes the item to users. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * The value associated with this item. The client should use this as a form + * input value. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + /** + * Whether the item is selected by default. If the selection input only + * accepts one value (such as for radio buttons or a dropdown menu), only + * set this field for one item. + * + * Generated from protobuf field bool selected = 3; + */ + protected $selected = false; + /** + * For multiselect menus, the URL for the icon displayed next to + * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` + * URL. For example, + * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. + * + * Generated from protobuf field string start_icon_uri = 4; + */ + protected $start_icon_uri = ''; + /** + * For multiselect menus, a text description or label that's + * displayed below the item's `text` field. + * + * Generated from protobuf field string bottom_text = 5; + */ + protected $bottom_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The text that identifies or describes the item to users. + * @type string $value + * The value associated with this item. The client should use this as a form + * input value. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type bool $selected + * Whether the item is selected by default. If the selection input only + * accepts one value (such as for radio buttons or a dropdown menu), only + * set this field for one item. + * @type string $start_icon_uri + * For multiselect menus, the URL for the icon displayed next to + * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` + * URL. For example, + * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. + * @type string $bottom_text + * For multiselect menus, a text description or label that's + * displayed below the item's `text` field. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The text that identifies or describes the item to users. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The text that identifies or describes the item to users. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * The value associated with this item. The client should use this as a form + * input value. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value associated with this item. The client should use this as a form + * input value. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * Whether the item is selected by default. If the selection input only + * accepts one value (such as for radio buttons or a dropdown menu), only + * set this field for one item. + * + * Generated from protobuf field bool selected = 3; + * @return bool + */ + public function getSelected() + { + return $this->selected; + } + + /** + * Whether the item is selected by default. If the selection input only + * accepts one value (such as for radio buttons or a dropdown menu), only + * set this field for one item. + * + * Generated from protobuf field bool selected = 3; + * @param bool $var + * @return $this + */ + public function setSelected($var) + { + GPBUtil::checkBool($var); + $this->selected = $var; + + return $this; + } + + /** + * For multiselect menus, the URL for the icon displayed next to + * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` + * URL. For example, + * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. + * + * Generated from protobuf field string start_icon_uri = 4; + * @return string + */ + public function getStartIconUri() + { + return $this->start_icon_uri; + } + + /** + * For multiselect menus, the URL for the icon displayed next to + * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` + * URL. For example, + * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. + * + * Generated from protobuf field string start_icon_uri = 4; + * @param string $var + * @return $this + */ + public function setStartIconUri($var) + { + GPBUtil::checkString($var, True); + $this->start_icon_uri = $var; + + return $this; + } + + /** + * For multiselect menus, a text description or label that's + * displayed below the item's `text` field. + * + * Generated from protobuf field string bottom_text = 5; + * @return string + */ + public function getBottomText() + { + return $this->bottom_text; + } + + /** + * For multiselect menus, a text description or label that's + * displayed below the item's `text` field. + * + * Generated from protobuf field string bottom_text = 5; + * @param string $var + * @return $this + */ + public function setBottomText($var) + { + GPBUtil::checkString($var, True); + $this->bottom_text = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SelectionItem::class, \Google\Apps\Card\V1\SelectionInput_SelectionItem::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionType.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionType.php new file mode 100644 index 000000000000..4bdaf77acf90 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionType.php @@ -0,0 +1,106 @@ +google.apps.card.v1.SelectionInput.SelectionType + */ +class SelectionType +{ + /** + * A set of checkboxes. Users can select one or more checkboxes. + * + * Generated from protobuf enum CHECK_BOX = 0; + */ + const CHECK_BOX = 0; + /** + * A set of radio buttons. Users can select one radio button. + * + * Generated from protobuf enum RADIO_BUTTON = 1; + */ + const RADIO_BUTTON = 1; + /** + * A set of switches. Users can turn on one or more switches. + * + * Generated from protobuf enum SWITCH = 2; + */ + const PBSWITCH = 2; + /** + * A dropdown menu. Users can select one item from the menu. + * + * Generated from protobuf enum DROPDOWN = 3; + */ + const DROPDOWN = 3; + /** + * A multiselect menu for static or dynamic data. From the menu bar, + * users select one or more items. Users can also input values to populate + * dynamic data. For example, users can start typing the name of a Google + * Chat space and the widget autosuggests the space. + * To populate items for a multiselect menu, you can use one of the + * following types of data sources: + * * Static data: Items are specified as `SelectionItem` objects in the + * widget. Up to 100 items. + * * Google Workspace data: Items are populated using data from Google + * Workspace, such as Google Workspace users or Google Chat spaces. + * * External data: Items are populated from an external data + * source outside of Google Workspace. + * For examples of how to implement multiselect menus, see + * [Add a multiselect + * menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu). + * [Google Workspace Add-ons and Chat + * apps](https://developers.google.com/workspace/extend): + * Multiselect for Google Workspace Add-ons are in + * Developer Preview. + * + * Generated from protobuf enum MULTI_SELECT = 4; + */ + const MULTI_SELECT = 4; + + private static $valueToName = [ + self::CHECK_BOX => 'CHECK_BOX', + self::RADIO_BUTTON => 'RADIO_BUTTON', + self::PBSWITCH => 'SWITCH', + self::DROPDOWN => 'DROPDOWN', + self::MULTI_SELECT => 'MULTI_SELECT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SelectionType::class, \Google\Apps\Card\V1\SelectionInput_SelectionType::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions.php new file mode 100644 index 000000000000..7efd8f319cfc --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions.php @@ -0,0 +1,84 @@ +google.apps.card.v1.Suggestions + */ +class Suggestions extends \Google\Protobuf\Internal\Message +{ + /** + * A list of suggestions used for autocomplete recommendations in text input + * fields. + * + * Generated from protobuf field repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Card\V1\Suggestions\SuggestionItem>|\Google\Protobuf\Internal\RepeatedField $items + * A list of suggestions used for autocomplete recommendations in text input + * fields. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * A list of suggestions used for autocomplete recommendations in text input + * fields. + * + * Generated from protobuf field repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * A list of suggestions used for autocomplete recommendations in text input + * fields. + * + * Generated from protobuf field repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1; + * @param array<\Google\Apps\Card\V1\Suggestions\SuggestionItem>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Suggestions\SuggestionItem::class); + $this->items = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions/SuggestionItem.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions/SuggestionItem.php new file mode 100644 index 000000000000..b984a0a486ef --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions/SuggestionItem.php @@ -0,0 +1,83 @@ +google.apps.card.v1.Suggestions.SuggestionItem + */ +class SuggestionItem extends \Google\Protobuf\Internal\Message +{ + protected $content; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The value of a suggested input to a text input field. This is + * equivalent to what users enter themselves. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The value of a suggested input to a text input field. This is + * equivalent to what users enter themselves. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->readOneof(1); + } + + public function hasText() + { + return $this->hasOneof(1); + } + + /** + * The value of a suggested input to a text input field. This is + * equivalent to what users enter themselves. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getContent() + { + return $this->whichOneof("content"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SuggestionItem::class, \Google\Apps\Card\V1\Suggestions_SuggestionItem::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput.php new file mode 100644 index 000000000000..60c7cfbed1c4 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput.php @@ -0,0 +1,532 @@ +google.apps.card.v1.TextInput + */ +class TextInput extends \Google\Protobuf\Internal\Message +{ + /** + * The name by which the text input is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The text that appears above the text input field in the user interface. + * Specify text that helps the user enter the information your app needs. + * For example, if you are asking someone's name, but specifically need their + * surname, write `surname` instead of `name`. + * Required if `hintText` is unspecified. Otherwise, optional. + * + * Generated from protobuf field string label = 2; + */ + protected $label = ''; + /** + * Text that appears below the text input field meant to assist users by + * prompting them to enter a certain value. This text is always visible. + * Required if `label` is unspecified. Otherwise, optional. + * + * Generated from protobuf field string hint_text = 3; + */ + protected $hint_text = ''; + /** + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 4; + */ + protected $value = ''; + /** + * How a text input field appears in the user interface. + * For example, whether the field is single or multi-line. + * + * Generated from protobuf field .google.apps.card.v1.TextInput.Type type = 5; + */ + protected $type = 0; + /** + * What to do when a change occurs in the text input field. For example, a + * user adding to the field or deleting text. + * Examples of actions to take include running a custom function or opening + * a [dialog](https://developers.google.com/workspace/chat/dialogs) + * in Google Chat. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; + */ + protected $on_change_action = null; + /** + * Suggested values that users can enter. These values appear when users click + * inside the text input field. As users type, the suggested values + * dynamically filter to match what the users have typed. + * For example, a text input field for programming language might suggest + * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list + * of suggestions filters to show just `Java` and `JavaScript`. + * Suggested values help guide users to enter values that your app can make + * sense of. When referring to JavaScript, some users might enter `javascript` + * and others `java script`. Suggesting `JavaScript` can standardize how users + * interact with your app. + * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set + * to `MULTIPLE_LINE`. + * [Google Workspace + * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Suggestions initial_suggestions = 7; + */ + protected $initial_suggestions = null; + /** + * Optional. Specify what action to take when the text input field provides + * suggestions to users who interact with it. + * If unspecified, the suggestions are set by `initialSuggestions` and + * are processed by the client. + * If specified, the app takes the action specified here, such as running + * a custom function. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Action auto_complete_action = 8; + */ + protected $auto_complete_action = null; + /** + * Text that appears in the text input field when the field is empty. + * Use this text to prompt users to enter a value. For example, `Enter a + * number from 0 to 100`. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field string placeholder_text = 12; + */ + protected $placeholder_text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The name by which the text input is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type string $label + * The text that appears above the text input field in the user interface. + * Specify text that helps the user enter the information your app needs. + * For example, if you are asking someone's name, but specifically need their + * surname, write `surname` instead of `name`. + * Required if `hintText` is unspecified. Otherwise, optional. + * @type string $hint_text + * Text that appears below the text input field meant to assist users by + * prompting them to enter a certain value. This text is always visible. + * Required if `label` is unspecified. Otherwise, optional. + * @type string $value + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * @type int $type + * How a text input field appears in the user interface. + * For example, whether the field is single or multi-line. + * @type \Google\Apps\Card\V1\Action $on_change_action + * What to do when a change occurs in the text input field. For example, a + * user adding to the field or deleting text. + * Examples of actions to take include running a custom function or opening + * a [dialog](https://developers.google.com/workspace/chat/dialogs) + * in Google Chat. + * @type \Google\Apps\Card\V1\Suggestions $initial_suggestions + * Suggested values that users can enter. These values appear when users click + * inside the text input field. As users type, the suggested values + * dynamically filter to match what the users have typed. + * For example, a text input field for programming language might suggest + * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list + * of suggestions filters to show just `Java` and `JavaScript`. + * Suggested values help guide users to enter values that your app can make + * sense of. When referring to JavaScript, some users might enter `javascript` + * and others `java script`. Suggesting `JavaScript` can standardize how users + * interact with your app. + * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set + * to `MULTIPLE_LINE`. + * [Google Workspace + * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * @type \Google\Apps\Card\V1\Action $auto_complete_action + * Optional. Specify what action to take when the text input field provides + * suggestions to users who interact with it. + * If unspecified, the suggestions are set by `initialSuggestions` and + * are processed by the client. + * If specified, the app takes the action specified here, such as running + * a custom function. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * @type string $placeholder_text + * Text that appears in the text input field when the field is empty. + * Use this text to prompt users to enter a value. For example, `Enter a + * number from 0 to 100`. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The name by which the text input is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name by which the text input is identified in a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The text that appears above the text input field in the user interface. + * Specify text that helps the user enter the information your app needs. + * For example, if you are asking someone's name, but specifically need their + * surname, write `surname` instead of `name`. + * Required if `hintText` is unspecified. Otherwise, optional. + * + * Generated from protobuf field string label = 2; + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * The text that appears above the text input field in the user interface. + * Specify text that helps the user enter the information your app needs. + * For example, if you are asking someone's name, but specifically need their + * surname, write `surname` instead of `name`. + * Required if `hintText` is unspecified. Otherwise, optional. + * + * Generated from protobuf field string label = 2; + * @param string $var + * @return $this + */ + public function setLabel($var) + { + GPBUtil::checkString($var, True); + $this->label = $var; + + return $this; + } + + /** + * Text that appears below the text input field meant to assist users by + * prompting them to enter a certain value. This text is always visible. + * Required if `label` is unspecified. Otherwise, optional. + * + * Generated from protobuf field string hint_text = 3; + * @return string + */ + public function getHintText() + { + return $this->hint_text; + } + + /** + * Text that appears below the text input field meant to assist users by + * prompting them to enter a certain value. This text is always visible. + * Required if `label` is unspecified. Otherwise, optional. + * + * Generated from protobuf field string hint_text = 3; + * @param string $var + * @return $this + */ + public function setHintText($var) + { + GPBUtil::checkString($var, True); + $this->hint_text = $var; + + return $this; + } + + /** + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 4; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value entered by a user, returned as part of a form input event. + * For details about working with form inputs, see [Receive form + * data](https://developers.google.com/workspace/chat/read-form-data). + * + * Generated from protobuf field string value = 4; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + + /** + * How a text input field appears in the user interface. + * For example, whether the field is single or multi-line. + * + * Generated from protobuf field .google.apps.card.v1.TextInput.Type type = 5; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * How a text input field appears in the user interface. + * For example, whether the field is single or multi-line. + * + * Generated from protobuf field .google.apps.card.v1.TextInput.Type type = 5; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\TextInput\Type::class); + $this->type = $var; + + return $this; + } + + /** + * What to do when a change occurs in the text input field. For example, a + * user adding to the field or deleting text. + * Examples of actions to take include running a custom function or opening + * a [dialog](https://developers.google.com/workspace/chat/dialogs) + * in Google Chat. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getOnChangeAction() + { + return $this->on_change_action; + } + + public function hasOnChangeAction() + { + return isset($this->on_change_action); + } + + public function clearOnChangeAction() + { + unset($this->on_change_action); + } + + /** + * What to do when a change occurs in the text input field. For example, a + * user adding to the field or deleting text. + * Examples of actions to take include running a custom function or opening + * a [dialog](https://developers.google.com/workspace/chat/dialogs) + * in Google Chat. + * + * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setOnChangeAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->on_change_action = $var; + + return $this; + } + + /** + * Suggested values that users can enter. These values appear when users click + * inside the text input field. As users type, the suggested values + * dynamically filter to match what the users have typed. + * For example, a text input field for programming language might suggest + * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list + * of suggestions filters to show just `Java` and `JavaScript`. + * Suggested values help guide users to enter values that your app can make + * sense of. When referring to JavaScript, some users might enter `javascript` + * and others `java script`. Suggesting `JavaScript` can standardize how users + * interact with your app. + * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set + * to `MULTIPLE_LINE`. + * [Google Workspace + * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Suggestions initial_suggestions = 7; + * @return \Google\Apps\Card\V1\Suggestions|null + */ + public function getInitialSuggestions() + { + return $this->initial_suggestions; + } + + public function hasInitialSuggestions() + { + return isset($this->initial_suggestions); + } + + public function clearInitialSuggestions() + { + unset($this->initial_suggestions); + } + + /** + * Suggested values that users can enter. These values appear when users click + * inside the text input field. As users type, the suggested values + * dynamically filter to match what the users have typed. + * For example, a text input field for programming language might suggest + * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list + * of suggestions filters to show just `Java` and `JavaScript`. + * Suggested values help guide users to enter values that your app can make + * sense of. When referring to JavaScript, some users might enter `javascript` + * and others `java script`. Suggesting `JavaScript` can standardize how users + * interact with your app. + * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set + * to `MULTIPLE_LINE`. + * [Google Workspace + * Add-ons and Chat apps](https://developers.google.com/workspace/extend): + * + * Generated from protobuf field .google.apps.card.v1.Suggestions initial_suggestions = 7; + * @param \Google\Apps\Card\V1\Suggestions $var + * @return $this + */ + public function setInitialSuggestions($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Suggestions::class); + $this->initial_suggestions = $var; + + return $this; + } + + /** + * Optional. Specify what action to take when the text input field provides + * suggestions to users who interact with it. + * If unspecified, the suggestions are set by `initialSuggestions` and + * are processed by the client. + * If specified, the app takes the action specified here, such as running + * a custom function. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Action auto_complete_action = 8; + * @return \Google\Apps\Card\V1\Action|null + */ + public function getAutoCompleteAction() + { + return $this->auto_complete_action; + } + + public function hasAutoCompleteAction() + { + return isset($this->auto_complete_action); + } + + public function clearAutoCompleteAction() + { + unset($this->auto_complete_action); + } + + /** + * Optional. Specify what action to take when the text input field provides + * suggestions to users who interact with it. + * If unspecified, the suggestions are set by `initialSuggestions` and + * are processed by the client. + * If specified, the app takes the action specified here, such as running + * a custom function. + * [Google Workspace + * Add-ons](https://developers.google.com/workspace/add-ons): + * + * Generated from protobuf field .google.apps.card.v1.Action auto_complete_action = 8; + * @param \Google\Apps\Card\V1\Action $var + * @return $this + */ + public function setAutoCompleteAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); + $this->auto_complete_action = $var; + + return $this; + } + + /** + * Text that appears in the text input field when the field is empty. + * Use this text to prompt users to enter a value. For example, `Enter a + * number from 0 to 100`. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field string placeholder_text = 12; + * @return string + */ + public function getPlaceholderText() + { + return $this->placeholder_text; + } + + /** + * Text that appears in the text input field when the field is empty. + * Use this text to prompt users to enter a value. For example, `Enter a + * number from 0 to 100`. + * [Google Chat apps](https://developers.google.com/workspace/chat): + * + * Generated from protobuf field string placeholder_text = 12; + * @param string $var + * @return $this + */ + public function setPlaceholderText($var) + { + GPBUtil::checkString($var, True); + $this->placeholder_text = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput/Type.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput/Type.php new file mode 100644 index 000000000000..0bd6f1608c34 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput/Type.php @@ -0,0 +1,62 @@ +google.apps.card.v1.TextInput.Type + */ +class Type +{ + /** + * The text input field has a fixed height of one line. + * + * Generated from protobuf enum SINGLE_LINE = 0; + */ + const SINGLE_LINE = 0; + /** + * The text input field has a fixed height of multiple lines. + * + * Generated from protobuf enum MULTIPLE_LINE = 1; + */ + const MULTIPLE_LINE = 1; + + private static $valueToName = [ + self::SINGLE_LINE => 'SINGLE_LINE', + self::MULTIPLE_LINE => 'MULTIPLE_LINE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Apps\Card\V1\TextInput_Type::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextParagraph.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextParagraph.php new file mode 100644 index 000000000000..029cb54e8a3c --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextParagraph.php @@ -0,0 +1,79 @@ +google.apps.card.v1.TextParagraph + */ +class TextParagraph extends \Google\Protobuf\Internal\Message +{ + /** + * The text that's shown in the widget. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The text that's shown in the widget. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * The text that's shown in the widget. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The text that's shown in the widget. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget.php new file mode 100644 index 000000000000..9299d133d355 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget.php @@ -0,0 +1,1062 @@ +google.apps.card.v1.Widget + */ +class Widget extends \Google\Protobuf\Internal\Message +{ + /** + * Specifies whether widgets align to the left, right, or center of a column. + * + * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; + */ + protected $horizontal_alignment = 0; + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\TextParagraph $text_paragraph + * Displays a text paragraph. Supports simple HTML formatted text. For more + * information about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * For example, the following JSON creates a bolded text: + * ``` + * "textParagraph": { + * "text": " bold text" + * } + * ``` + * @type \Google\Apps\Card\V1\Image $image + * Displays an image. + * For example, the following JSON creates an image with alternative text: + * ``` + * "image": { + * "imageUrl": + * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", + * "altText": "Chat app avatar" + * } + * ``` + * @type \Google\Apps\Card\V1\DecoratedText $decorated_text + * Displays a decorated text item. + * For example, the following JSON creates a decorated text widget showing + * email address: + * ``` + * "decoratedText": { + * "icon": { + * "knownIcon": "EMAIL" + * }, + * "topLabel": "Email Address", + * "text": "sasha@example.com", + * "bottomLabel": "This is a new Email address!", + * "switchControl": { + * "name": "has_send_welcome_email_to_sasha", + * "selected": false, + * "controlType": "CHECKBOX" + * } + * } + * ``` + * @type \Google\Apps\Card\V1\ButtonList $button_list + * A list of buttons. + * For example, the following JSON creates two buttons. The first + * is a blue text button and the second is an image button that opens a + * link: + * ``` + * "buttonList": { + * "buttons": [ + * { + * "text": "Edit", + * "color": { + * "red": 0, + * "green": 0, + * "blue": 1, + * "alpha": 1 + * }, + * "disabled": true, + * }, + * { + * "icon": { + * "knownIcon": "INVITE", + * "altText": "check calendar" + * }, + * "onClick": { + * "openLink": { + * "url": "https://example.com/calendar" + * } + * } + * } + * ] + * } + * ``` + * @type \Google\Apps\Card\V1\TextInput $text_input + * Displays a text box that users can type into. + * For example, the following JSON creates a text input for an email + * address: + * ``` + * "textInput": { + * "name": "mailing_address", + * "label": "Mailing Address" + * } + * ``` + * As another example, the following JSON creates a text input for a + * programming language with static suggestions: + * ``` + * "textInput": { + * "name": "preferred_programing_language", + * "label": "Preferred Language", + * "initialSuggestions": { + * "items": [ + * { + * "text": "C++" + * }, + * { + * "text": "Java" + * }, + * { + * "text": "JavaScript" + * }, + * { + * "text": "Python" + * } + * ] + * } + * } + * ``` + * @type \Google\Apps\Card\V1\SelectionInput $selection_input + * Displays a selection control that lets users select items. Selection + * controls can be checkboxes, radio buttons, switches, or dropdown menus. + * For example, the following JSON creates a dropdown menu that lets users + * choose a size: + * ``` + * "selectionInput": { + * "name": "size", + * "label": "Size" + * "type": "DROPDOWN", + * "items": [ + * { + * "text": "S", + * "value": "small", + * "selected": false + * }, + * { + * "text": "M", + * "value": "medium", + * "selected": true + * }, + * { + * "text": "L", + * "value": "large", + * "selected": false + * }, + * { + * "text": "XL", + * "value": "extra_large", + * "selected": false + * } + * ] + * } + * ``` + * @type \Google\Apps\Card\V1\DateTimePicker $date_time_picker + * Displays a widget that lets users input a date, time, or date and time. + * For example, the following JSON creates a date time picker to schedule an + * appointment: + * ``` + * "dateTimePicker": { + * "name": "appointment_time", + * "label": "Book your appointment at:", + * "type": "DATE_AND_TIME", + * "valueMsEpoch": "796435200000" + * } + * ``` + * @type \Google\Apps\Card\V1\Divider $divider + * Displays a horizontal line divider between widgets. + * For example, the following JSON creates a divider: + * ``` + * "divider": { + * } + * ``` + * @type \Google\Apps\Card\V1\Grid $grid + * Displays a grid with a collection of items. + * A grid supports any number of columns and items. The number of rows is + * determined by the upper bounds of the number items divided by the number + * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 + * items and 2 columns has 6 rows. + * [Google Workspace Add-ons and + * Chat apps](https://developers.google.com/workspace/extend): + * For example, the following JSON creates a 2 column grid with a single + * item: + * ``` + * "grid": { + * "title": "A fine collection of items", + * "columnCount": 2, + * "borderStyle": { + * "type": "STROKE", + * "cornerRadius": 4 + * }, + * "items": [ + * { + * "image": { + * "imageUri": "https://www.example.com/image.png", + * "cropStyle": { + * "type": "SQUARE" + * }, + * "borderStyle": { + * "type": "STROKE" + * } + * }, + * "title": "An item", + * "textAlignment": "CENTER" + * } + * ], + * "onClick": { + * "openLink": { + * "url": "https://www.example.com" + * } + * } + * } + * ``` + * @type \Google\Apps\Card\V1\Columns $columns + * Displays up to 2 columns. + * To include more than 2 columns, or to use rows, use the `Grid` widget. + * For example, the following JSON creates 2 columns that each contain + * text paragraphs: + * ``` + * "columns": { + * "columnItems": [ + * { + * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + * "horizontalAlignment": "CENTER", + * "verticalAlignment": "CENTER", + * "widgets": [ + * { + * "textParagraph": { + * "text": "First column text paragraph" + * } + * } + * ] + * }, + * { + * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + * "horizontalAlignment": "CENTER", + * "verticalAlignment": "CENTER", + * "widgets": [ + * { + * "textParagraph": { + * "text": "Second column text paragraph" + * } + * } + * ] + * } + * ] + * } + * ``` + * @type int $horizontal_alignment + * Specifies whether widgets align to the left, right, or center of a column. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); + parent::__construct($data); + } + + /** + * Displays a text paragraph. Supports simple HTML formatted text. For more + * information about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * For example, the following JSON creates a bolded text: + * ``` + * "textParagraph": { + * "text": " bold text" + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.TextParagraph text_paragraph = 1; + * @return \Google\Apps\Card\V1\TextParagraph|null + */ + public function getTextParagraph() + { + return $this->readOneof(1); + } + + public function hasTextParagraph() + { + return $this->hasOneof(1); + } + + /** + * Displays a text paragraph. Supports simple HTML formatted text. For more + * information about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * For example, the following JSON creates a bolded text: + * ``` + * "textParagraph": { + * "text": " bold text" + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.TextParagraph text_paragraph = 1; + * @param \Google\Apps\Card\V1\TextParagraph $var + * @return $this + */ + public function setTextParagraph($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\TextParagraph::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Displays an image. + * For example, the following JSON creates an image with alternative text: + * ``` + * "image": { + * "imageUrl": + * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", + * "altText": "Chat app avatar" + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Image image = 2; + * @return \Google\Apps\Card\V1\Image|null + */ + public function getImage() + { + return $this->readOneof(2); + } + + public function hasImage() + { + return $this->hasOneof(2); + } + + /** + * Displays an image. + * For example, the following JSON creates an image with alternative text: + * ``` + * "image": { + * "imageUrl": + * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", + * "altText": "Chat app avatar" + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Image image = 2; + * @param \Google\Apps\Card\V1\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Image::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Displays a decorated text item. + * For example, the following JSON creates a decorated text widget showing + * email address: + * ``` + * "decoratedText": { + * "icon": { + * "knownIcon": "EMAIL" + * }, + * "topLabel": "Email Address", + * "text": "sasha@example.com", + * "bottomLabel": "This is a new Email address!", + * "switchControl": { + * "name": "has_send_welcome_email_to_sasha", + * "selected": false, + * "controlType": "CHECKBOX" + * } + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText decorated_text = 3; + * @return \Google\Apps\Card\V1\DecoratedText|null + */ + public function getDecoratedText() + { + return $this->readOneof(3); + } + + public function hasDecoratedText() + { + return $this->hasOneof(3); + } + + /** + * Displays a decorated text item. + * For example, the following JSON creates a decorated text widget showing + * email address: + * ``` + * "decoratedText": { + * "icon": { + * "knownIcon": "EMAIL" + * }, + * "topLabel": "Email Address", + * "text": "sasha@example.com", + * "bottomLabel": "This is a new Email address!", + * "switchControl": { + * "name": "has_send_welcome_email_to_sasha", + * "selected": false, + * "controlType": "CHECKBOX" + * } + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.DecoratedText decorated_text = 3; + * @param \Google\Apps\Card\V1\DecoratedText $var + * @return $this + */ + public function setDecoratedText($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DecoratedText::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A list of buttons. + * For example, the following JSON creates two buttons. The first + * is a blue text button and the second is an image button that opens a + * link: + * ``` + * "buttonList": { + * "buttons": [ + * { + * "text": "Edit", + * "color": { + * "red": 0, + * "green": 0, + * "blue": 1, + * "alpha": 1 + * }, + * "disabled": true, + * }, + * { + * "icon": { + * "knownIcon": "INVITE", + * "altText": "check calendar" + * }, + * "onClick": { + * "openLink": { + * "url": "https://example.com/calendar" + * } + * } + * } + * ] + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 4; + * @return \Google\Apps\Card\V1\ButtonList|null + */ + public function getButtonList() + { + return $this->readOneof(4); + } + + public function hasButtonList() + { + return $this->hasOneof(4); + } + + /** + * A list of buttons. + * For example, the following JSON creates two buttons. The first + * is a blue text button and the second is an image button that opens a + * link: + * ``` + * "buttonList": { + * "buttons": [ + * { + * "text": "Edit", + * "color": { + * "red": 0, + * "green": 0, + * "blue": 1, + * "alpha": 1 + * }, + * "disabled": true, + * }, + * { + * "icon": { + * "knownIcon": "INVITE", + * "altText": "check calendar" + * }, + * "onClick": { + * "openLink": { + * "url": "https://example.com/calendar" + * } + * } + * } + * ] + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 4; + * @param \Google\Apps\Card\V1\ButtonList $var + * @return $this + */ + public function setButtonList($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ButtonList::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Displays a text box that users can type into. + * For example, the following JSON creates a text input for an email + * address: + * ``` + * "textInput": { + * "name": "mailing_address", + * "label": "Mailing Address" + * } + * ``` + * As another example, the following JSON creates a text input for a + * programming language with static suggestions: + * ``` + * "textInput": { + * "name": "preferred_programing_language", + * "label": "Preferred Language", + * "initialSuggestions": { + * "items": [ + * { + * "text": "C++" + * }, + * { + * "text": "Java" + * }, + * { + * "text": "JavaScript" + * }, + * { + * "text": "Python" + * } + * ] + * } + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.TextInput text_input = 5; + * @return \Google\Apps\Card\V1\TextInput|null + */ + public function getTextInput() + { + return $this->readOneof(5); + } + + public function hasTextInput() + { + return $this->hasOneof(5); + } + + /** + * Displays a text box that users can type into. + * For example, the following JSON creates a text input for an email + * address: + * ``` + * "textInput": { + * "name": "mailing_address", + * "label": "Mailing Address" + * } + * ``` + * As another example, the following JSON creates a text input for a + * programming language with static suggestions: + * ``` + * "textInput": { + * "name": "preferred_programing_language", + * "label": "Preferred Language", + * "initialSuggestions": { + * "items": [ + * { + * "text": "C++" + * }, + * { + * "text": "Java" + * }, + * { + * "text": "JavaScript" + * }, + * { + * "text": "Python" + * } + * ] + * } + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.TextInput text_input = 5; + * @param \Google\Apps\Card\V1\TextInput $var + * @return $this + */ + public function setTextInput($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\TextInput::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Displays a selection control that lets users select items. Selection + * controls can be checkboxes, radio buttons, switches, or dropdown menus. + * For example, the following JSON creates a dropdown menu that lets users + * choose a size: + * ``` + * "selectionInput": { + * "name": "size", + * "label": "Size" + * "type": "DROPDOWN", + * "items": [ + * { + * "text": "S", + * "value": "small", + * "selected": false + * }, + * { + * "text": "M", + * "value": "medium", + * "selected": true + * }, + * { + * "text": "L", + * "value": "large", + * "selected": false + * }, + * { + * "text": "XL", + * "value": "extra_large", + * "selected": false + * } + * ] + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput selection_input = 6; + * @return \Google\Apps\Card\V1\SelectionInput|null + */ + public function getSelectionInput() + { + return $this->readOneof(6); + } + + public function hasSelectionInput() + { + return $this->hasOneof(6); + } + + /** + * Displays a selection control that lets users select items. Selection + * controls can be checkboxes, radio buttons, switches, or dropdown menus. + * For example, the following JSON creates a dropdown menu that lets users + * choose a size: + * ``` + * "selectionInput": { + * "name": "size", + * "label": "Size" + * "type": "DROPDOWN", + * "items": [ + * { + * "text": "S", + * "value": "small", + * "selected": false + * }, + * { + * "text": "M", + * "value": "medium", + * "selected": true + * }, + * { + * "text": "L", + * "value": "large", + * "selected": false + * }, + * { + * "text": "XL", + * "value": "extra_large", + * "selected": false + * } + * ] + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.SelectionInput selection_input = 6; + * @param \Google\Apps\Card\V1\SelectionInput $var + * @return $this + */ + public function setSelectionInput($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\SelectionInput::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Displays a widget that lets users input a date, time, or date and time. + * For example, the following JSON creates a date time picker to schedule an + * appointment: + * ``` + * "dateTimePicker": { + * "name": "appointment_time", + * "label": "Book your appointment at:", + * "type": "DATE_AND_TIME", + * "valueMsEpoch": "796435200000" + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker date_time_picker = 7; + * @return \Google\Apps\Card\V1\DateTimePicker|null + */ + public function getDateTimePicker() + { + return $this->readOneof(7); + } + + public function hasDateTimePicker() + { + return $this->hasOneof(7); + } + + /** + * Displays a widget that lets users input a date, time, or date and time. + * For example, the following JSON creates a date time picker to schedule an + * appointment: + * ``` + * "dateTimePicker": { + * "name": "appointment_time", + * "label": "Book your appointment at:", + * "type": "DATE_AND_TIME", + * "valueMsEpoch": "796435200000" + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.DateTimePicker date_time_picker = 7; + * @param \Google\Apps\Card\V1\DateTimePicker $var + * @return $this + */ + public function setDateTimePicker($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DateTimePicker::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Displays a horizontal line divider between widgets. + * For example, the following JSON creates a divider: + * ``` + * "divider": { + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Divider divider = 9; + * @return \Google\Apps\Card\V1\Divider|null + */ + public function getDivider() + { + return $this->readOneof(9); + } + + public function hasDivider() + { + return $this->hasOneof(9); + } + + /** + * Displays a horizontal line divider between widgets. + * For example, the following JSON creates a divider: + * ``` + * "divider": { + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Divider divider = 9; + * @param \Google\Apps\Card\V1\Divider $var + * @return $this + */ + public function setDivider($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Divider::class); + $this->writeOneof(9, $var); + + return $this; + } + + /** + * Displays a grid with a collection of items. + * A grid supports any number of columns and items. The number of rows is + * determined by the upper bounds of the number items divided by the number + * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 + * items and 2 columns has 6 rows. + * [Google Workspace Add-ons and + * Chat apps](https://developers.google.com/workspace/extend): + * For example, the following JSON creates a 2 column grid with a single + * item: + * ``` + * "grid": { + * "title": "A fine collection of items", + * "columnCount": 2, + * "borderStyle": { + * "type": "STROKE", + * "cornerRadius": 4 + * }, + * "items": [ + * { + * "image": { + * "imageUri": "https://www.example.com/image.png", + * "cropStyle": { + * "type": "SQUARE" + * }, + * "borderStyle": { + * "type": "STROKE" + * } + * }, + * "title": "An item", + * "textAlignment": "CENTER" + * } + * ], + * "onClick": { + * "openLink": { + * "url": "https://www.example.com" + * } + * } + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Grid grid = 10; + * @return \Google\Apps\Card\V1\Grid|null + */ + public function getGrid() + { + return $this->readOneof(10); + } + + public function hasGrid() + { + return $this->hasOneof(10); + } + + /** + * Displays a grid with a collection of items. + * A grid supports any number of columns and items. The number of rows is + * determined by the upper bounds of the number items divided by the number + * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 + * items and 2 columns has 6 rows. + * [Google Workspace Add-ons and + * Chat apps](https://developers.google.com/workspace/extend): + * For example, the following JSON creates a 2 column grid with a single + * item: + * ``` + * "grid": { + * "title": "A fine collection of items", + * "columnCount": 2, + * "borderStyle": { + * "type": "STROKE", + * "cornerRadius": 4 + * }, + * "items": [ + * { + * "image": { + * "imageUri": "https://www.example.com/image.png", + * "cropStyle": { + * "type": "SQUARE" + * }, + * "borderStyle": { + * "type": "STROKE" + * } + * }, + * "title": "An item", + * "textAlignment": "CENTER" + * } + * ], + * "onClick": { + * "openLink": { + * "url": "https://www.example.com" + * } + * } + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Grid grid = 10; + * @param \Google\Apps\Card\V1\Grid $var + * @return $this + */ + public function setGrid($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Grid::class); + $this->writeOneof(10, $var); + + return $this; + } + + /** + * Displays up to 2 columns. + * To include more than 2 columns, or to use rows, use the `Grid` widget. + * For example, the following JSON creates 2 columns that each contain + * text paragraphs: + * ``` + * "columns": { + * "columnItems": [ + * { + * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + * "horizontalAlignment": "CENTER", + * "verticalAlignment": "CENTER", + * "widgets": [ + * { + * "textParagraph": { + * "text": "First column text paragraph" + * } + * } + * ] + * }, + * { + * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + * "horizontalAlignment": "CENTER", + * "verticalAlignment": "CENTER", + * "widgets": [ + * { + * "textParagraph": { + * "text": "Second column text paragraph" + * } + * } + * ] + * } + * ] + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Columns columns = 11; + * @return \Google\Apps\Card\V1\Columns|null + */ + public function getColumns() + { + return $this->readOneof(11); + } + + public function hasColumns() + { + return $this->hasOneof(11); + } + + /** + * Displays up to 2 columns. + * To include more than 2 columns, or to use rows, use the `Grid` widget. + * For example, the following JSON creates 2 columns that each contain + * text paragraphs: + * ``` + * "columns": { + * "columnItems": [ + * { + * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + * "horizontalAlignment": "CENTER", + * "verticalAlignment": "CENTER", + * "widgets": [ + * { + * "textParagraph": { + * "text": "First column text paragraph" + * } + * } + * ] + * }, + * { + * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", + * "horizontalAlignment": "CENTER", + * "verticalAlignment": "CENTER", + * "widgets": [ + * { + * "textParagraph": { + * "text": "Second column text paragraph" + * } + * } + * ] + * } + * ] + * } + * ``` + * + * Generated from protobuf field .google.apps.card.v1.Columns columns = 11; + * @param \Google\Apps\Card\V1\Columns $var + * @return $this + */ + public function setColumns($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Columns::class); + $this->writeOneof(11, $var); + + return $this; + } + + /** + * Specifies whether widgets align to the left, right, or center of a column. + * + * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; + * @return int + */ + public function getHorizontalAlignment() + { + return $this->horizontal_alignment; + } + + /** + * Specifies whether widgets align to the left, right, or center of a column. + * + * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; + * @param int $var + * @return $this + */ + public function setHorizontalAlignment($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\HorizontalAlignment::class); + $this->horizontal_alignment = $var; + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/HorizontalAlignment.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/HorizontalAlignment.php new file mode 100644 index 000000000000..e7e24749522d --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/HorizontalAlignment.php @@ -0,0 +1,76 @@ +google.apps.card.v1.Widget.HorizontalAlignment + */ +class HorizontalAlignment +{ + /** + * Don't use. Unspecified. + * + * Generated from protobuf enum HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; + */ + const HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; + /** + * Default value. Aligns widgets to the start position of the column. For + * left-to-right layouts, aligns to the left. For right-to-left layouts, + * aligns to the right. + * + * Generated from protobuf enum START = 1; + */ + const START = 1; + /** + * Aligns widgets to the center of the column. + * + * Generated from protobuf enum CENTER = 2; + */ + const CENTER = 2; + /** + * Aligns widgets to the end position of the column. For left-to-right + * layouts, aligns widgets to the right. For right-to-left layouts, aligns + * widgets to the left. + * + * Generated from protobuf enum END = 3; + */ + const END = 3; + + private static $valueToName = [ + self::HORIZONTAL_ALIGNMENT_UNSPECIFIED => 'HORIZONTAL_ALIGNMENT_UNSPECIFIED', + self::START => 'START', + self::CENTER => 'CENTER', + self::END => 'END', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(HorizontalAlignment::class, \Google\Apps\Card\V1\Widget_HorizontalAlignment::class); + diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/ImageType.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/ImageType.php new file mode 100644 index 000000000000..f1cee4017576 --- /dev/null +++ b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/ImageType.php @@ -0,0 +1,61 @@ +google.apps.card.v1.Widget.ImageType + */ +class ImageType +{ + /** + * Default value. Applies a square mask to the image. For example, a 4x3 + * image becomes 3x3. + * + * Generated from protobuf enum SQUARE = 0; + */ + const SQUARE = 0; + /** + * Applies a circular mask to the image. For example, a 4x3 image becomes a + * circle with a diameter of 3. + * + * Generated from protobuf enum CIRCLE = 1; + */ + const CIRCLE = 1; + + private static $valueToName = [ + self::SQUARE => 'SQUARE', + self::CIRCLE => 'CIRCLE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ImageType::class, \Google\Apps\Card\V1\Widget_ImageType::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ActionStatus.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ActionStatus.php new file mode 100644 index 000000000000..809c8f272695 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ActionStatus.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' + +"google/chat/v1/action_status.protogoogle.chat.v1"R + ActionStatus% + status_code (2.google.rpc.Code +user_facing_message ( B +com.google.chat.v1BActionStatusProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Annotation.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Annotation.php new file mode 100644 index 0000000000000000000000000000000000000000..af1277287045334b969d2e12c284b22c8b90a02b GIT binary patch literal 2391 zcmb7G>rUfF6kaC~HYX6Wv#8C&E(}?u4HXzAt=h_zt(*%GEx9NOs9RaG9A}bPO>E1a zpl&Pv_Zj-LQmd-3&^|$*r0OH^t25(Vz@#_+0ORjFbG~oRoHL(&?hagdiO+~lJcE)h z?!3cvK(OmM)G?hQ?u>gq;$hPnxz><)GRCDkuGQPPT&lEp8P#{jo=Ftkcbxu^9GL@y z9$n{-4BK|7K`qCYMJxc@7!lt!OoGoEg({&&*Pw=WCTLob(X^}FF@QNVd>^YbI(!S5 z{kY@K&@!>lW14u+@^#C$sAUYTZ&=nRxMvJ~!srjNy|HcbJTNEJZIfj8aS)SZ_gsgm zJi*gM8eBLNtyOGFJlhy*CE}Z&L~N@3Z|A;__a>_iM28FSUY_0YK)(Bwyz?9}s3jg5uhI7K%7#*#@67 zzeND%)r1aUiN145TEbE`nctT0?^vfm5zxRI2@zNkQWR%=NAATPg#W|tm=0pXMU96>4KzD z29~&9;bS7d5#EJU(8m+6xoydOb`d7zh0I;g(Qc6MzSgDq4?Ml6tie&zfU}KRzXcwX#hyG)ppWMrHKb+^Hup&{k0jrY}(|LCj zr4UDmHL>7~bgL^0A&TCIb?RCDKJk3L%et1+7iau9llyO40b-TfRsBtwN&PhfsqiT> zGooY95;Ehc49R&xh;k2(;4myL97dil2>(BY^{!`Klc2D8yA}!)`4{0hB@W|NRbn7k z&?;>3yQ_egL4f7D08m!(+W*at}mEyU6QK`Mr7nDU3pwz5fmG#rg zMVVCx`@eXuw)Iv+Ei%^%F<9aXGGD;jy=>7(kPKAv&$>r?lUjKm&Qj30z$WRTClDW5 zBcjjTjc0z6;K>6e=n$5L3&GJ8wr|xfcqSTK(0UBl@?};pN5TMf1Ti}Bh|v|zCSKUN zRiDG=B79rGP!3kuT=k9qr2Go_R(%0mix|}a_W^-qsL$=dmRe&|UFElFk-I5ay=;}6 z`t-s{%z(Alh1xpTi}h+%t(8&{v6v&!$g1o5a*c-wt+x3})~R+yMLqrCQiU literal 0 HcmV?d00001 diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Attachment.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Attachment.php new file mode 100644 index 0000000000000000000000000000000000000000..1609b69644668bc8ee18ae9b6ac7f4f608e3d08e GIT binary patch literal 1793 zcma)7TaVL56ed|3mcz0v<`(FMAL{h^gSSiT#7P>lBvJMv6K@||yvzyBeg$8aC@NJJ9MNq{D=5T6qi zCyXJBn#Y5)&b3hz7%b)N%Uz_XIR$S>h85%@~`7q~XsoZyYxpm~-sU zk4VH#6$>E3M0qY>p4hx9j5^$wciFeL(h+IN~oKBp`~5-^N>Qh$VWOzHa|W}?d-bW+GjHZGcW z`w=HeghSUMsh`l8vt%S(Eo(;jk}hefKg!d}aCD05x<<=7RpbuhNk&$)Ba{%HCDFF3 zTLxGx-`q23vSaFYDG7rXnd4*163Z&ODuR3nIwtwF&O|9HzJ5yc#_b?j_SqG)uP-Z; zbv}f5>u~oYLpL_HgDF*E9yjmY&H*^4jU+Ed>!bGf8bC31V*}1h!Bk7ARKIB4h7F&I zx+3l=Ygt-bYj5ne)g%5YCe^j#=tsC#$k3B=^Aa+xo);dMzPV@qyEd~(?g-B@nf`Rn z*oMs@p~s{EUr^xB-UmCap7lm>2zX~vy?2S6@ez)Iow$2%w0M597*zvmk z-Og6YxDHzfqurtHbR4fe9PD=n`&(tpduzKce4$3BDH794O|bzQ1x1FXu5#LVt)7d9 zxZ5e75n;&R7Aq@2Sc^d{S^(=O!>D};8>`$IH{h~nd@3a8(V(hEU3&&si{v@a()UC} zS{7O?ci~o%&C6m%GG{MIln2{|>pjAYcw_QQMpABkyQ;a?S8wd{I~#qBi5h`h2P((u zfKQ+j<3y-d%eZx4h5X$3^el3pYX(JE>#}#Hb17A&^K$J4R8OZ#V-}^vczU+bB_01q z=&e6WV2Js?C+gOfq9e5yN2M2!{g7qB(otw)#`Mk?A`xp}HWp8|_2c*QCFkdXJ?bm; zpXF;kwd_qhj#INOSHfZQuM?~5O0%oK1maWhwtQ2&Tb4YqED5lz!{(%-J}6HfF89%6 Uy;oP(@CR40^3;oR0SkbC08|n;q5uE@ literal 0 HcmV?d00001 diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ChatService.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ChatService.php new file mode 100644 index 0000000000000000000000000000000000000000..cedd67f16eefe1a07ef67cacb2dc16529b8de43c GIT binary patch literal 7235 zcmbtZ&2QX96lW_a?W7;cgtRpMa@@2{w;L}>MG;O5a+@@&pl#H&m8e#V9PcD+y1O>E zH&I(65C{$&K%y5u1QHyO%7H(mH{itHkT~&IF!N@{U$fh+LoVz1ef{RWH}Aa}UwYeb z_~?|jNZKT@BU0B^A8Jv9Xnx>Dp5ryO)y~=)2{gxR`EHX0hNjKm(r(_mqb8#C~`5|UuUb%+7l5Ng{k68g47w8f<>H%MgH?Z~bzf?(|` z6|CKxnM25F+F_`%|ChNudWtrM6TD?n82;JL#EDYTqon5^gX)J%bG;8#MVyNUAx|nNYJ*MwRsXcf$K+JutZr+ zbDc!7$Jm>xbHXfB=dNi}9HVI}ATMiC&>?B-nii0#6SU_5H&d_`Kh=8p$@1Nr)oy#t z3tl@k&16l9ihhDun=WZbgUg7Z)T}77oknX%vNuR;l>}kK^^4oRLBh~pC&dMC6B{C4 zTymKu=nlmeHg@D8Fi8>DmuXOUYI~Vx(GEO(rx8%YJ1`#a5}Kn6EkAnL+h?%3rr&bK zRb7bUdsT{nz`@(`cOn@v+CHf04_rqHJam*~~5wVOi#R2tp}75=(}4suPh5{CFp zZ#*%Bgj74bEu(;CWMQ4e$NM=8jNp&Z{zXC^Bu%RE%aA3Y@jRYHgI?)cFR~^Nevts! zi#S#^RA7%r4R0a@7GOi+iM-x~CQbKEo$0h)8IQbOFvHRX|4vi)u1|-L{;8WGZ)^YK zQr8-lN!tOCpMgLKy3rR`oW1vFW{Zm857GX4(j?DWQid#-bVzz#?s)@h zxt{fCnP+%k=5GbN@)15-}LNy zq7kcmDbFHtO-Z+i4r8c{V%J@O7*Fd{y*FD5me~P3W~q$dM~Kw}==-6X`3X(p(errH zECR_`*LnfK?8AtG;pLI;vVF_M4xEOtrWC?7RoYVuVU|f)JSHuU;*rFn8G<>yhW5~u z0IT?99>1hWgJXFHkkj>a4vgVZH3zov1KO9M4{=k9t5U>mtW9*SmqIrFfg4Bllp9S> zzz#xm(7Nk$TT0DJXxo@N3MR(%;f&wd1V_{3^AZ~31*p%GQp9cSTnS5UH%EccA$4<$5ul^!%%8N1%{y+CA7IiDOon56yl z1M!Lko`xvY&gy!P#4_2LH-W+e^9YSxbKCWKHz1B2EwEB66c&lCPm)gpiWB%)Di_ui zGe6RbCI_mxWvdk}&mwIrl{VG37if~ilb6&Dpw8>hA0kX7`Z+z_;oqR<^0q3q^sKpA zmO&8S?OKNtOG++ZoaN;=VaX2Kmxua*ggMM64}4=Ge%x-fn}pl6{8KLNB3y>O%Bk7)h!A(q_2 zf0fWHndTwUDP^-4*PsBSu5}FBO6rKI?Acqhb4mY6G4h?e-Ac^iyaD`631RBf+=T`{ zm-nX1BiE%&DLGyGd^#!Kz^^A=L&3|>*en?QDHViI`LGO8g&QMvBgxzVvV^CU@I-_D zS{m6YJdq#+KgCG_3SmN~%@z)&iIP5t(iDS4qPCrQ9_0pZ(|cYxE7M%vFN)Bb+oad2 zP=X}DTnXCZiOW@tKi&Jx8io0rUn|hdozS2?`48)>y^SdHL$g}l+}sr5mDH-;i5hVG zY}oad+cxTODykHaNV-V4Lop+uo7HPK9~P14fhsOh(AcUM4Q8W=<6M~52Gd*Ey(t01 z_WitG$W3k--G`mCB6cj6x*_^k~vV=&nJqHCF z)&X~^gT*Z;6uaTdQ`&oIY09;lE5oS^Q@Af*D&4O*O|MgrIlWeO-Q!=)XbBS^&ivIm zR`~qYpLY$-zjxDGx(?F6?iyW$k7b7C`=P;<8~0|O$+xu{dtKvS(&(qOe|H_??54>G nrpW|M^WMzrZn*8aa5lbtukg=OsjpalzhD6;|I)ODwh;OcKY9ht literal 0 HcmV?d00001 diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ContextualAddon.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ContextualAddon.php new file mode 100644 index 0000000000000000000000000000000000000000..9b4adf8b86ed9c189d26bf9edf384b3611354b0d GIT binary patch literal 1493 zcmb7E-A)rh6t<-ldO%WFRDxcNh@m8~O)+}0h_bW=8ih8t)Ic`bOn0a4hV9N~cNRs% z3-}mbn)o8Vfv@0|58#C}J4^XfBfaQuX20{D?>pzrdH&Mx`|t>D5sw6z5gT=m5$hA= z2b58Zx~LO%yCgss9r%t*0u`Z39qrazs9LGD9`ewTMu9~%)T6ZLlA_hetawx^TGV6Y zJ&UkwV%w&k8Z!cTctAoQTLf)2Hg*WZHfGq^ii3?Z4>sDRRRGJyVTj5@5?ye>M?n1N zM;+I(P{=Ujk9j9F9nWD7cAXF0z#8geHzb_nDz+PW7IUbFL_poMNMR94PJx~GDL1@^ zPSrF-4Y+@!#;pV%c8v-Nt-$da4H_J(X+6S*l@lk0#U!nubGoP?HEP-wk!y$r5jme7 zp@6U`@K$5pg5YHMX8gTY##_hcGD1x|^K?cLTUvhMBnEgDhk7@8I}5`MBHsf1%EIIS z>Z39xVXA1idQ_VGGzxbvbgS;|;NURwXMbiOQ^tX|lsuOob>vA};FUd?a0a+X%#a;(*a$zIT3Nq_r?X^gO%OE& zk8%rgk~Rulscdc?;2hvS+^g;ATUE2!+J9X&_ja3&YPq&qt5)(ilpKu4AM+^%Agj0a zmi{K6p52DA(+W;qXlG7YhOu{Y6qB|*xNJdAYBClFvPekD*L;7qZUVhN#B;MOVxcpRK@;M+of-(r-mVp4Y}9&V*8Q4E8&_ZK4_W< h(6n}`la1HolZD}hT#^go+&=m1E{T!y&Y!>uz;9rd(`x_# literal 0 HcmV?d00001 diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/DeletionMetadata.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/DeletionMetadata.php new file mode 100644 index 0000000000000000000000000000000000000000..0fe6a8e5df12023ac54bd3170049c7c18625ab87 GIT binary patch literal 1037 zcma)5(QeZ)6eS%S!i6nL#efGSGbYwaTdKlaNyMymSfi($nvgX1umop&Tm<1$qmzW_R zF{Eaa07Phs6N)?xJ9ewP-gG({+i7#QGp;uP@IsU%&{(T%aNsk5{G;hK3_O@H#Q1U? zByJD|EI?uKiC>`!XDCcC7rBX@rI9CWK|$z89%uY(`Ib@! zciIC}AN2>aq#S_q(AL|g+kf9P2XaZd3wCv*YxU$E2T zRKUSnz#Ut<%Q5n<@(@(Ego=&5)^`agJm=T$)OxV7ya{2J3S0Vk=7l8n3piQU<|NNQ zq5*#bqN8-$$d|9BvN7rDww1BJl`47SRh`mA6|q;x^&gw6 jO%nu78`r0M*{gbaQq2D>kJVNR|CzuHnTKr!Rsj3~32{Wk literal 0 HcmV?d00001 diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/EventPayload.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/EventPayload.php new file mode 100644 index 000000000000..002a8589e7f5 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/EventPayload.php @@ -0,0 +1,71 @@ +internalAddGeneratedFile( + ' + +"google/chat/v1/event_payload.protogoogle.chat.v1google/chat/v1/membership.protogoogle/chat/v1/message.protogoogle/chat/v1/reaction.protogoogle/chat/v1/space.proto"L +MembershipCreatedEventData. + +membership ( 2.google.chat.v1.Membership"L +MembershipDeletedEventData. + +membership ( 2.google.chat.v1.Membership"L +MembershipUpdatedEventData. + +membership ( 2.google.chat.v1.Membership"b +MembershipBatchCreatedEventData? + memberships ( 2*.google.chat.v1.MembershipCreatedEventData"b +MembershipBatchUpdatedEventData? + memberships ( 2*.google.chat.v1.MembershipUpdatedEventData"b +MembershipBatchDeletedEventData? + memberships ( 2*.google.chat.v1.MembershipDeletedEventData"C +MessageCreatedEventData( +message ( 2.google.chat.v1.Message"C +MessageUpdatedEventData( +message ( 2.google.chat.v1.Message"C +MessageDeletedEventData( +message ( 2.google.chat.v1.Message"Y +MessageBatchCreatedEventData9 +messages ( 2\'.google.chat.v1.MessageCreatedEventData"Y +MessageBatchUpdatedEventData9 +messages ( 2\'.google.chat.v1.MessageUpdatedEventData"Y +MessageBatchDeletedEventData9 +messages ( 2\'.google.chat.v1.MessageDeletedEventData"= +SpaceUpdatedEventData$ +space ( 2.google.chat.v1.Space"S +SpaceBatchUpdatedEventData5 +spaces ( 2%.google.chat.v1.SpaceUpdatedEventData"F +ReactionCreatedEventData* +reaction ( 2.google.chat.v1.Reaction"F +ReactionDeletedEventData* +reaction ( 2.google.chat.v1.Reaction"\\ +ReactionBatchCreatedEventData; + reactions ( 2(.google.chat.v1.ReactionCreatedEventData"\\ +ReactionBatchDeletedEventData; + reactions ( 2(.google.chat.v1.ReactionDeletedEventDataB +com.google.chat.v1BEventPayloadProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Group.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Group.php new file mode 100644 index 000000000000..5032c0f55dde --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Group.php @@ -0,0 +1,30 @@ +internalAddGeneratedFile( + ' + +google/chat/v1/group.protogoogle.chat.v1" +Group +name ( B +com.google.chat.v1B +GroupProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/HistoryState.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/HistoryState.php new file mode 100644 index 0000000000000000000000000000000000000000..7ddf20031fdd6920dcc6cfb9a957c8a523c9f7fc GIT binary patch literal 851 zcmah{-HH=27`46dA}edHAb25s>cVzqol?9@tspkM7OUy?G4YhP&dn58(OcVLntF# zmP3j^=)!bHi%u6Invy(+OUE#?1n4^g^T{GkIR(pUjuW0QdB!y- zDgS1q_aGr@&J4kQY*J)YbCH2a+)gJ7ngm!zgdE{rBsf?u2kmXcy zX;umi6yr71)tlK$>+Ei-oJNfAiR^(^1v{J$pqMUH)-82gf?f4jDtr5Z-|6VD zR@K7}7Xg)?q`|Ig=+^98=5vmG7qdvH;p{7ZU_xG5=lfxn98;7;8=QI_?s)CAb zdo5gwh~y?nR-=r&?)XtZ8eRqc&@a1h>rY*FyuOsVX9MIdI=}YSD6-|q1! literal 0 HcmV?d00001 diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/MatchedUrl.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/MatchedUrl.php new file mode 100644 index 000000000000..bcea53750339 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/MatchedUrl.php @@ -0,0 +1,31 @@ +internalAddGeneratedFile( + ' + + google/chat/v1/matched_url.protogoogle.chat.v1" + +MatchedUrl +url ( BAB +com.google.chat.v1BMatchedUrlProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Membership.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Membership.php new file mode 100644 index 0000000000000000000000000000000000000000..1aede18ab0240dbd530cdfc53955fd9f890339e5 GIT binary patch literal 2784 zcmb_e&2HO95RPP9u}6k2FsZG$MZHym#4ZvEa)K71;}n!7D+*#+kYxich!PaFk`|#z zmP@)#4ZlO5peTAO`Y3%0UwX;Cm!7&mBqjgBDq3Ge@6IMq=)pr&#}4+* z0QXS$Jqm^xdA=LCmTRMK*zaQ>S?J z4b7l*QZ9|~sEd6%BwkVY0&vU`rk-hGRBu)GabWh$z|`vkrtdPCeq7!Luxyi3w4cD? z6cGFK!mdp$L<2KmKaU7Ch(iKm+T=$T^$zNrHpL8n)wUlxRzO?_alnCN;f+lseRA7J zp382zgW^D1{Nn7=dcz5@@0hk;#nkeN7r1_lnX2jl2MJw#Wn(ismb)W;v>{_u)hj{n zpui9DiAY;CpSUcILg-4s3X?7AQOuqra>AMewqUq7nM?mSzeF%6iRI@R384VA^23pF9T$u(;}<+ z(gfrc%yDJoe41gFwmvUjymoPHI`MhP5tW&9ZAN(sv%YKN{9OUxoC@A%0FF*6k0CP> zJt05C@Y${Vm+@R`ukR?&U{R22MAmb{`lHL%LeI?nOUPP2W-%I^u>7pBUW=_`Hj9a< zDw%U_j>p4*J#6C`I6p10@GUHlnG*CU2tL`b?N@5;!`F?LaoEv1HRGsx*sAR|_8PTn z?v4VGd2`TcvhS3Vg}aUBaihcjNh>*6WX;&n4Cx>@Q|Q3b*gxk_S%;4&+_w+jUiQ8W zS+N@VNO7-nL2GLDT056ks~$0zW~Bb1umO41n>=!87Ew$e%-a;(@4 zvo|7+VOkcZG|zQ2U-+4Yc;vA`g|CKq@hDzMQyldIvZ3%NiuZDWiQbY1cyoZf4CV`e zreNhQp}{yj+WwCeuE2t44zNMlWEBC<$qHNr5bJ^a4m+X>7v#o0$n=TLrllY)TFgV1 z4&Cn!QH(U7;n7O-2e2r1h;u^Ni$nB-XzRK}@XDGm3}N-kHL2%16f2BUDJq_F%JedG zdm=K*Dl9wrhrpP)67OpZg+AP`;|V@vI$vDqn2{cDEs5)HBr``~wJI9OICcO3QT$5t zmETgJux1{2wWtg#6Md+~Up=kVH%~3w4SR_p8vp}WKIzy*U^9tBz3#UB`8A!be%;hs z4T1hWeXlOwaz)MaXmOVh!{hQF@v5%#WnDh>*h}w2dPSP6D&J654p7zOayKKY;Q5ne b5{>6Ip#H^bAr| zdXCexNWnPLgTnDfp-+5Y?~yzc1Yqm9;OYiZwi~5g66jq$&^z0Vr&C6r&eM(i0EVUe zzOu`C;Wa4u=Y|KCX()c62l!bvea*DZz|<}C52)`07*w z?T*4_QrcD5LHiykkroYVGMd||*#Yrv-Re|`Z+NB~I9>xui^U!ZVn@-HwL9WiD$YDq z*0_$v;)s$Dl)wwg;OUCuks$Q!`%G^t;57c#Im1V)Yj(CwVs%U8NIy0muULF%)jJ{Y zV{H-x=)RAkD`nbR(UCC$|=QmY}$vkmQLJ z7TZayeVV5lb|jjpf@UQlg7q4)7de~;fI2k9loMN#Zmdfo_7@H*#AuGo}cl z?BN8tUjU{=!;)rUf;KuirKHwoq&txIiQOfhJcj>gHka~T$tV-@H1|v6Z`5(=9%Kx( zIv^SqFOM_&m54q%J0E9mDg8#Be50nM?;(rc2(-|}hAOzPew3S?`76k+1oI4jNnkhOTp?9>65cU0ei_p!} zmQxy&Q_?z2Gj{EGQ@+9^#14riAnh|VII49ev__9J-Iw8P1~n$(D&B&0aD!KNta;`hY{;QH(qdO%rPhZ01Ki}vD{t9_K7^t#C(wy z!y6{{YDPs>oRC&vPWO5t?PXl(0u{>D|251F6@$FUbhG1~Xs^sJ4z#|!&X{kEFh_*X z7+taaR(%N9SmkjT!~W&x5rqpvN9iUj5x?-7eNUq+04@llPjfdQGoX}|h4IicIb1Rg zbAKL#%V%0HZ46>-=}Sb-|EkwNtk7BD$e}pS+%uq+f@AUL)LZqBaOW&@&sOirM~yG= z3`j(@@R~1=B*tm(C8P!X4EL3*0HUg1kQ3G`7#yUE58tW}u&n5ukqD8Hb0eW77lQ%f zKTdQ1nSl9W5R!gGz&~+$Pn+NTW;9Lcs2f36KKju{78=nB9%GBOK&Iw|gs9cU>zmWl zcvXvbH-cIfM#RaEwhEf@Ow>vf=36+huu-`dkiL&q zK55b)n2xkvZA3D4*Tp=iL)h^~{vD6)hQYwU$hqN9P(+G?rW)oe*{NI$7Sv%dk-me>K^O#%ty!iY2*<<_H01FT zquW8UN0&;|kmfm)+k(Yy5{P1Il9wSmc@!hYK86vw-@+1uZ1R7LlICC%harQoFiq$F znt~;s4hhkBVXDttoiO}rG9v^7&D1fe02!Y2Y%CSCzmkG?H(%< z)^=05e~iOYnN6ArrM`uQclr1 z7BS7^L8R?}ify6wDd{Iz63*f?gyy)knB-|BncuvZ^xRptREPZBpVN% zi4V>F38YaT90CZ*mYSyd}o zeamopn6lo~w$$2Ab}aWx3O=JLFSPKZ1iw&}7GcJvbCr(|W-NUsv5J8$1rc+D2(sBu9h3TQ*WZts9mTc4I0W%z6%gj>Sohz9ZmV;2zxPpTCb~ zD$n=SMvZa*YwWXa_7s~}X|pTS3F7I-zoXSohc0*cJ1ss3z8$;5$%{q0Q7lr1V)5z5 kL7L4|-`{6wca7z$cWSC7~`97)+!X71nZERcJ$~>==@$EwKVb0&QiD*JEesdS|;c z8$pq|=7K98fs0=77+m%#xaJXh#r*7U9EU_m_06o$oHOV9zB%X2onNBe2(F`b5|S7T z(nH-BNbC|6#Y`}t1*n_!`y@s_8%8uBv4c=+3q9C+gzmLAA6=87oF%bOTr^;85RjU` zi$!g(UW*C#1!bY5PXY+>knjlm1g*E5zY~FbSYU5m2YG8U$lIx}0Qdps9Brq;@Dh;x zMM*cHKH>rkxhzuNp&=C%2lQ`=cop?=z=;e#?AuR5jRL8Ft11o8LpxX zMq81VguTsBkT}GF*CO1HX(U+OmaeWlAR?DaS*kbEwCXt8M^%H-bq|4DMIuhfcy@$h zB9b^<(YVzCqx{SJf=G>sdiN;_dQGy6_b7{9cc0b%AxDL7lk}#(Ix4*t?=dGwW(8SE6NZs6_syg1(!&a zW~=hSf|FSZ*{5Jy)n3^`R<&e%OE9fG%LVy&Zh780n9xyNo5hcfqP+++WXPV;a#4FO zOnTl^o9>fOjUD)2!!;*Kq}-9+Qp*AStjnI)Ug~vJlYPMPfJj67HOiYs+OobGRXQ-E zbJ*wLL=sY;^->ZWQ}%5* zZsip$tVxp~S-NfVS33pufWfKo<}OI?cc9**QEbDjywbI}<~tSY8d`4tvgBp`=1Umow8W~%t{h2H$f z0$W!8gv!ltGC}otZCg)o`T-x!X8d1cZH8m!7>i=d|&r@d4yeINO`Bb=I++9~~xULFt-JN=ORzFKWF69&IrkT%U QinternalAddGeneratedFile( + ' + +"google/chat/v1/slash_command.protogoogle.chat.v1"" + SlashCommand + +command_id (B +com.google.chat.v1BSlashCommandProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Space.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Space.php new file mode 100644 index 0000000000000000000000000000000000000000..5504f5780ffdd9120a567312053453a8169b86e8 GIT binary patch literal 4890 zcmb_g-EQ015sqZbu}6+9AKQtn7#l{-Hcq=M*WQc8DotBTqHS%hA4sy%6aolZJhr%@ zNS36s>n?(#1qu{>jP|Zi(d)iMbG;AHi(Ylk98#8KC5;!W8%gBMH*>!EIdjg>f9VZ8 z_>pqN9qt<;HCs{^2&qWRlNyBY5>abh{R&OlS$jg59U^??;e-cY?Bvd{-37TYSBr-;QJr&)V}N_GB*S3o|eSNs%tXALV;K zt_8||%&NT$5j=f}OhhP;B9yU27%x`}6#labDJlfE3X7tAatS4|yTbNhF}(74E{Xp# z2l?W(<3&;_c2T07$|c^a3+yuhsyv<4fYct%S0iPi%N_v>ECV{OE zif!&5`LQz#Fj*rk2We~Qxqhe*U6bds@$wSvb4d4*u#oE_)VX!?W*omb4~pZoFE71S zQ-bO*Ad77=)D3KBuOn^tf3=B&9auBWq2*xH#PqanBzzDKm=ov2;ZUOPeFyYSKv5Tn_A7WWkpVjY#~OW`t{x`TzsC z99br}k(z+I!AkxV)@DM)eheRdARyi8$@NN z^8ZXgW;$x@*RUD~U9>&&DRc0%`CLuw7NfsHPeyqQmW`2VaonSG)GjC~3SUBcLX_=5 zPOVh5PDk%_)vl(WHaab>Qah|^)$ARXhP$nH?F?UJ6D$j>)mo?0Jk#20`9#Ym^M76f zb~6W96Sk2Jcl`mYf2yVp3Yy?4YcDse@P_Rm#~S2Z(UsJGNI$@eeT&;*H~g- zy3NY&B20M)^0>#pBcI9-U`uQYH*%xA4r}^!oXcCVA!>9cX5|d5#s&ocWd_;!f6Qe$ z3mJWi7s8)jUj7i)ZzM48U0Lb9ABYU0{aFkh%edRGjSD1tArgAIP=rOA7d9c=ec75V z%4Jw=H=A{=$R$Wt>)B-C3|6SMky0M+cUo#i)90wJ;PfNjp>77?sNFnm>6K%(n@utX znQE=ARl0f|yMcP7Wfuy6O2CE$o|**M$M85ZaopC_YOQfJw|i{CdY1&WY7E*zOSmes zJo$71$=En;+!S9d`~h~}x8txP{G`>^s@h?#fru@wU9WXIwPr)_Xx%Ql)|u&PXsFUW zIZ?~aw%R4Rh>`oi)JCIu+NfxCtjI`CX4;FtwV z z=nOY}7d!QG;g6#5xZ(E))8U+_A$!UCWS~VCNnu4###o*h7^E=c{43h0XdFy3928vN z6z7pE+Ir}5qVN@LPP_2Kgk885x;Qq=oD^=Q3OcYVxA_eBKVUM{Az#6(7Ga`B2Z^a5 z-_}r}0uSfHMHD^xpmP2@W*l~rnOZLcxz-XlC#}S9Kk3`<$Q;XH)46ozWe|2DybltU z;hjI1Uw=!ct1laBt47-YNNya_RZvmIU9DIVhw!ugf5lIGJ@L3F?}_lD=)2^7DPAgx s7p0O=D3#9k&zC57KYKbp{C^^^UM6m8#4+9K&$*=`NqLv@2HpVt4>2b0W&i*H literal 0 HcmV?d00001 diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceEvent.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceEvent.php new file mode 100644 index 0000000000000000000000000000000000000000..28b3baeaed4a5528b3cbcc9376a7b039bc9e9bf7 GIT binary patch literal 3151 zcma);-EJF26vuHw1DU3cx`ouZw4FFDaZ$R)1#z(?jvx;eC)0__BeKKHX5Jvn{)o>?4I-0H*`S34y@w|8)Tz>r2E553Tbol&ocBj|-gN_-sI5FVYt?@wCr+0k)pTez}t6nWTz{V?qNxali zDE{cE;}Z`uj<|R{B&~&?>!4e+P@HOB)wXS_vyE*Y#5Ss#MSqlel9Dzk{(S?0N!MB%;9c49`5erZ z)-4+V4V7N`RdIIxX~B*oOptb}l4Yg#7Zm5$6r%wOLPUo8xa~z)zODNGYRmU1zoD4! zZUT+dwj0{zP6A;=cE zuTff71Mr>#erg0NQ4Q3W;NB1qJ2+wkLQS>0Wrj9VCqtz!Lk*Eyi=c)`TbCj=ROlc1 z(q4Z$lm8@CLxFw-JDL3FcI*R%E>BB4LCv9^q7nD;!`5eDL&>BiVIrv2 z?7&WD>qHpq4%iIvFI+4QA{u@5in{9e9I!+wruwC}Iq_9XQZx5@&-24kH#HRH>xX)u z7WEV>wY-&f_VweBmD_c-IonlAnSCgioU_WG$*JqgV^^=$Vy}L?vZc)(NB-bA(!p`g fDxEd8eSE%~u2_3|NzLrEbN5+gskhEC7z6M>eY+f8 literal 0 HcmV?d00001 diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceReadState.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceReadState.php new file mode 100644 index 000000000000..40bb79eed855 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceReadState.php @@ -0,0 +1,41 @@ +internalAddGeneratedFile( + ' + +%google/chat/v1/space_read_state.protogoogle.chat.v1google/api/resource.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto" +SpaceReadState +name ( 7 +last_read_time ( 2.google.protobuf.TimestampBA:cA` +"chat.googleapis.com/SpaceReadState*users/{user}/spaces/{space}/spaceReadState2spaceReadState"T +GetSpaceReadStateRequest8 +name ( B*AA$ +"chat.googleapis.com/SpaceReadState" +UpdateSpaceReadStateRequest= +space_read_state ( 2.google.chat.v1.SpaceReadStateBA4 + update_mask ( 2.google.protobuf.FieldMaskBAB +com.google.chat.v1BSpaceReadStateProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceSetup.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceSetup.php new file mode 100644 index 000000000000..ee6cbcbaa165 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceSetup.php @@ -0,0 +1,35 @@ +internalAddGeneratedFile( + ' + + google/chat/v1/space_setup.protogoogle.chat.v1google/chat/v1/membership.protogoogle/chat/v1/space.proto" +SetUpSpaceRequest) +space ( 2.google.chat.v1.SpaceBA + +request_id ( BA4 + memberships ( 2.google.chat.v1.MembershipBAB +com.google.chat.v1BSpaceSetupProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ThreadReadState.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ThreadReadState.php new file mode 100644 index 000000000000..d8c72b7e4905 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ThreadReadState.php @@ -0,0 +1,37 @@ +internalAddGeneratedFile( + ' + +&google/chat/v1/thread_read_state.protogoogle.chat.v1google/api/resource.protogoogle/protobuf/timestamp.proto" +ThreadReadState +name ( 2 +last_read_time ( 2.google.protobuf.Timestamp:wAt +#chat.googleapis.com/ThreadReadStateH72Fj0I6gCP?YBnLm?f{c4JCoU25;VL_ zFTL>EXYeV!_9>j%1zK(4X4!Ag`F_uN_kqticnLcsAOcI`!SNEx8G&3d$z0~caWt6_ z0bMrd)F;A%u-S*b{s6X`-N6e*4Ot{yg5Z>~sZYx849oJOQjS6ejz=orv#su3+IFV~GU)nqb87+^z0gY1DEPz9ghTO-?Q5;R_Xe0f*o;DwYtjFe< z1|#a__hYnE1R1&HB)_L#kKPolf9qSifHhD6omZ&`2P|05Srq0E6yaf<_xLr)#E_>T zH@LD}qhar}-8%2KyRByKftdw+ABPw9Ud}KNK)TT%y*5eJt8f=?8S(b@$zO=2B9e1Qm?d8_L5ubI+Waxtz~F4^Kk4E$?%mM^3`W z^6*qnPPiOKK@yAtPaaN>j(8-Gf=TFlJgUfYLzla{C94h1x{1&@m_{RBm5+nq*yFpS z6DQeyvA6rRJ3i(~ToHi)d}qSr&>3-g->7wX;*6cd8SD$pppKY9fA2BC$aCUY{xZeF zcOc_mI30TKNRAUH!N(mpwq4&%T*q_2MZQnuBgcz5V&C>Xn);)}4SbmZxQ9L{onDbXksgGL8Jlf;R~x0Zr6@uOOZ98CEWJwR1X)?IG^biW2!ja$?uptz& zXAx3ic9sSZ!ptMovdHZ;1bKqk)5sI&7SMJP3P}*!o-^d0C}%<1h8%h&+)qktSl@zl z4KB_M_GIcMuIKu^RKQnx=`w5#1FYy|7GYfg&L)@@Epn~|rH>#x6Fw(U=V^~trk2A# zMuKszkTQ<~uY3aQqA-+TT2jiIrljy+^`~T=IOL4E=S7#b-m z%vlZ7Hawq(I2?3$r=?p+Q~o{!xmh1cpF-9V_w4y5q!~mLMff8v9RDEXzKuOFZ{FqO zucLPxom&@ZHs~u-z6$xdRVu>jqA=y3GXSqnlgc2aJnacjPJ*#55=(1%06>=?zTi=e z-AuR1CrgLmRp3gR4PAu-Uw#1FZ`y9(HP~Y10vGLjuS)^mZFTTR5V{hT5x}nn8~2U5cW16s^rbx&+&5 zU+r49p_)zI?5HNYENua##-6HJ>>a!cwwi5izh&8qX=;6?%@}1fvo%yhF|9*WW!n_F zrCVy7Wht`wX`8yBx>s3G`Z;!AgYg9JVdZ zXsbv~#|M)ry54Le#rG%>GVWnIMKT*L9rfEJn5p(G<tI0ULAr9`&h^*ImDIgjr5DvI0jkyh-Y_dRw?}su Y%f|h5hdHzI{Oh_SJk!nQCAgoogle.chat.v1.AccessoryWidget + */ +class AccessoryWidget extends \Google\Protobuf\Internal\Message +{ + protected $action; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\ButtonList $button_list + * A list of buttons. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * A list of buttons. + * + * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 1; + * @return \Google\Apps\Card\V1\ButtonList|null + */ + public function getButtonList() + { + return $this->readOneof(1); + } + + public function hasButtonList() + { + return $this->hasOneof(1); + } + + /** + * A list of buttons. + * + * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 1; + * @param \Google\Apps\Card\V1\ButtonList $var + * @return $this + */ + public function setButtonList($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ButtonList::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * @return string + */ + public function getAction() + { + return $this->whichOneof("action"); + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse.php new file mode 100644 index 000000000000..ab29fb67f3d4 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse.php @@ -0,0 +1,201 @@ +google.chat.v1.ActionResponse + */ +class ActionResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. The type of Chat app response. + * + * Generated from protobuf field .google.chat.v1.ActionResponse.ResponseType type = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $type = 0; + /** + * Input only. URL for users to authenticate or configure. (Only for + * `REQUEST_CONFIG` response types.) + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $url = ''; + /** + * Input only. A response to an interaction event related to a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Must be + * accompanied by `ResponseType.Dialog`. + * + * Generated from protobuf field .google.chat.v1.DialogAction dialog_action = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $dialog_action = null; + /** + * Input only. The response of the updated widget. + * + * Generated from protobuf field .google.chat.v1.ActionResponse.UpdatedWidget updated_widget = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $updated_widget = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * Input only. The type of Chat app response. + * @type string $url + * Input only. URL for users to authenticate or configure. (Only for + * `REQUEST_CONFIG` response types.) + * @type \Google\Apps\Chat\V1\DialogAction $dialog_action + * Input only. A response to an interaction event related to a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Must be + * accompanied by `ResponseType.Dialog`. + * @type \Google\Apps\Chat\V1\ActionResponse\UpdatedWidget $updated_widget + * Input only. The response of the updated widget. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Input only. The type of Chat app response. + * + * Generated from protobuf field .google.chat.v1.ActionResponse.ResponseType type = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * Input only. The type of Chat app response. + * + * Generated from protobuf field .google.chat.v1.ActionResponse.ResponseType type = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\ActionResponse\ResponseType::class); + $this->type = $var; + + return $this; + } + + /** + * Input only. URL for users to authenticate or configure. (Only for + * `REQUEST_CONFIG` response types.) + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Input only. URL for users to authenticate or configure. (Only for + * `REQUEST_CONFIG` response types.) + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + + /** + * Input only. A response to an interaction event related to a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Must be + * accompanied by `ResponseType.Dialog`. + * + * Generated from protobuf field .google.chat.v1.DialogAction dialog_action = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Apps\Chat\V1\DialogAction|null + */ + public function getDialogAction() + { + return $this->dialog_action; + } + + public function hasDialogAction() + { + return isset($this->dialog_action); + } + + public function clearDialogAction() + { + unset($this->dialog_action); + } + + /** + * Input only. A response to an interaction event related to a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Must be + * accompanied by `ResponseType.Dialog`. + * + * Generated from protobuf field .google.chat.v1.DialogAction dialog_action = 3 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Apps\Chat\V1\DialogAction $var + * @return $this + */ + public function setDialogAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DialogAction::class); + $this->dialog_action = $var; + + return $this; + } + + /** + * Input only. The response of the updated widget. + * + * Generated from protobuf field .google.chat.v1.ActionResponse.UpdatedWidget updated_widget = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Apps\Chat\V1\ActionResponse\UpdatedWidget|null + */ + public function getUpdatedWidget() + { + return $this->updated_widget; + } + + public function hasUpdatedWidget() + { + return isset($this->updated_widget); + } + + public function clearUpdatedWidget() + { + unset($this->updated_widget); + } + + /** + * Input only. The response of the updated widget. + * + * Generated from protobuf field .google.chat.v1.ActionResponse.UpdatedWidget updated_widget = 4 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Apps\Chat\V1\ActionResponse\UpdatedWidget $var + * @return $this + */ + public function setUpdatedWidget($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ActionResponse\UpdatedWidget::class); + $this->updated_widget = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/ResponseType.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/ResponseType.php new file mode 100644 index 000000000000..cc00e73c7d90 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/ResponseType.php @@ -0,0 +1,96 @@ +google.chat.v1.ActionResponse.ResponseType + */ +class ResponseType +{ + /** + * Default type that's handled as `NEW_MESSAGE`. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Post as a new message in the topic. + * + * Generated from protobuf enum NEW_MESSAGE = 1; + */ + const NEW_MESSAGE = 1; + /** + * Update the Chat app's message. This is only permitted on a `CARD_CLICKED` + * event where the message sender type is `BOT`. + * + * Generated from protobuf enum UPDATE_MESSAGE = 2; + */ + const UPDATE_MESSAGE = 2; + /** + * Update the cards on a user's message. This is only permitted as a + * response to a `MESSAGE` event with a matched url, or a `CARD_CLICKED` + * event where the message sender type is `HUMAN`. Text is ignored. + * + * Generated from protobuf enum UPDATE_USER_MESSAGE_CARDS = 6; + */ + const UPDATE_USER_MESSAGE_CARDS = 6; + /** + * Privately ask the user for additional authentication or configuration. + * + * Generated from protobuf enum REQUEST_CONFIG = 3; + */ + const REQUEST_CONFIG = 3; + /** + * Presents a + * [dialog](https://developers.google.com/workspace/chat/dialogs). + * + * Generated from protobuf enum DIALOG = 4; + */ + const DIALOG = 4; + /** + * Widget text autocomplete options query. + * + * Generated from protobuf enum UPDATE_WIDGET = 7; + */ + const UPDATE_WIDGET = 7; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::NEW_MESSAGE => 'NEW_MESSAGE', + self::UPDATE_MESSAGE => 'UPDATE_MESSAGE', + self::UPDATE_USER_MESSAGE_CARDS => 'UPDATE_USER_MESSAGE_CARDS', + self::REQUEST_CONFIG => 'REQUEST_CONFIG', + self::DIALOG => 'DIALOG', + self::UPDATE_WIDGET => 'UPDATE_WIDGET', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ResponseType::class, \Google\Apps\Chat\V1\ActionResponse_ResponseType::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/SelectionItems.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/SelectionItems.php new file mode 100644 index 000000000000..b51465c4205f --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/SelectionItems.php @@ -0,0 +1,70 @@ +google.chat.v1.ActionResponse.SelectionItems + */ +class SelectionItems extends \Google\Protobuf\Internal\Message +{ + /** + * An array of the SelectionItem objects. + * + * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 1; + */ + private $items; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Card\V1\SelectionInput\SelectionItem>|\Google\Protobuf\Internal\RepeatedField $items + * An array of the SelectionItem objects. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * An array of the SelectionItem objects. + * + * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getItems() + { + return $this->items; + } + + /** + * An array of the SelectionItem objects. + * + * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 1; + * @param array<\Google\Apps\Card\V1\SelectionInput\SelectionItem>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setItems($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\SelectionInput\SelectionItem::class); + $this->items = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SelectionItems::class, \Google\Apps\Chat\V1\ActionResponse_SelectionItems::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/UpdatedWidget.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/UpdatedWidget.php new file mode 100644 index 000000000000..f07309fbfb7e --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/UpdatedWidget.php @@ -0,0 +1,117 @@ +google.chat.v1.ActionResponse.UpdatedWidget + */ +class UpdatedWidget extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the updated widget. The ID must match the one for the + * widget that triggered the update request. + * + * Generated from protobuf field string widget = 2; + */ + protected $widget = ''; + protected $updated_widget; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\ActionResponse\SelectionItems $suggestions + * List of widget autocomplete results + * @type string $widget + * The ID of the updated widget. The ID must match the one for the + * widget that triggered the update request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * List of widget autocomplete results + * + * Generated from protobuf field .google.chat.v1.ActionResponse.SelectionItems suggestions = 1; + * @return \Google\Apps\Chat\V1\ActionResponse\SelectionItems|null + */ + public function getSuggestions() + { + return $this->readOneof(1); + } + + public function hasSuggestions() + { + return $this->hasOneof(1); + } + + /** + * List of widget autocomplete results + * + * Generated from protobuf field .google.chat.v1.ActionResponse.SelectionItems suggestions = 1; + * @param \Google\Apps\Chat\V1\ActionResponse\SelectionItems $var + * @return $this + */ + public function setSuggestions($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ActionResponse\SelectionItems::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The ID of the updated widget. The ID must match the one for the + * widget that triggered the update request. + * + * Generated from protobuf field string widget = 2; + * @return string + */ + public function getWidget() + { + return $this->widget; + } + + /** + * The ID of the updated widget. The ID must match the one for the + * widget that triggered the update request. + * + * Generated from protobuf field string widget = 2; + * @param string $var + * @return $this + */ + public function setWidget($var) + { + GPBUtil::checkString($var, True); + $this->widget = $var; + + return $this; + } + + /** + * @return string + */ + public function getUpdatedWidget() + { + return $this->whichOneof("updated_widget"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(UpdatedWidget::class, \Google\Apps\Chat\V1\ActionResponse_UpdatedWidget::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionStatus.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionStatus.php new file mode 100644 index 000000000000..687ef00ac63c --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionStatus.php @@ -0,0 +1,106 @@ +google.chat.v1.ActionStatus + */ +class ActionStatus extends \Google\Protobuf\Internal\Message +{ + /** + * The status code. + * + * Generated from protobuf field .google.rpc.Code status_code = 1; + */ + protected $status_code = 0; + /** + * The message to send users about the status of their request. + * If unset, a generic message based on the `status_code` is sent. + * + * Generated from protobuf field string user_facing_message = 2; + */ + protected $user_facing_message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $status_code + * The status code. + * @type string $user_facing_message + * The message to send users about the status of their request. + * If unset, a generic message based on the `status_code` is sent. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ActionStatus::initOnce(); + parent::__construct($data); + } + + /** + * The status code. + * + * Generated from protobuf field .google.rpc.Code status_code = 1; + * @return int + */ + public function getStatusCode() + { + return $this->status_code; + } + + /** + * The status code. + * + * Generated from protobuf field .google.rpc.Code status_code = 1; + * @param int $var + * @return $this + */ + public function setStatusCode($var) + { + GPBUtil::checkEnum($var, \Google\Rpc\Code::class); + $this->status_code = $var; + + return $this; + } + + /** + * The message to send users about the status of their request. + * If unset, a generic message based on the `status_code` is sent. + * + * Generated from protobuf field string user_facing_message = 2; + * @return string + */ + public function getUserFacingMessage() + { + return $this->user_facing_message; + } + + /** + * The message to send users about the status of their request. + * If unset, a generic message based on the `status_code` is sent. + * + * Generated from protobuf field string user_facing_message = 2; + * @param string $var + * @return $this + */ + public function setUserFacingMessage($var) + { + GPBUtil::checkString($var, True); + $this->user_facing_message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Annotation.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Annotation.php new file mode 100644 index 000000000000..7c9e10fdc422 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Annotation.php @@ -0,0 +1,285 @@ +google.chat.v1.Annotation + */ +class Annotation extends \Google\Protobuf\Internal\Message +{ + /** + * The type of this annotation. + * + * Generated from protobuf field .google.chat.v1.AnnotationType type = 1; + */ + protected $type = 0; + /** + * Start index (0-based, inclusive) in the plain-text message body this + * annotation corresponds to. + * + * Generated from protobuf field optional int32 start_index = 2; + */ + protected $start_index = null; + /** + * Length of the substring in the plain-text message body this annotation + * corresponds to. + * + * Generated from protobuf field int32 length = 3; + */ + protected $length = 0; + protected $metadata; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $type + * The type of this annotation. + * @type int $start_index + * Start index (0-based, inclusive) in the plain-text message body this + * annotation corresponds to. + * @type int $length + * Length of the substring in the plain-text message body this annotation + * corresponds to. + * @type \Google\Apps\Chat\V1\UserMentionMetadata $user_mention + * The metadata of user mention. + * @type \Google\Apps\Chat\V1\SlashCommandMetadata $slash_command + * The metadata for a slash command. + * @type \Google\Apps\Chat\V1\RichLinkMetadata $rich_link_metadata + * The metadata for a rich link. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); + parent::__construct($data); + } + + /** + * The type of this annotation. + * + * Generated from protobuf field .google.chat.v1.AnnotationType type = 1; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of this annotation. + * + * Generated from protobuf field .google.chat.v1.AnnotationType type = 1; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\AnnotationType::class); + $this->type = $var; + + return $this; + } + + /** + * Start index (0-based, inclusive) in the plain-text message body this + * annotation corresponds to. + * + * Generated from protobuf field optional int32 start_index = 2; + * @return int + */ + public function getStartIndex() + { + return isset($this->start_index) ? $this->start_index : 0; + } + + public function hasStartIndex() + { + return isset($this->start_index); + } + + public function clearStartIndex() + { + unset($this->start_index); + } + + /** + * Start index (0-based, inclusive) in the plain-text message body this + * annotation corresponds to. + * + * Generated from protobuf field optional int32 start_index = 2; + * @param int $var + * @return $this + */ + public function setStartIndex($var) + { + GPBUtil::checkInt32($var); + $this->start_index = $var; + + return $this; + } + + /** + * Length of the substring in the plain-text message body this annotation + * corresponds to. + * + * Generated from protobuf field int32 length = 3; + * @return int + */ + public function getLength() + { + return $this->length; + } + + /** + * Length of the substring in the plain-text message body this annotation + * corresponds to. + * + * Generated from protobuf field int32 length = 3; + * @param int $var + * @return $this + */ + public function setLength($var) + { + GPBUtil::checkInt32($var); + $this->length = $var; + + return $this; + } + + /** + * The metadata of user mention. + * + * Generated from protobuf field .google.chat.v1.UserMentionMetadata user_mention = 4; + * @return \Google\Apps\Chat\V1\UserMentionMetadata|null + */ + public function getUserMention() + { + return $this->readOneof(4); + } + + public function hasUserMention() + { + return $this->hasOneof(4); + } + + /** + * The metadata of user mention. + * + * Generated from protobuf field .google.chat.v1.UserMentionMetadata user_mention = 4; + * @param \Google\Apps\Chat\V1\UserMentionMetadata $var + * @return $this + */ + public function setUserMention($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\UserMentionMetadata::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * The metadata for a slash command. + * + * Generated from protobuf field .google.chat.v1.SlashCommandMetadata slash_command = 5; + * @return \Google\Apps\Chat\V1\SlashCommandMetadata|null + */ + public function getSlashCommand() + { + return $this->readOneof(5); + } + + public function hasSlashCommand() + { + return $this->hasOneof(5); + } + + /** + * The metadata for a slash command. + * + * Generated from protobuf field .google.chat.v1.SlashCommandMetadata slash_command = 5; + * @param \Google\Apps\Chat\V1\SlashCommandMetadata $var + * @return $this + */ + public function setSlashCommand($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SlashCommandMetadata::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * The metadata for a rich link. + * + * Generated from protobuf field .google.chat.v1.RichLinkMetadata rich_link_metadata = 6; + * @return \Google\Apps\Chat\V1\RichLinkMetadata|null + */ + public function getRichLinkMetadata() + { + return $this->readOneof(6); + } + + public function hasRichLinkMetadata() + { + return $this->hasOneof(6); + } + + /** + * The metadata for a rich link. + * + * Generated from protobuf field .google.chat.v1.RichLinkMetadata rich_link_metadata = 6; + * @param \Google\Apps\Chat\V1\RichLinkMetadata $var + * @return $this + */ + public function setRichLinkMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\RichLinkMetadata::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * @return string + */ + public function getMetadata() + { + return $this->whichOneof("metadata"); + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AnnotationType.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AnnotationType.php new file mode 100644 index 000000000000..c9b09b768c19 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AnnotationType.php @@ -0,0 +1,68 @@ +google.chat.v1.AnnotationType + */ +class AnnotationType +{ + /** + * Default value for the enum. Don't use. + * + * Generated from protobuf enum ANNOTATION_TYPE_UNSPECIFIED = 0; + */ + const ANNOTATION_TYPE_UNSPECIFIED = 0; + /** + * A user is mentioned. + * + * Generated from protobuf enum USER_MENTION = 1; + */ + const USER_MENTION = 1; + /** + * A slash command is invoked. + * + * Generated from protobuf enum SLASH_COMMAND = 2; + */ + const SLASH_COMMAND = 2; + /** + * A rich link annotation. + * + * Generated from protobuf enum RICH_LINK = 3; + */ + const RICH_LINK = 3; + + private static $valueToName = [ + self::ANNOTATION_TYPE_UNSPECIFIED => 'ANNOTATION_TYPE_UNSPECIFIED', + self::USER_MENTION => 'USER_MENTION', + self::SLASH_COMMAND => 'SLASH_COMMAND', + self::RICH_LINK => 'RICH_LINK', + ]; + + 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachedGif.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachedGif.php new file mode 100644 index 000000000000..0856cd583a48 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachedGif.php @@ -0,0 +1,67 @@ +google.chat.v1.AttachedGif + */ +class AttachedGif extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The URL that hosts the GIF image. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * Output only. The URL that hosts the GIF image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The URL that hosts the GIF image. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * Output only. The URL that hosts the GIF image. + * + * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment.php new file mode 100644 index 000000000000..585adb4fc599 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment.php @@ -0,0 +1,338 @@ +google.chat.v1.Attachment + */ +class Attachment extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the attachment, in the form + * `spaces/{space}/messages/{message}/attachments/{attachment}`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The original file name for the content, not the full path. + * + * Generated from protobuf field string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $content_name = ''; + /** + * Output only. The content type (MIME type) of the file. + * + * Generated from protobuf field string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $content_type = ''; + /** + * Output only. The thumbnail URL which should be used to preview the + * attachment to a human user. Chat apps shouldn't use this URL to download + * attachment content. + * + * Generated from protobuf field string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $thumbnail_uri = ''; + /** + * Output only. The download URL which should be used to allow a human user to + * download the attachment. Chat apps shouldn't use this URL to download + * attachment content. + * + * Generated from protobuf field string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $download_uri = ''; + /** + * Output only. The source of the attachment. + * + * Generated from protobuf field .google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $source = 0; + protected $data_ref; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the attachment, in the form + * `spaces/{space}/messages/{message}/attachments/{attachment}`. + * @type string $content_name + * Output only. The original file name for the content, not the full path. + * @type string $content_type + * Output only. The content type (MIME type) of the file. + * @type \Google\Apps\Chat\V1\AttachmentDataRef $attachment_data_ref + * A reference to the attachment data. This field is used with the media API + * to download the attachment data. + * @type \Google\Apps\Chat\V1\DriveDataRef $drive_data_ref + * Output only. A reference to the Google Drive attachment. This field is + * used with the Google Drive API. + * @type string $thumbnail_uri + * Output only. The thumbnail URL which should be used to preview the + * attachment to a human user. Chat apps shouldn't use this URL to download + * attachment content. + * @type string $download_uri + * Output only. The download URL which should be used to allow a human user to + * download the attachment. Chat apps shouldn't use this URL to download + * attachment content. + * @type int $source + * Output only. The source of the attachment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the attachment, in the form + * `spaces/{space}/messages/{message}/attachments/{attachment}`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the attachment, in the form + * `spaces/{space}/messages/{message}/attachments/{attachment}`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The original file name for the content, not the full path. + * + * Generated from protobuf field string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getContentName() + { + return $this->content_name; + } + + /** + * Output only. The original file name for the content, not the full path. + * + * Generated from protobuf field string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setContentName($var) + { + GPBUtil::checkString($var, True); + $this->content_name = $var; + + return $this; + } + + /** + * Output only. The content type (MIME type) of the file. + * + * Generated from protobuf field string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getContentType() + { + return $this->content_type; + } + + /** + * Output only. The content type (MIME type) of the file. + * + * Generated from protobuf field string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setContentType($var) + { + GPBUtil::checkString($var, True); + $this->content_type = $var; + + return $this; + } + + /** + * A reference to the attachment data. This field is used with the media API + * to download the attachment data. + * + * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 4; + * @return \Google\Apps\Chat\V1\AttachmentDataRef|null + */ + public function getAttachmentDataRef() + { + return $this->readOneof(4); + } + + public function hasAttachmentDataRef() + { + return $this->hasOneof(4); + } + + /** + * A reference to the attachment data. This field is used with the media API + * to download the attachment data. + * + * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 4; + * @param \Google\Apps\Chat\V1\AttachmentDataRef $var + * @return $this + */ + public function setAttachmentDataRef($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\AttachmentDataRef::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Output only. A reference to the Google Drive attachment. This field is + * used with the Google Drive API. + * + * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\DriveDataRef|null + */ + public function getDriveDataRef() + { + return $this->readOneof(7); + } + + public function hasDriveDataRef() + { + return $this->hasOneof(7); + } + + /** + * Output only. A reference to the Google Drive attachment. This field is + * used with the Google Drive API. + * + * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\DriveDataRef $var + * @return $this + */ + public function setDriveDataRef($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DriveDataRef::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * Output only. The thumbnail URL which should be used to preview the + * attachment to a human user. Chat apps shouldn't use this URL to download + * attachment content. + * + * Generated from protobuf field string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getThumbnailUri() + { + return $this->thumbnail_uri; + } + + /** + * Output only. The thumbnail URL which should be used to preview the + * attachment to a human user. Chat apps shouldn't use this URL to download + * attachment content. + * + * Generated from protobuf field string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setThumbnailUri($var) + { + GPBUtil::checkString($var, True); + $this->thumbnail_uri = $var; + + return $this; + } + + /** + * Output only. The download URL which should be used to allow a human user to + * download the attachment. Chat apps shouldn't use this URL to download + * attachment content. + * + * Generated from protobuf field string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDownloadUri() + { + return $this->download_uri; + } + + /** + * Output only. The download URL which should be used to allow a human user to + * download the attachment. Chat apps shouldn't use this URL to download + * attachment content. + * + * Generated from protobuf field string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDownloadUri($var) + { + GPBUtil::checkString($var, True); + $this->download_uri = $var; + + return $this; + } + + /** + * Output only. The source of the attachment. + * + * Generated from protobuf field .google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSource() + { + return $this->source; + } + + /** + * Output only. The source of the attachment. + * + * Generated from protobuf field .google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSource($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Attachment\Source::class); + $this->source = $var; + + return $this; + } + + /** + * @return string + */ + public function getDataRef() + { + return $this->whichOneof("data_ref"); + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment/Source.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment/Source.php new file mode 100644 index 000000000000..f62db353fa3a --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment/Source.php @@ -0,0 +1,64 @@ +google.chat.v1.Attachment.Source + */ +class Source +{ + /** + * Reserved. + * + * Generated from protobuf enum SOURCE_UNSPECIFIED = 0; + */ + const SOURCE_UNSPECIFIED = 0; + /** + * The file is a Google Drive file. + * + * Generated from protobuf enum DRIVE_FILE = 1; + */ + const DRIVE_FILE = 1; + /** + * The file is uploaded to Chat. + * + * Generated from protobuf enum UPLOADED_CONTENT = 2; + */ + const UPLOADED_CONTENT = 2; + + private static $valueToName = [ + self::SOURCE_UNSPECIFIED => 'SOURCE_UNSPECIFIED', + self::DRIVE_FILE => 'DRIVE_FILE', + self::UPLOADED_CONTENT => 'UPLOADED_CONTENT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Source::class, \Google\Apps\Chat\V1\Attachment_Source::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachmentDataRef.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachmentDataRef.php new file mode 100644 index 000000000000..713e30068a9b --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachmentDataRef.php @@ -0,0 +1,113 @@ +google.chat.v1.AttachmentDataRef + */ +class AttachmentDataRef extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the attachment data. This field is used with the media + * API to download the attachment data. + * + * Generated from protobuf field string resource_name = 1; + */ + protected $resource_name = ''; + /** + * Opaque token containing a reference to an uploaded attachment. Treated by + * clients as an opaque string and used to create or update Chat messages with + * attachments. + * + * Generated from protobuf field string attachment_upload_token = 2; + */ + protected $attachment_upload_token = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $resource_name + * The resource name of the attachment data. This field is used with the media + * API to download the attachment data. + * @type string $attachment_upload_token + * Opaque token containing a reference to an uploaded attachment. Treated by + * clients as an opaque string and used to create or update Chat messages with + * attachments. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the attachment data. This field is used with the media + * API to download the attachment data. + * + * Generated from protobuf field string resource_name = 1; + * @return string + */ + public function getResourceName() + { + return $this->resource_name; + } + + /** + * The resource name of the attachment data. This field is used with the media + * API to download the attachment data. + * + * Generated from protobuf field string resource_name = 1; + * @param string $var + * @return $this + */ + public function setResourceName($var) + { + GPBUtil::checkString($var, True); + $this->resource_name = $var; + + return $this; + } + + /** + * Opaque token containing a reference to an uploaded attachment. Treated by + * clients as an opaque string and used to create or update Chat messages with + * attachments. + * + * Generated from protobuf field string attachment_upload_token = 2; + * @return string + */ + public function getAttachmentUploadToken() + { + return $this->attachment_upload_token; + } + + /** + * Opaque token containing a reference to an uploaded attachment. Treated by + * clients as an opaque string and used to create or update Chat messages with + * attachments. + * + * Generated from protobuf field string attachment_upload_token = 2; + * @param string $var + * @return $this + */ + public function setAttachmentUploadToken($var) + { + GPBUtil::checkString($var, True); + $this->attachment_upload_token = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CardWithId.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CardWithId.php new file mode 100644 index 000000000000..3d2235adb173 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CardWithId.php @@ -0,0 +1,121 @@ +google.chat.v1.CardWithId + */ +class CardWithId extends \Google\Protobuf\Internal\Message +{ + /** + * Required if the message contains multiple cards. A unique identifier for + * a card in a message. + * + * Generated from protobuf field string card_id = 1; + */ + protected $card_id = ''; + /** + * A card. Maximum size is 32 KB. + * + * Generated from protobuf field .google.apps.card.v1.Card card = 2; + */ + protected $card = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $card_id + * Required if the message contains multiple cards. A unique identifier for + * a card in a message. + * @type \Google\Apps\Card\V1\Card $card + * A card. Maximum size is 32 KB. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Required if the message contains multiple cards. A unique identifier for + * a card in a message. + * + * Generated from protobuf field string card_id = 1; + * @return string + */ + public function getCardId() + { + return $this->card_id; + } + + /** + * Required if the message contains multiple cards. A unique identifier for + * a card in a message. + * + * Generated from protobuf field string card_id = 1; + * @param string $var + * @return $this + */ + public function setCardId($var) + { + GPBUtil::checkString($var, True); + $this->card_id = $var; + + return $this; + } + + /** + * A card. Maximum size is 32 KB. + * + * Generated from protobuf field .google.apps.card.v1.Card card = 2; + * @return \Google\Apps\Card\V1\Card|null + */ + public function getCard() + { + return $this->card; + } + + public function hasCard() + { + return isset($this->card); + } + + public function clearCard() + { + unset($this->card); + } + + /** + * A card. Maximum size is 32 KB. + * + * Generated from protobuf field .google.apps.card.v1.Card card = 2; + * @param \Google\Apps\Card\V1\Card $var + * @return $this + */ + public function setCard($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card::class); + $this->card = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ChatSpaceLinkData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ChatSpaceLinkData.php new file mode 100644 index 000000000000..8efe4c4f2610 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ChatSpaceLinkData.php @@ -0,0 +1,147 @@ +google.chat.v1.ChatSpaceLinkData + */ +class ChatSpaceLinkData extends \Google\Protobuf\Internal\Message +{ + /** + * The space of the linked Chat space resource. + * Format: `spaces/{space}` + * + * Generated from protobuf field string space = 1 [(.google.api.resource_reference) = { + */ + protected $space = ''; + /** + * The thread of the linked Chat space resource. + * Format: `spaces/{space}/threads/{thread}` + * + * Generated from protobuf field string thread = 2 [(.google.api.resource_reference) = { + */ + protected $thread = ''; + /** + * The message of the linked Chat space resource. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string message = 3 [(.google.api.resource_reference) = { + */ + protected $message = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $space + * The space of the linked Chat space resource. + * Format: `spaces/{space}` + * @type string $thread + * The thread of the linked Chat space resource. + * Format: `spaces/{space}/threads/{thread}` + * @type string $message + * The message of the linked Chat space resource. + * Format: `spaces/{space}/messages/{message}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); + parent::__construct($data); + } + + /** + * The space of the linked Chat space resource. + * Format: `spaces/{space}` + * + * Generated from protobuf field string space = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getSpace() + { + return $this->space; + } + + /** + * The space of the linked Chat space resource. + * Format: `spaces/{space}` + * + * Generated from protobuf field string space = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkString($var, True); + $this->space = $var; + + return $this; + } + + /** + * The thread of the linked Chat space resource. + * Format: `spaces/{space}/threads/{thread}` + * + * Generated from protobuf field string thread = 2 [(.google.api.resource_reference) = { + * @return string + */ + public function getThread() + { + return $this->thread; + } + + /** + * The thread of the linked Chat space resource. + * Format: `spaces/{space}/threads/{thread}` + * + * Generated from protobuf field string thread = 2 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setThread($var) + { + GPBUtil::checkString($var, True); + $this->thread = $var; + + return $this; + } + + /** + * The message of the linked Chat space resource. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string message = 3 [(.google.api.resource_reference) = { + * @return string + */ + public function getMessage() + { + return $this->message; + } + + /** + * The message of the linked Chat space resource. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string message = 3 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkString($var, True); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceRequest.php new file mode 100644 index 000000000000..f6cddab25e0d --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceRequest.php @@ -0,0 +1,71 @@ +google.chat.v1.CompleteImportSpaceRequest + */ +class CompleteImportSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the import mode space. + * Format: `spaces/{space}` + * + * 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. Resource name of the import mode space. + * Format: `spaces/{space}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the import mode space. + * Format: `spaces/{space}` + * + * 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. Resource name of the import mode space. + * Format: `spaces/{space}` + * + * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceResponse.php new file mode 100644 index 000000000000..500dcf0d0fe4 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceResponse.php @@ -0,0 +1,77 @@ +google.chat.v1.CompleteImportSpaceResponse + */ +class CompleteImportSpaceResponse extends \Google\Protobuf\Internal\Message +{ + /** + * The import mode space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1; + */ + protected $space = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Space $space + * The import mode space. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * The import mode space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1; + * @return \Google\Apps\Chat\V1\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * The import mode space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1; + * @param \Google\Apps\Chat\V1\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); + $this->space = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup.php new file mode 100644 index 000000000000..0eec00f28227 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup.php @@ -0,0 +1,33 @@ +google.chat.v1.ContextualAddOnMarkup + */ +class ContextualAddOnMarkup extends \Google\Protobuf\Internal\Message +{ + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); + parent::__construct($data); + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card.php new file mode 100644 index 000000000000..249d39abc6ce --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card.php @@ -0,0 +1,183 @@ +google.chat.v1.ContextualAddOnMarkup.Card + */ +class Card extends \Google\Protobuf\Internal\Message +{ + /** + * The header of the card. A header usually contains a title and an image. + * + * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1; + */ + protected $header = null; + /** + * Sections are separated by a line divider. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2; + */ + private $sections; + /** + * The actions of this card. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3; + */ + private $card_actions; + /** + * Name of the card. + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader $header + * The header of the card. A header usually contains a title and an image. + * @type array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\Section>|\Google\Protobuf\Internal\RepeatedField $sections + * Sections are separated by a line divider. + * @type array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardAction>|\Google\Protobuf\Internal\RepeatedField $card_actions + * The actions of this card. + * @type string $name + * Name of the card. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); + parent::__construct($data); + } + + /** + * The header of the card. A header usually contains a title and an image. + * + * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1; + * @return \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader|null + */ + public function getHeader() + { + return $this->header; + } + + public function hasHeader() + { + return isset($this->header); + } + + public function clearHeader() + { + unset($this->header); + } + + /** + * The header of the card. A header usually contains a title and an image. + * + * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1; + * @param \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader::class); + $this->header = $var; + + return $this; + } + + /** + * Sections are separated by a line divider. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSections() + { + return $this->sections; + } + + /** + * Sections are separated by a line divider. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2; + * @param array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\Section>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSections($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\Section::class); + $this->sections = $arr; + + return $this; + } + + /** + * The actions of this card. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCardActions() + { + return $this->card_actions; + } + + /** + * The actions of this card. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3; + * @param array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardAction>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCardActions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardAction::class); + $this->card_actions = $arr; + + return $this; + } + + /** + * Name of the card. + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Name of the card. + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Card::class, \Google\Apps\Chat\V1\ContextualAddOnMarkup_Card::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardAction.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardAction.php new file mode 100644 index 000000000000..a6cbe6824e74 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardAction.php @@ -0,0 +1,118 @@ +google.chat.v1.ContextualAddOnMarkup.Card.CardAction + */ +class CardAction extends \Google\Protobuf\Internal\Message +{ + /** + * The label used to be displayed in the action menu item. + * + * Generated from protobuf field string action_label = 1; + */ + protected $action_label = ''; + /** + * The onclick action for this action item. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + */ + protected $on_click = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $action_label + * The label used to be displayed in the action menu item. + * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click + * The onclick action for this action item. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); + parent::__construct($data); + } + + /** + * The label used to be displayed in the action menu item. + * + * Generated from protobuf field string action_label = 1; + * @return string + */ + public function getActionLabel() + { + return $this->action_label; + } + + /** + * The label used to be displayed in the action menu item. + * + * Generated from protobuf field string action_label = 1; + * @param string $var + * @return $this + */ + public function setActionLabel($var) + { + GPBUtil::checkString($var, True); + $this->action_label = $var; + + return $this; + } + + /** + * The onclick action for this action item. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * The onclick action for this action item. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); + $this->on_click = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CardAction::class, \Google\Apps\Chat\V1\ContextualAddOnMarkup_Card_CardAction::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader.php new file mode 100644 index 000000000000..a8ca508b489a --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader.php @@ -0,0 +1,178 @@ +google.chat.v1.ContextualAddOnMarkup.Card.CardHeader + */ +class CardHeader extends \Google\Protobuf\Internal\Message +{ + /** + * The title must be specified. The header has a fixed height: if both a + * title and subtitle is specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * + * Generated from protobuf field string title = 1; + */ + protected $title = ''; + /** + * The subtitle of the card header. + * + * Generated from protobuf field string subtitle = 2; + */ + protected $subtitle = ''; + /** + * The image's type (for example, square border or circular border). + * + * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader.ImageStyle image_style = 3; + */ + protected $image_style = 0; + /** + * The URL of the image in the card header. + * + * Generated from protobuf field string image_url = 4; + */ + protected $image_url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $title + * The title must be specified. The header has a fixed height: if both a + * title and subtitle is specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * @type string $subtitle + * The subtitle of the card header. + * @type int $image_style + * The image's type (for example, square border or circular border). + * @type string $image_url + * The URL of the image in the card header. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); + parent::__construct($data); + } + + /** + * The title must be specified. The header has a fixed height: if both a + * title and subtitle is specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * + * Generated from protobuf field string title = 1; + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * The title must be specified. The header has a fixed height: if both a + * title and subtitle is specified, each takes up one line. If only the + * title is specified, it takes up both lines. + * + * Generated from protobuf field string title = 1; + * @param string $var + * @return $this + */ + public function setTitle($var) + { + GPBUtil::checkString($var, True); + $this->title = $var; + + return $this; + } + + /** + * The subtitle of the card header. + * + * Generated from protobuf field string subtitle = 2; + * @return string + */ + public function getSubtitle() + { + return $this->subtitle; + } + + /** + * The subtitle of the card header. + * + * Generated from protobuf field string subtitle = 2; + * @param string $var + * @return $this + */ + public function setSubtitle($var) + { + GPBUtil::checkString($var, True); + $this->subtitle = $var; + + return $this; + } + + /** + * The image's type (for example, square border or circular border). + * + * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader.ImageStyle image_style = 3; + * @return int + */ + public function getImageStyle() + { + return $this->image_style; + } + + /** + * The image's type (for example, square border or circular border). + * + * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader.ImageStyle image_style = 3; + * @param int $var + * @return $this + */ + public function setImageStyle($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader\ImageStyle::class); + $this->image_style = $var; + + return $this; + } + + /** + * The URL of the image in the card header. + * + * Generated from protobuf field string image_url = 4; + * @return string + */ + public function getImageUrl() + { + return $this->image_url; + } + + /** + * The URL of the image in the card header. + * + * Generated from protobuf field string image_url = 4; + * @param string $var + * @return $this + */ + public function setImageUrl($var) + { + GPBUtil::checkString($var, True); + $this->image_url = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(CardHeader::class, \Google\Apps\Chat\V1\ContextualAddOnMarkup_Card_CardHeader::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader/ImageStyle.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader/ImageStyle.php new file mode 100644 index 000000000000..a86eddd71cea --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader/ImageStyle.php @@ -0,0 +1,60 @@ +google.chat.v1.ContextualAddOnMarkup.Card.CardHeader.ImageStyle + */ +class ImageStyle +{ + /** + * Generated from protobuf enum IMAGE_STYLE_UNSPECIFIED = 0; + */ + const IMAGE_STYLE_UNSPECIFIED = 0; + /** + * Square border. + * + * Generated from protobuf enum IMAGE = 1; + */ + const IMAGE = 1; + /** + * Circular border. + * + * Generated from protobuf enum AVATAR = 2; + */ + const AVATAR = 2; + + private static $valueToName = [ + self::IMAGE_STYLE_UNSPECIFIED => 'IMAGE_STYLE_UNSPECIFIED', + self::IMAGE => 'IMAGE', + self::AVATAR => 'AVATAR', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ImageStyle::class, \Google\Apps\Chat\V1\ContextualAddOnMarkup_Card_CardHeader_ImageStyle::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/Section.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/Section.php new file mode 100644 index 000000000000..8363df325e24 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/Section.php @@ -0,0 +1,139 @@ +google.chat.v1.ContextualAddOnMarkup.Card.Section + */ +class Section extends \Google\Protobuf\Internal\Message +{ + /** + * The header of the section. Formatted text is + * supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string header = 1; + */ + protected $header = ''; + /** + * A section must contain at least one widget. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup widgets = 2; + */ + private $widgets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $header + * The header of the section. Formatted text is + * supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * @type array<\Google\Apps\Chat\V1\WidgetMarkup>|\Google\Protobuf\Internal\RepeatedField $widgets + * A section must contain at least one widget. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); + parent::__construct($data); + } + + /** + * The header of the section. Formatted text is + * supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string header = 1; + * @return string + */ + public function getHeader() + { + return $this->header; + } + + /** + * The header of the section. Formatted text is + * supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string header = 1; + * @param string $var + * @return $this + */ + public function setHeader($var) + { + GPBUtil::checkString($var, True); + $this->header = $var; + + return $this; + } + + /** + * A section must contain at least one widget. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup widgets = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getWidgets() + { + return $this->widgets; + } + + /** + * A section must contain at least one widget. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup widgets = 2; + * @param array<\Google\Apps\Chat\V1\WidgetMarkup>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setWidgets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\WidgetMarkup::class); + $this->widgets = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Section::class, \Google\Apps\Chat\V1\ContextualAddOnMarkup_Card_Section::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMembershipRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMembershipRequest.php new file mode 100644 index 000000000000..8d36c8549b38 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMembershipRequest.php @@ -0,0 +1,283 @@ +google.chat.v1.CreateMembershipRequest + */ +class CreateMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the space for which to create the + * membership. + * Format: spaces/{space} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The membership relation to create. + * The `memberType` field must contain a user with the `user.name` and + * `user.type` fields populated. The server will assign a resource name + * and overwrite anything specified. + * When a Chat app creates a membership relation for a human user, it must use + * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set + * `user.name` with format `users/{user}`, where `{user}` can be the email + * address for the user. For users in the same Workspace organization `{user}` + * can also be the `id` of the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the user in the Directory API. For example, if + * the People API Person profile ID for `user@example.com` is `123456789`, you + * can add the user to the space by setting the `membership.member.name` to + * `users/user@example.com` or `users/123456789`. When a Chat app creates a + * membership relation for itself, it must use the `chat.memberships.app` + * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $membership = null; + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Creating app memberships or creating memberships for users outside the + * administrator's Google Workspace organization isn't supported using admin + * access. + * + * Generated from protobuf field bool use_admin_access = 5; + */ + protected $use_admin_access = false; + + /** + * @param string $parent Required. The resource name of the space for which to create the + * membership. + * + * Format: spaces/{space} + * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. + * @param \Google\Apps\Chat\V1\Membership $membership Required. The membership relation to create. + * The `memberType` field must contain a user with the `user.name` and + * `user.type` fields populated. The server will assign a resource name + * and overwrite anything specified. + * When a Chat app creates a membership relation for a human user, it must use + * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set + * `user.name` with format `users/{user}`, where `{user}` can be the email + * address for the user. For users in the same Workspace organization `{user}` + * can also be the `id` of the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the user in the Directory API. For example, if + * the People API Person profile ID for `user@example.com` is `123456789`, you + * can add the user to the space by setting the `membership.member.name` to + * `users/user@example.com` or `users/123456789`. When a Chat app creates a + * membership relation for itself, it must use the `chat.memberships.app` + * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. + * + * @return \Google\Apps\Chat\V1\CreateMembershipRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Apps\Chat\V1\Membership $membership): self + { + return (new self()) + ->setParent($parent) + ->setMembership($membership); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the space for which to create the + * membership. + * Format: spaces/{space} + * @type \Google\Apps\Chat\V1\Membership $membership + * Required. The membership relation to create. + * The `memberType` field must contain a user with the `user.name` and + * `user.type` fields populated. The server will assign a resource name + * and overwrite anything specified. + * When a Chat app creates a membership relation for a human user, it must use + * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set + * `user.name` with format `users/{user}`, where `{user}` can be the email + * address for the user. For users in the same Workspace organization `{user}` + * can also be the `id` of the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the user in the Directory API. For example, if + * the People API Person profile ID for `user@example.com` is `123456789`, you + * can add the user to the space by setting the `membership.member.name` to + * `users/user@example.com` or `users/123456789`. When a Chat app creates a + * membership relation for itself, it must use the `chat.memberships.app` + * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. + * @type bool $use_admin_access + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Creating app memberships or creating memberships for users outside the + * administrator's Google Workspace organization isn't supported using admin + * access. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the space for which to create the + * membership. + * Format: spaces/{space} + * + * 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 space for which to create the + * membership. + * Format: spaces/{space} + * + * 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 membership relation to create. + * The `memberType` field must contain a user with the `user.name` and + * `user.type` fields populated. The server will assign a resource name + * and overwrite anything specified. + * When a Chat app creates a membership relation for a human user, it must use + * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set + * `user.name` with format `users/{user}`, where `{user}` can be the email + * address for the user. For users in the same Workspace organization `{user}` + * can also be the `id` of the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the user in the Directory API. For example, if + * the People API Person profile ID for `user@example.com` is `123456789`, you + * can add the user to the space by setting the `membership.member.name` to + * `users/user@example.com` or `users/123456789`. When a Chat app creates a + * membership relation for itself, it must use the `chat.memberships.app` + * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Membership|null + */ + public function getMembership() + { + return $this->membership; + } + + public function hasMembership() + { + return isset($this->membership); + } + + public function clearMembership() + { + unset($this->membership); + } + + /** + * Required. The membership relation to create. + * The `memberType` field must contain a user with the `user.name` and + * `user.type` fields populated. The server will assign a resource name + * and overwrite anything specified. + * When a Chat app creates a membership relation for a human user, it must use + * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set + * `user.name` with format `users/{user}`, where `{user}` can be the email + * address for the user. For users in the same Workspace organization `{user}` + * can also be the `id` of the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the user in the Directory API. For example, if + * the People API Person profile ID for `user@example.com` is `123456789`, you + * can add the user to the space by setting the `membership.member.name` to + * `users/user@example.com` or `users/123456789`. When a Chat app creates a + * membership relation for itself, it must use the `chat.memberships.app` + * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Membership $var + * @return $this + */ + public function setMembership($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); + $this->membership = $var; + + return $this; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Creating app memberships or creating memberships for users outside the + * administrator's Google Workspace organization isn't supported using admin + * access. + * + * Generated from protobuf field bool use_admin_access = 5; + * @return bool + */ + public function getUseAdminAccess() + { + return $this->use_admin_access; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Creating app memberships or creating memberships for users outside the + * administrator's Google Workspace organization isn't supported using admin + * access. + * + * Generated from protobuf field bool use_admin_access = 5; + * @param bool $var + * @return $this + */ + public function setUseAdminAccess($var) + { + GPBUtil::checkBool($var); + $this->use_admin_access = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest.php new file mode 100644 index 000000000000..e90a569bc416 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest.php @@ -0,0 +1,370 @@ +google.chat.v1.CreateMessageRequest + */ +class CreateMessageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the space in which to create a message. + * Format: `spaces/{space}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. Message body. + * + * Generated from protobuf field .google.chat.v1.Message message = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $message = null; + /** + * Optional. Deprecated: Use + * [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the + * thread. Supports up to 4000 characters. To start or add to a thread, create + * a message and specify a `threadKey` or the + * [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or + * reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * + * Generated from protobuf field string thread_key = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @deprecated + */ + protected $thread_key = ''; + /** + * Optional. A unique request ID for this message. Specifying an existing + * request ID returns the message created with that ID instead of creating a + * new message. + * + * Generated from protobuf field string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. Specifies whether a message starts a thread or replies to one. + * Only supported in named spaces. + * + * Generated from protobuf field .google.chat.v1.CreateMessageRequest.MessageReplyOption message_reply_option = 8 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $message_reply_option = 0; + /** + * Optional. A custom ID for a message. Lets Chat apps get, update, or delete + * a message without needing to store the system-assigned ID in the message's + * resource name (represented in the message `name` field). + * The value for this field must meet the following requirements: + * * Begins with `client-`. For example, `client-custom-name` is a valid + * custom ID, but `custom-name` is not. + * * Contains up to 63 characters and only lowercase letters, numbers, and + * hyphens. + * * Is unique within a space. A Chat app can't use the same custom ID for + * different messages. + * For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string message_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $message_id = ''; + + /** + * @param string $parent Required. The resource name of the space in which to create a message. + * + * Format: `spaces/{space}` + * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. + * @param \Google\Apps\Chat\V1\Message $message Required. Message body. + * @param string $messageId Optional. A custom ID for a message. Lets Chat apps get, update, or delete + * a message without needing to store the system-assigned ID in the message's + * resource name (represented in the message `name` field). + * + * The value for this field must meet the following requirements: + * + * * Begins with `client-`. For example, `client-custom-name` is a valid + * custom ID, but `custom-name` is not. + * * Contains up to 63 characters and only lowercase letters, numbers, and + * hyphens. + * * Is unique within a space. A Chat app can't use the same custom ID for + * different messages. + * + * For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * @return \Google\Apps\Chat\V1\CreateMessageRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Apps\Chat\V1\Message $message, string $messageId): self + { + return (new self()) + ->setParent($parent) + ->setMessage($message) + ->setMessageId($messageId); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The resource name of the space in which to create a message. + * Format: `spaces/{space}` + * @type \Google\Apps\Chat\V1\Message $message + * Required. Message body. + * @type string $thread_key + * Optional. Deprecated: Use + * [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the + * thread. Supports up to 4000 characters. To start or add to a thread, create + * a message and specify a `threadKey` or the + * [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or + * reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * @type string $request_id + * Optional. A unique request ID for this message. Specifying an existing + * request ID returns the message created with that ID instead of creating a + * new message. + * @type int $message_reply_option + * Optional. Specifies whether a message starts a thread or replies to one. + * Only supported in named spaces. + * @type string $message_id + * Optional. A custom ID for a message. Lets Chat apps get, update, or delete + * a message without needing to store the system-assigned ID in the message's + * resource name (represented in the message `name` field). + * The value for this field must meet the following requirements: + * * Begins with `client-`. For example, `client-custom-name` is a valid + * custom ID, but `custom-name` is not. + * * Contains up to 63 characters and only lowercase letters, numbers, and + * hyphens. + * * Is unique within a space. A Chat app can't use the same custom ID for + * different messages. + * For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the space in which to create a message. + * Format: `spaces/{space}` + * + * 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 space in which to create a message. + * Format: `spaces/{space}` + * + * 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. Message body. + * + * Generated from protobuf field .google.chat.v1.Message message = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Message|null + */ + public function getMessage() + { + return $this->message; + } + + public function hasMessage() + { + return isset($this->message); + } + + public function clearMessage() + { + unset($this->message); + } + + /** + * Required. Message body. + * + * Generated from protobuf field .google.chat.v1.Message message = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Message $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Message::class); + $this->message = $var; + + return $this; + } + + /** + * Optional. Deprecated: Use + * [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the + * thread. Supports up to 4000 characters. To start or add to a thread, create + * a message and specify a `threadKey` or the + * [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or + * reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * + * Generated from protobuf field string thread_key = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @return string + * @deprecated + */ + public function getThreadKey() + { + @trigger_error('thread_key is deprecated.', E_USER_DEPRECATED); + return $this->thread_key; + } + + /** + * Optional. Deprecated: Use + * [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the + * thread. Supports up to 4000 characters. To start or add to a thread, create + * a message and specify a `threadKey` or the + * [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or + * reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * + * Generated from protobuf field string thread_key = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + * @deprecated + */ + public function setThreadKey($var) + { + @trigger_error('thread_key is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkString($var, True); + $this->thread_key = $var; + + return $this; + } + + /** + * Optional. A unique request ID for this message. Specifying an existing + * request ID returns the message created with that ID instead of creating a + * new message. + * + * Generated from protobuf field string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique request ID for this message. Specifying an existing + * request ID returns the message created with that ID instead of creating a + * new message. + * + * Generated from protobuf field string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. Specifies whether a message starts a thread or replies to one. + * Only supported in named spaces. + * + * Generated from protobuf field .google.chat.v1.CreateMessageRequest.MessageReplyOption message_reply_option = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getMessageReplyOption() + { + return $this->message_reply_option; + } + + /** + * Optional. Specifies whether a message starts a thread or replies to one. + * Only supported in named spaces. + * + * Generated from protobuf field .google.chat.v1.CreateMessageRequest.MessageReplyOption message_reply_option = 8 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setMessageReplyOption($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\CreateMessageRequest\MessageReplyOption::class); + $this->message_reply_option = $var; + + return $this; + } + + /** + * Optional. A custom ID for a message. Lets Chat apps get, update, or delete + * a message without needing to store the system-assigned ID in the message's + * resource name (represented in the message `name` field). + * The value for this field must meet the following requirements: + * * Begins with `client-`. For example, `client-custom-name` is a valid + * custom ID, but `custom-name` is not. + * * Contains up to 63 characters and only lowercase letters, numbers, and + * hyphens. + * * Is unique within a space. A Chat app can't use the same custom ID for + * different messages. + * For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string message_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getMessageId() + { + return $this->message_id; + } + + /** + * Optional. A custom ID for a message. Lets Chat apps get, update, or delete + * a message without needing to store the system-assigned ID in the message's + * resource name (represented in the message `name` field). + * The value for this field must meet the following requirements: + * * Begins with `client-`. For example, `client-custom-name` is a valid + * custom ID, but `custom-name` is not. + * * Contains up to 63 characters and only lowercase letters, numbers, and + * hyphens. + * * Is unique within a space. A Chat app can't use the same custom ID for + * different messages. + * For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string message_id = 9 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setMessageId($var) + { + GPBUtil::checkString($var, True); + $this->message_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest/MessageReplyOption.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest/MessageReplyOption.php new file mode 100644 index 000000000000..92144a5ebd83 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest/MessageReplyOption.php @@ -0,0 +1,74 @@ +google.chat.v1.CreateMessageRequest.MessageReplyOption + */ +class MessageReplyOption +{ + /** + * Default. Starts a new thread. Using this option ignores any [thread + * ID][google.chat.v1.Thread.name] or + * [`thread_key`][google.chat.v1.Thread.thread_key] that's included. + * + * Generated from protobuf enum MESSAGE_REPLY_OPTION_UNSPECIFIED = 0; + */ + const MESSAGE_REPLY_OPTION_UNSPECIFIED = 0; + /** + * Creates the message as a reply to the thread specified by [thread + * ID][google.chat.v1.Thread.name] or + * [`thread_key`][google.chat.v1.Thread.thread_key]. If it fails, the + * message starts a new thread instead. + * + * Generated from protobuf enum REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1; + */ + const REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1; + /** + * Creates the message as a reply to the thread specified by [thread + * ID][google.chat.v1.Thread.name] or + * [`thread_key`][google.chat.v1.Thread.thread_key]. If a new `thread_key` + * is used, a new thread is created. If the message creation fails, a + * `NOT_FOUND` error is returned instead. + * + * Generated from protobuf enum REPLY_MESSAGE_OR_FAIL = 2; + */ + const REPLY_MESSAGE_OR_FAIL = 2; + + private static $valueToName = [ + self::MESSAGE_REPLY_OPTION_UNSPECIFIED => 'MESSAGE_REPLY_OPTION_UNSPECIFIED', + self::REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD => 'REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD', + self::REPLY_MESSAGE_OR_FAIL => 'REPLY_MESSAGE_OR_FAIL', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MessageReplyOption::class, \Google\Apps\Chat\V1\CreateMessageRequest_MessageReplyOption::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateReactionRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateReactionRequest.php new file mode 100644 index 000000000000..97555cae7e06 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateReactionRequest.php @@ -0,0 +1,133 @@ +google.chat.v1.CreateReactionRequest + */ +class CreateReactionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The message where the reaction is created. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The reaction to create. + * + * Generated from protobuf field .google.chat.v1.Reaction reaction = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $reaction = null; + + /** + * @param string $parent Required. The message where the reaction is created. + * + * Format: `spaces/{space}/messages/{message}` + * Please see {@see ChatServiceClient::messageName()} for help formatting this field. + * @param \Google\Apps\Chat\V1\Reaction $reaction Required. The reaction to create. + * + * @return \Google\Apps\Chat\V1\CreateReactionRequest + * + * @experimental + */ + public static function build(string $parent, \Google\Apps\Chat\V1\Reaction $reaction): self + { + return (new self()) + ->setParent($parent) + ->setReaction($reaction); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. The message where the reaction is created. + * Format: `spaces/{space}/messages/{message}` + * @type \Google\Apps\Chat\V1\Reaction $reaction + * Required. The reaction to create. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * Required. The message where the reaction is created. + * Format: `spaces/{space}/messages/{message}` + * + * 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 message where the reaction is created. + * Format: `spaces/{space}/messages/{message}` + * + * 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 reaction to create. + * + * Generated from protobuf field .google.chat.v1.Reaction reaction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Reaction|null + */ + public function getReaction() + { + return $this->reaction; + } + + public function hasReaction() + { + return isset($this->reaction); + } + + public function clearReaction() + { + unset($this->reaction); + } + + /** + * Required. The reaction to create. + * + * Generated from protobuf field .google.chat.v1.Reaction reaction = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Reaction $var + * @return $this + */ + public function setReaction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Reaction::class); + $this->reaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateSpaceRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateSpaceRequest.php new file mode 100644 index 000000000000..0f89cf2aafdf --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateSpaceRequest.php @@ -0,0 +1,192 @@ +google.chat.v1.CreateSpaceRequest + */ +class CreateSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `displayName` and `spaceType` fields must be populated. Only + * `SpaceType.SPACE` is supported. + * If you receive the error message `ALREADY_EXISTS`, + * try a different `displayName`. An existing space within the Google + * Workspace organization might already use this display name. + * If you're a member of the [Developer Preview + * program](https://developers.google.com/workspace/preview), + * `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. + * The space `name` is assigned on the server so anything specified in this + * field will be ignored. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $space = null; + /** + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + + /** + * @param \Google\Apps\Chat\V1\Space $space Required. The `displayName` and `spaceType` fields must be populated. Only + * `SpaceType.SPACE` is supported. + * + * If you receive the error message `ALREADY_EXISTS`, + * try a different `displayName`. An existing space within the Google + * Workspace organization might already use this display name. + * + * If you're a member of the [Developer Preview + * program](https://developers.google.com/workspace/preview), + * `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. + * + * The space `name` is assigned on the server so anything specified in this + * field will be ignored. + * + * @return \Google\Apps\Chat\V1\CreateSpaceRequest + * + * @experimental + */ + public static function build(\Google\Apps\Chat\V1\Space $space): self + { + return (new self()) + ->setSpace($space); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Space $space + * Required. The `displayName` and `spaceType` fields must be populated. Only + * `SpaceType.SPACE` is supported. + * If you receive the error message `ALREADY_EXISTS`, + * try a different `displayName`. An existing space within the Google + * Workspace organization might already use this display name. + * If you're a member of the [Developer Preview + * program](https://developers.google.com/workspace/preview), + * `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. + * The space `name` is assigned on the server so anything specified in this + * field will be ignored. + * @type string $request_id + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `displayName` and `spaceType` fields must be populated. Only + * `SpaceType.SPACE` is supported. + * If you receive the error message `ALREADY_EXISTS`, + * try a different `displayName`. An existing space within the Google + * Workspace organization might already use this display name. + * If you're a member of the [Developer Preview + * program](https://developers.google.com/workspace/preview), + * `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. + * The space `name` is assigned on the server so anything specified in this + * field will be ignored. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * Required. The `displayName` and `spaceType` fields must be populated. Only + * `SpaceType.SPACE` is supported. + * If you receive the error message `ALREADY_EXISTS`, + * try a different `displayName`. An existing space within the Google + * Workspace organization might already use this display name. + * If you're a member of the [Developer Preview + * program](https://developers.google.com/workspace/preview), + * `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. + * The space `name` is assigned on the server so anything specified in this + * field will be ignored. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); + $this->space = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CustomEmoji.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CustomEmoji.php new file mode 100644 index 000000000000..726372738cb6 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CustomEmoji.php @@ -0,0 +1,67 @@ +google.chat.v1.CustomEmoji + */ +class CustomEmoji extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Unique key for the custom emoji resource. + * + * Generated from protobuf field string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $uid = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uid + * Output only. Unique key for the custom emoji resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Unique key for the custom emoji resource. + * + * Generated from protobuf field string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUid() + { + return $this->uid; + } + + /** + * Output only. Unique key for the custom emoji resource. + * + * Generated from protobuf field string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUid($var) + { + GPBUtil::checkString($var, True); + $this->uid = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMembershipRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMembershipRequest.php new file mode 100644 index 000000000000..cbbedad4aa34 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMembershipRequest.php @@ -0,0 +1,196 @@ +google.chat.v1.DeleteMembershipRequest + */ +class DeleteMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the membership to delete. Chat apps can delete + * human users' or their own memberships. Chat apps can't delete other apps' + * memberships. + * When deleting a human membership, requires the `chat.memberships` scope and + * `spaces/{space}/members/{member}` format. You can use the email as an + * alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * When deleting an app membership, requires the `chat.memberships.app` scope + * and `spaces/{space}/members/app` format. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Deleting app memberships in a space isn't supported using admin access. + * + * Generated from protobuf field bool use_admin_access = 2; + */ + protected $use_admin_access = false; + + /** + * @param string $name Required. Resource name of the membership to delete. Chat apps can delete + * human users' or their own memberships. Chat apps can't delete other apps' + * memberships. + * + * When deleting a human membership, requires the `chat.memberships` scope and + * `spaces/{space}/members/{member}` format. You can use the email as an + * alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * + * When deleting an app membership, requires the `chat.memberships.app` scope + * and `spaces/{space}/members/app` format. + * + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. Please see + * {@see ChatServiceClient::membershipName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\DeleteMembershipRequest + * + * @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. Resource name of the membership to delete. Chat apps can delete + * human users' or their own memberships. Chat apps can't delete other apps' + * memberships. + * When deleting a human membership, requires the `chat.memberships` scope and + * `spaces/{space}/members/{member}` format. You can use the email as an + * alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * When deleting an app membership, requires the `chat.memberships.app` scope + * and `spaces/{space}/members/app` format. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. + * @type bool $use_admin_access + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Deleting app memberships in a space isn't supported using admin access. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the membership to delete. Chat apps can delete + * human users' or their own memberships. Chat apps can't delete other apps' + * memberships. + * When deleting a human membership, requires the `chat.memberships` scope and + * `spaces/{space}/members/{member}` format. You can use the email as an + * alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * When deleting an app membership, requires the `chat.memberships.app` scope + * and `spaces/{space}/members/app` format. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. + * + * 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. Resource name of the membership to delete. Chat apps can delete + * human users' or their own memberships. Chat apps can't delete other apps' + * memberships. + * When deleting a human membership, requires the `chat.memberships` scope and + * `spaces/{space}/members/{member}` format. You can use the email as an + * alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * When deleting an app membership, requires the `chat.memberships.app` scope + * and `spaces/{space}/members/app` format. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. + * + * 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; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Deleting app memberships in a space isn't supported using admin access. + * + * Generated from protobuf field bool use_admin_access = 2; + * @return bool + */ + public function getUseAdminAccess() + { + return $this->use_admin_access; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Deleting app memberships in a space isn't supported using admin access. + * + * Generated from protobuf field bool use_admin_access = 2; + * @param bool $var + * @return $this + */ + public function setUseAdminAccess($var) + { + GPBUtil::checkBool($var); + $this->use_admin_access = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMessageRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMessageRequest.php new file mode 100644 index 000000000000..37cb2a3434f7 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMessageRequest.php @@ -0,0 +1,162 @@ +google.chat.v1.DeleteMessageRequest + */ +class DeleteMessageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * When `true`, deleting a message also deletes its threaded replies. When + * `false`, if a message has threaded replies, deletion fails. + * Only applies when [authenticating as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * Has no effect when [authenticating as a Chat app] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field bool force = 2; + */ + protected $force = false; + + /** + * @param string $name Required. Resource name of the message. + * + * Format: `spaces/{space}/messages/{message}` + * + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). Please see + * {@see ChatServiceClient::messageName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\DeleteMessageRequest + * + * @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. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * @type bool $force + * When `true`, deleting a message also deletes its threaded replies. When + * `false`, if a message has threaded replies, deletion fails. + * Only applies when [authenticating as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * Has no effect when [authenticating as a Chat app] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * 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. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * 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; + } + + /** + * When `true`, deleting a message also deletes its threaded replies. When + * `false`, if a message has threaded replies, deletion fails. + * Only applies when [authenticating as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * Has no effect when [authenticating as a Chat app] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field bool force = 2; + * @return bool + */ + public function getForce() + { + return $this->force; + } + + /** + * When `true`, deleting a message also deletes its threaded replies. When + * `false`, if a message has threaded replies, deletion fails. + * Only applies when [authenticating as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * Has no effect when [authenticating as a Chat app] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field bool force = 2; + * @param bool $var + * @return $this + */ + public function setForce($var) + { + GPBUtil::checkBool($var); + $this->force = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteReactionRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteReactionRequest.php new file mode 100644 index 000000000000..c7557ad1c0e4 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteReactionRequest.php @@ -0,0 +1,87 @@ +google.chat.v1.DeleteReactionRequest + */ +class DeleteReactionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Name of the reaction to delete. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Name of the reaction to delete. + * + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * Please see {@see ChatServiceClient::reactionName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\DeleteReactionRequest + * + * @experimental + */ + public static function build(string $name): self + { + return (new self()) + ->setName($name); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Name of the reaction to delete. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * Required. Name of the reaction to delete. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Name of the reaction to delete. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * + * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteSpaceRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteSpaceRequest.php new file mode 100644 index 000000000000..0f9bea7f4729 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteSpaceRequest.php @@ -0,0 +1,145 @@ +google.chat.v1.DeleteSpaceRequest + */ +class DeleteSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the space to delete. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.delete` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * + * Generated from protobuf field bool use_admin_access = 2; + */ + protected $use_admin_access = false; + + /** + * @param string $name Required. Resource name of the space to delete. + * + * Format: `spaces/{space}` + * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\DeleteSpaceRequest + * + * @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. Resource name of the space to delete. + * Format: `spaces/{space}` + * @type bool $use_admin_access + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.delete` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the space to delete. + * Format: `spaces/{space}` + * + * 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. Resource name of the space to delete. + * Format: `spaces/{space}` + * + * 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; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.delete` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * + * Generated from protobuf field bool use_admin_access = 2; + * @return bool + */ + public function getUseAdminAccess() + { + return $this->use_admin_access; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.delete` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * + * Generated from protobuf field bool use_admin_access = 2; + * @param bool $var + * @return $this + */ + public function setUseAdminAccess($var) + { + GPBUtil::checkBool($var); + $this->use_admin_access = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata.php new file mode 100644 index 000000000000..cd50e1dc6aa7 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata.php @@ -0,0 +1,68 @@ +google.chat.v1.DeletionMetadata + */ +class DeletionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Indicates who deleted the message. + * + * Generated from protobuf field .google.chat.v1.DeletionMetadata.DeletionType deletion_type = 1; + */ + protected $deletion_type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $deletion_type + * Indicates who deleted the message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\DeletionMetadata::initOnce(); + parent::__construct($data); + } + + /** + * Indicates who deleted the message. + * + * Generated from protobuf field .google.chat.v1.DeletionMetadata.DeletionType deletion_type = 1; + * @return int + */ + public function getDeletionType() + { + return $this->deletion_type; + } + + /** + * Indicates who deleted the message. + * + * Generated from protobuf field .google.chat.v1.DeletionMetadata.DeletionType deletion_type = 1; + * @param int $var + * @return $this + */ + public function setDeletionType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\DeletionMetadata\DeletionType::class); + $this->deletion_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata/DeletionType.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata/DeletionType.php new file mode 100644 index 000000000000..c7ff2a29683c --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata/DeletionType.php @@ -0,0 +1,92 @@ +google.chat.v1.DeletionMetadata.DeletionType + */ +class DeletionType +{ + /** + * This value is unused. + * + * Generated from protobuf enum DELETION_TYPE_UNSPECIFIED = 0; + */ + const DELETION_TYPE_UNSPECIFIED = 0; + /** + * User deleted their own message. + * + * Generated from protobuf enum CREATOR = 1; + */ + const CREATOR = 1; + /** + * The space owner deleted the message. + * + * Generated from protobuf enum SPACE_OWNER = 2; + */ + const SPACE_OWNER = 2; + /** + * A Google Workspace admin deleted the message. + * + * Generated from protobuf enum ADMIN = 3; + */ + const ADMIN = 3; + /** + * A Chat app deleted its own message when it expired. + * + * Generated from protobuf enum APP_MESSAGE_EXPIRY = 4; + */ + const APP_MESSAGE_EXPIRY = 4; + /** + * A Chat app deleted the message on behalf of the user. + * + * Generated from protobuf enum CREATOR_VIA_APP = 5; + */ + const CREATOR_VIA_APP = 5; + /** + * A Chat app deleted the message on behalf of the space owner. + * + * Generated from protobuf enum SPACE_OWNER_VIA_APP = 6; + */ + const SPACE_OWNER_VIA_APP = 6; + + private static $valueToName = [ + self::DELETION_TYPE_UNSPECIFIED => 'DELETION_TYPE_UNSPECIFIED', + self::CREATOR => 'CREATOR', + self::SPACE_OWNER => 'SPACE_OWNER', + self::ADMIN => 'ADMIN', + self::APP_MESSAGE_EXPIRY => 'APP_MESSAGE_EXPIRY', + self::CREATOR_VIA_APP => 'CREATOR_VIA_APP', + self::SPACE_OWNER_VIA_APP => 'SPACE_OWNER_VIA_APP', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(DeletionType::class, \Google\Apps\Chat\V1\DeletionMetadata_DeletionType::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Dialog.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Dialog.php new file mode 100644 index 000000000000..86434601a751 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Dialog.php @@ -0,0 +1,85 @@ +google.chat.v1.Dialog + */ +class Dialog extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. Body of the dialog, which is rendered in a modal. + * Google Chat apps don't support the following card entities: + * `DateTimePicker`, `OnChangeAction`. + * + * Generated from protobuf field .google.apps.card.v1.Card body = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $body = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Card\V1\Card $body + * Input only. Body of the dialog, which is rendered in a modal. + * Google Chat apps don't support the following card entities: + * `DateTimePicker`, `OnChangeAction`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Input only. Body of the dialog, which is rendered in a modal. + * Google Chat apps don't support the following card entities: + * `DateTimePicker`, `OnChangeAction`. + * + * Generated from protobuf field .google.apps.card.v1.Card body = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Apps\Card\V1\Card|null + */ + public function getBody() + { + return $this->body; + } + + public function hasBody() + { + return isset($this->body); + } + + public function clearBody() + { + unset($this->body); + } + + /** + * Input only. Body of the dialog, which is rendered in a modal. + * Google Chat apps don't support the following card entities: + * `DateTimePicker`, `OnChangeAction`. + * + * Generated from protobuf field .google.apps.card.v1.Card body = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Apps\Card\V1\Card $var + * @return $this + */ + public function setBody($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card::class); + $this->body = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DialogAction.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DialogAction.php new file mode 100644 index 000000000000..381110a1278f --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DialogAction.php @@ -0,0 +1,139 @@ +google.chat.v1.DialogAction + */ +class DialogAction extends \Google\Protobuf\Internal\Message +{ + /** + * Input only. Status for a request to either invoke or submit a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Displays + * a status and message to users, if necessary. + * For example, in case of an error or success. + * + * Generated from protobuf field .google.chat.v1.ActionStatus action_status = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $action_status = null; + protected $action; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Dialog $dialog + * Input only. + * [Dialog](https://developers.google.com/workspace/chat/dialogs) for the + * request. + * @type \Google\Apps\Chat\V1\ActionStatus $action_status + * Input only. Status for a request to either invoke or submit a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Displays + * a status and message to users, if necessary. + * For example, in case of an error or success. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Input only. + * [Dialog](https://developers.google.com/workspace/chat/dialogs) for the + * request. + * + * Generated from protobuf field .google.chat.v1.Dialog dialog = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Apps\Chat\V1\Dialog|null + */ + public function getDialog() + { + return $this->readOneof(1); + } + + public function hasDialog() + { + return $this->hasOneof(1); + } + + /** + * Input only. + * [Dialog](https://developers.google.com/workspace/chat/dialogs) for the + * request. + * + * Generated from protobuf field .google.chat.v1.Dialog dialog = 1 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Apps\Chat\V1\Dialog $var + * @return $this + */ + public function setDialog($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Dialog::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Input only. Status for a request to either invoke or submit a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Displays + * a status and message to users, if necessary. + * For example, in case of an error or success. + * + * Generated from protobuf field .google.chat.v1.ActionStatus action_status = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Apps\Chat\V1\ActionStatus|null + */ + public function getActionStatus() + { + return $this->action_status; + } + + public function hasActionStatus() + { + return isset($this->action_status); + } + + public function clearActionStatus() + { + unset($this->action_status); + } + + /** + * Input only. Status for a request to either invoke or submit a + * [dialog](https://developers.google.com/workspace/chat/dialogs). Displays + * a status and message to users, if necessary. + * For example, in case of an error or success. + * + * Generated from protobuf field .google.chat.v1.ActionStatus action_status = 2 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Apps\Chat\V1\ActionStatus $var + * @return $this + */ + public function setActionStatus($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ActionStatus::class); + $this->action_status = $var; + + return $this; + } + + /** + * @return string + */ + public function getAction() + { + return $this->whichOneof("action"); + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveDataRef.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveDataRef.php new file mode 100644 index 000000000000..9c6bf3e9e6b9 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveDataRef.php @@ -0,0 +1,67 @@ +google.chat.v1.DriveDataRef + */ +class DriveDataRef extends \Google\Protobuf\Internal\Message +{ + /** + * The ID for the drive file. Use with the Drive API. + * + * Generated from protobuf field string drive_file_id = 2; + */ + protected $drive_file_id = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $drive_file_id + * The ID for the drive file. Use with the Drive API. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * The ID for the drive file. Use with the Drive API. + * + * Generated from protobuf field string drive_file_id = 2; + * @return string + */ + public function getDriveFileId() + { + return $this->drive_file_id; + } + + /** + * The ID for the drive file. Use with the Drive API. + * + * Generated from protobuf field string drive_file_id = 2; + * @param string $var + * @return $this + */ + public function setDriveFileId($var) + { + GPBUtil::checkString($var, True); + $this->drive_file_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveLinkData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveLinkData.php new file mode 100644 index 000000000000..f27cfb2631df --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveLinkData.php @@ -0,0 +1,119 @@ +google.chat.v1.DriveLinkData + */ +class DriveLinkData extends \Google\Protobuf\Internal\Message +{ + /** + * A + * [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) + * which references a Google Drive file. + * + * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 1; + */ + protected $drive_data_ref = null; + /** + * The mime type of the linked Google Drive resource. + * + * Generated from protobuf field string mime_type = 2; + */ + protected $mime_type = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\DriveDataRef $drive_data_ref + * A + * [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) + * which references a Google Drive file. + * @type string $mime_type + * The mime type of the linked Google Drive resource. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); + parent::__construct($data); + } + + /** + * A + * [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) + * which references a Google Drive file. + * + * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 1; + * @return \Google\Apps\Chat\V1\DriveDataRef|null + */ + public function getDriveDataRef() + { + return $this->drive_data_ref; + } + + public function hasDriveDataRef() + { + return isset($this->drive_data_ref); + } + + public function clearDriveDataRef() + { + unset($this->drive_data_ref); + } + + /** + * A + * [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) + * which references a Google Drive file. + * + * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 1; + * @param \Google\Apps\Chat\V1\DriveDataRef $var + * @return $this + */ + public function setDriveDataRef($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DriveDataRef::class); + $this->drive_data_ref = $var; + + return $this; + } + + /** + * The mime type of the linked Google Drive resource. + * + * Generated from protobuf field string mime_type = 2; + * @return string + */ + public function getMimeType() + { + return $this->mime_type; + } + + /** + * The mime type of the linked Google Drive resource. + * + * Generated from protobuf field string mime_type = 2; + * @param string $var + * @return $this + */ + public function setMimeType($var) + { + GPBUtil::checkString($var, True); + $this->mime_type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Emoji.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Emoji.php new file mode 100644 index 000000000000..c4efb005ee19 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Emoji.php @@ -0,0 +1,108 @@ +google.chat.v1.Emoji + */ +class Emoji extends \Google\Protobuf\Internal\Message +{ + protected $content; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $unicode + * A basic emoji represented by a unicode string. + * @type \Google\Apps\Chat\V1\CustomEmoji $custom_emoji + * Output only. A custom emoji. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * A basic emoji represented by a unicode string. + * + * Generated from protobuf field string unicode = 1; + * @return string + */ + public function getUnicode() + { + return $this->readOneof(1); + } + + public function hasUnicode() + { + return $this->hasOneof(1); + } + + /** + * A basic emoji represented by a unicode string. + * + * Generated from protobuf field string unicode = 1; + * @param string $var + * @return $this + */ + public function setUnicode($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Output only. A custom emoji. + * + * Generated from protobuf field .google.chat.v1.CustomEmoji custom_emoji = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\CustomEmoji|null + */ + public function getCustomEmoji() + { + return $this->readOneof(2); + } + + public function hasCustomEmoji() + { + return $this->hasOneof(2); + } + + /** + * Output only. A custom emoji. + * + * Generated from protobuf field .google.chat.v1.CustomEmoji custom_emoji = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\CustomEmoji $var + * @return $this + */ + public function setCustomEmoji($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\CustomEmoji::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getContent() + { + return $this->whichOneof("content"); + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/EmojiReactionSummary.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/EmojiReactionSummary.php new file mode 100644 index 000000000000..c607da712f81 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/EmojiReactionSummary.php @@ -0,0 +1,121 @@ +google.chat.v1.EmojiReactionSummary + */ +class EmojiReactionSummary extends \Google\Protobuf\Internal\Message +{ + /** + * Emoji associated with the reactions. + * + * Generated from protobuf field .google.chat.v1.Emoji emoji = 1; + */ + protected $emoji = null; + /** + * The total number of reactions using the associated emoji. + * + * Generated from protobuf field optional int32 reaction_count = 2; + */ + protected $reaction_count = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Emoji $emoji + * Emoji associated with the reactions. + * @type int $reaction_count + * The total number of reactions using the associated emoji. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * Emoji associated with the reactions. + * + * Generated from protobuf field .google.chat.v1.Emoji emoji = 1; + * @return \Google\Apps\Chat\V1\Emoji|null + */ + public function getEmoji() + { + return $this->emoji; + } + + public function hasEmoji() + { + return isset($this->emoji); + } + + public function clearEmoji() + { + unset($this->emoji); + } + + /** + * Emoji associated with the reactions. + * + * Generated from protobuf field .google.chat.v1.Emoji emoji = 1; + * @param \Google\Apps\Chat\V1\Emoji $var + * @return $this + */ + public function setEmoji($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Emoji::class); + $this->emoji = $var; + + return $this; + } + + /** + * The total number of reactions using the associated emoji. + * + * Generated from protobuf field optional int32 reaction_count = 2; + * @return int + */ + public function getReactionCount() + { + return isset($this->reaction_count) ? $this->reaction_count : 0; + } + + public function hasReactionCount() + { + return isset($this->reaction_count); + } + + public function clearReactionCount() + { + unset($this->reaction_count); + } + + /** + * The total number of reactions using the associated emoji. + * + * Generated from protobuf field optional int32 reaction_count = 2; + * @param int $var + * @return $this + */ + public function setReactionCount($var) + { + GPBUtil::checkInt32($var); + $this->reaction_count = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/FindDirectMessageRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/FindDirectMessageRequest.php new file mode 100644 index 000000000000..d8347a58af0b --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/FindDirectMessageRequest.php @@ -0,0 +1,111 @@ +google.chat.v1.FindDirectMessageRequest + */ +class FindDirectMessageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the user to find direct message with. + * Format: `users/{user}`, where `{user}` is either the `id` for the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Directory API. For example, if the People API profile ID is + * `123456789`, you can find a direct message with that person by using + * `users/123456789` as the `name`. When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the email as an alias for `{user}`. For example, + * `users/example@gmail.com` where `example@gmail.com` is the email of the + * Google Chat user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Required. Resource name of the user to find direct message with. + * Format: `users/{user}`, where `{user}` is either the `id` for the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Directory API. For example, if the People API profile ID is + * `123456789`, you can find a direct message with that person by using + * `users/123456789` as the `name`. When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the email as an alias for `{user}`. For example, + * `users/example@gmail.com` where `example@gmail.com` is the email of the + * Google Chat user. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the user to find direct message with. + * Format: `users/{user}`, where `{user}` is either the `id` for the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Directory API. For example, if the People API profile ID is + * `123456789`, you can find a direct message with that person by using + * `users/123456789` as the `name`. When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the email as an alias for `{user}`. For example, + * `users/example@gmail.com` where `example@gmail.com` is the email of the + * Google Chat user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Required. Resource name of the user to find direct message with. + * Format: `users/{user}`, where `{user}` is either the `id` for the + * [person](https://developers.google.com/people/api/rest/v1/people) from the + * People API, or the `id` for the + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Directory API. For example, if the People API profile ID is + * `123456789`, you can find a direct message with that person by using + * `users/123456789` as the `name`. When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the email as an alias for `{user}`. For example, + * `users/example@gmail.com` where `example@gmail.com` is the email of the + * Google Chat user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetAttachmentRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetAttachmentRequest.php new file mode 100644 index 000000000000..4e3a33a77b87 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetAttachmentRequest.php @@ -0,0 +1,86 @@ +google.chat.v1.GetAttachmentRequest + */ +class GetAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the attachment, in the form + * `spaces/{space}/messages/{message}/attachments/{attachment}`. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the attachment, in the form + * `spaces/{space}/messages/{message}/attachments/{attachment}`. Please see + * {@see ChatServiceClient::attachmentName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\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. Resource name of the attachment, in the form + * `spaces/{space}/messages/{message}/attachments/{attachment}`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the attachment, in the form + * `spaces/{space}/messages/{message}/attachments/{attachment}`. + * + * 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. Resource name of the attachment, in the form + * `spaces/{space}/messages/{message}/attachments/{attachment}`. + * + * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMembershipRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMembershipRequest.php new file mode 100644 index 000000000000..55823f0ea600 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMembershipRequest.php @@ -0,0 +1,195 @@ +google.chat.v1.GetMembershipRequest + */ +class GetMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the membership to retrieve. + * To get the app's own membership [by using user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can optionally use `spaces/{space}/members/app`. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` + * When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the user's email as an alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` + * [OAuth 2.0 + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Getting app memberships in a space isn't supported when using admin access. + * + * Generated from protobuf field bool use_admin_access = 3; + */ + protected $use_admin_access = false; + + /** + * @param string $name Required. Resource name of the membership to retrieve. + * + * To get the app's own membership [by using user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can optionally use `spaces/{space}/members/app`. + * + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` + * + * When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the user's email as an alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. Please see + * {@see ChatServiceClient::membershipName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetMembershipRequest + * + * @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. Resource name of the membership to retrieve. + * To get the app's own membership [by using user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can optionally use `spaces/{space}/members/app`. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` + * When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the user's email as an alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * @type bool $use_admin_access + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` + * [OAuth 2.0 + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Getting app memberships in a space isn't supported when using admin access. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the membership to retrieve. + * To get the app's own membership [by using user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can optionally use `spaces/{space}/members/app`. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` + * When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the user's email as an alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * + * 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. Resource name of the membership to retrieve. + * To get the app's own membership [by using user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can optionally use `spaces/{space}/members/app`. + * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` + * When [authenticated as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * you can use the user's email as an alias for `{member}`. For example, + * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the + * email of the Google Chat user. + * + * 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; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` + * [OAuth 2.0 + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Getting app memberships in a space isn't supported when using admin access. + * + * Generated from protobuf field bool use_admin_access = 3; + * @return bool + */ + public function getUseAdminAccess() + { + return $this->use_admin_access; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` + * [OAuth 2.0 + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Getting app memberships in a space isn't supported when using admin access. + * + * Generated from protobuf field bool use_admin_access = 3; + * @param bool $var + * @return $this + */ + public function setUseAdminAccess($var) + { + GPBUtil::checkBool($var); + $this->use_admin_access = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMessageRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMessageRequest.php new file mode 100644 index 000000000000..99403d2bead6 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMessageRequest.php @@ -0,0 +1,108 @@ +google.chat.v1.GetMessageRequest + */ +class GetMessageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the message. + * + * Format: `spaces/{space}/messages/{message}` + * + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). Please see + * {@see ChatServiceClient::messageName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetMessageRequest + * + * @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. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * 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. Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * If you've set a custom ID for your message, you can use the value from the + * `clientAssignedMessageId` field for `{message}`. For details, see [Name a + * message] + * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceEventRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceEventRequest.php new file mode 100644 index 000000000000..892b3632ebb6 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceEventRequest.php @@ -0,0 +1,87 @@ +google.chat.v1.GetSpaceEventRequest + */ +class GetSpaceEventRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the space event. + * Format: `spaces/{space}/spaceEvents/{spaceEvent}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. The resource name of the space event. + * + * Format: `spaces/{space}/spaceEvents/{spaceEvent}` + * Please see {@see ChatServiceClient::spaceEventName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetSpaceEventRequest + * + * @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 resource name of the space event. + * Format: `spaces/{space}/spaceEvents/{spaceEvent}` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceEvent::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the space event. + * Format: `spaces/{space}/spaceEvents/{spaceEvent}` + * + * 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 resource name of the space event. + * Format: `spaces/{space}/spaceEvents/{spaceEvent}` + * + * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceReadStateRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceReadStateRequest.php new file mode 100644 index 000000000000..388b0ec0c154 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceReadStateRequest.php @@ -0,0 +1,127 @@ +google.chat.v1.GetSpaceReadStateRequest + */ +class GetSpaceReadStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the space read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the space read state to retrieve. + * + * Only supports getting read state for the calling user. + * + * To refer to the calling user, set one of the following: + * + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * + * Format: users/{user}/spaces/{space}/spaceReadState + * Please see {@see ChatServiceClient::spaceReadStateName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetSpaceReadStateRequest + * + * @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. Resource name of the space read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceReadState::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the space read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * 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. Resource name of the space read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceRequest.php new file mode 100644 index 000000000000..6b3ee5dbaefd --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceRequest.php @@ -0,0 +1,145 @@ +google.chat.v1.GetSpaceRequest + */ +class GetSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the space, in the form `spaces/{space}`. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * + * Generated from protobuf field bool use_admin_access = 2; + */ + protected $use_admin_access = false; + + /** + * @param string $name Required. Resource name of the space, in the form `spaces/{space}`. + * + * Format: `spaces/{space}` + * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetSpaceRequest + * + * @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. Resource name of the space, in the form `spaces/{space}`. + * Format: `spaces/{space}` + * @type bool $use_admin_access + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the space, in the form `spaces/{space}`. + * Format: `spaces/{space}` + * + * 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. Resource name of the space, in the form `spaces/{space}`. + * Format: `spaces/{space}` + * + * 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; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * + * Generated from protobuf field bool use_admin_access = 2; + * @return bool + */ + public function getUseAdminAccess() + { + return $this->use_admin_access; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 + * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * + * Generated from protobuf field bool use_admin_access = 2; + * @param bool $var + * @return $this + */ + public function setUseAdminAccess($var) + { + GPBUtil::checkBool($var); + $this->use_admin_access = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetThreadReadStateRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetThreadReadStateRequest.php new file mode 100644 index 000000000000..66ef60d6afb3 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetThreadReadStateRequest.php @@ -0,0 +1,132 @@ +google.chat.v1.GetThreadReadStateRequest + */ +class GetThreadReadStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the thread read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $name = ''; + + /** + * @param string $name Required. Resource name of the thread read state to retrieve. + * + * Only supports getting read state for the calling user. + * + * To refer to the calling user, set one of the following: + * + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * Please see {@see ChatServiceClient::threadReadStateName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\GetThreadReadStateRequest + * + * @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. Resource name of the thread read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ThreadReadState::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the thread read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * + * 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. Resource name of the thread read state to retrieve. + * Only supports getting read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, + * `users/me/spaces/{space}/threads/{thread}/threadReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. + * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * + * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Group.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Group.php new file mode 100644 index 000000000000..abd3dff79c75 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Group.php @@ -0,0 +1,83 @@ +google.chat.v1.Group + */ +class Group extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name for a Google Group. + * Represents a + * [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in + * Cloud Identity Groups API. + * Format: groups/{group} + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name for a Google Group. + * Represents a + * [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in + * Cloud Identity Groups API. + * Format: groups/{group} + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Group::initOnce(); + parent::__construct($data); + } + + /** + * Resource name for a Google Group. + * Represents a + * [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in + * Cloud Identity Groups API. + * Format: groups/{group} + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name for a Google Group. + * Represents a + * [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in + * Cloud Identity Groups API. + * Format: groups/{group} + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/HistoryState.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/HistoryState.php new file mode 100644 index 000000000000..2dadcbc53b5f --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/HistoryState.php @@ -0,0 +1,65 @@ +google.chat.v1.HistoryState + */ +class HistoryState +{ + /** + * Default value. Do not use. + * + * Generated from protobuf enum HISTORY_STATE_UNSPECIFIED = 0; + */ + const HISTORY_STATE_UNSPECIFIED = 0; + /** + * History off. [Messages and threads are kept for 24 + * hours](https://support.google.com/chat/answer/7664687). + * + * Generated from protobuf enum HISTORY_OFF = 1; + */ + const HISTORY_OFF = 1; + /** + * History on. The organization's [Vault retention + * rules](https://support.google.com/vault/answer/7657597) specify for + * how long messages and threads are kept. + * + * Generated from protobuf enum HISTORY_ON = 2; + */ + const HISTORY_ON = 2; + + private static $valueToName = [ + self::HISTORY_STATE_UNSPECIFIED => 'HISTORY_STATE_UNSPECIFIED', + self::HISTORY_OFF => 'HISTORY_OFF', + self::HISTORY_ON => 'HISTORY_ON', + ]; + + 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsRequest.php new file mode 100644 index 000000000000..6cdec7cabeab --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsRequest.php @@ -0,0 +1,512 @@ +google.chat.v1.ListMembershipsRequest + */ +class ListMembershipsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the space for which to fetch a membership + * list. + * Format: spaces/{space} + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of memberships to return. The service might + * return fewer than this value. + * If unspecified, at most 100 memberships are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous call to list memberships. + * Provide this parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A query filter. + * You can filter memberships by a member's role + * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) + * and type + * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). + * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. + * To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also + * filter for `member.type` using the `!=` operator. + * To filter by both role and type, use the `AND` operator. To filter by + * either role or type, use the `OR` operator. + * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required + * when `use_admin_access` is set to true. Other member type filters will be + * rejected. + * For example, the following queries are valid: + * ``` + * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" + * member.type = "HUMAN" AND role = "ROLE_MANAGER" + * member.type != "BOT" + * ``` + * The following queries are invalid: + * ``` + * member.type = "HUMAN" AND member.type = "BOT" + * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + /** + * Optional. When `true`, also returns memberships associated with a + * [Google Group][google.chat.v1.Membership.group_member], in + * addition to other types of memberships. If a + * [filter][google.chat.v1.ListMembershipsRequest.filter] is set, + * [Google Group][google.chat.v1.Membership.group_member] + * memberships that don't match the filter criteria aren't returned. + * + * Generated from protobuf field bool show_groups = 6 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_groups = false; + /** + * Optional. When `true`, also returns memberships associated with + * [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in + * addition to other types of memberships. If a + * filter is set, + * [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships + * that don't match the filter criteria aren't returned. + * Currently requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * Generated from protobuf field bool show_invited = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $show_invited = false; + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires either the `chat.admin.memberships.readonly` or + * `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Listing app memberships in a space isn't supported when using admin access. + * + * Generated from protobuf field bool use_admin_access = 8; + */ + protected $use_admin_access = false; + + /** + * @param string $parent Required. The resource name of the space for which to fetch a membership + * list. + * + * Format: spaces/{space} + * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\ListMembershipsRequest + * + * @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 space for which to fetch a membership + * list. + * Format: spaces/{space} + * @type int $page_size + * Optional. The maximum number of memberships to return. The service might + * return fewer than this value. + * If unspecified, at most 100 memberships are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * @type string $page_token + * Optional. A page token, received from a previous call to list memberships. + * Provide this parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * @type string $filter + * Optional. A query filter. + * You can filter memberships by a member's role + * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) + * and type + * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). + * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. + * To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also + * filter for `member.type` using the `!=` operator. + * To filter by both role and type, use the `AND` operator. To filter by + * either role or type, use the `OR` operator. + * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required + * when `use_admin_access` is set to true. Other member type filters will be + * rejected. + * For example, the following queries are valid: + * ``` + * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" + * member.type = "HUMAN" AND role = "ROLE_MANAGER" + * member.type != "BOT" + * ``` + * The following queries are invalid: + * ``` + * member.type = "HUMAN" AND member.type = "BOT" + * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * @type bool $show_groups + * Optional. When `true`, also returns memberships associated with a + * [Google Group][google.chat.v1.Membership.group_member], in + * addition to other types of memberships. If a + * [filter][google.chat.v1.ListMembershipsRequest.filter] is set, + * [Google Group][google.chat.v1.Membership.group_member] + * memberships that don't match the filter criteria aren't returned. + * @type bool $show_invited + * Optional. When `true`, also returns memberships associated with + * [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in + * addition to other types of memberships. If a + * filter is set, + * [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships + * that don't match the filter criteria aren't returned. + * Currently requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * @type bool $use_admin_access + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires either the `chat.admin.memberships.readonly` or + * `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Listing app memberships in a space isn't supported when using admin access. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the space for which to fetch a membership + * list. + * Format: spaces/{space} + * + * 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 space for which to fetch a membership + * list. + * Format: spaces/{space} + * + * 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. The maximum number of memberships to return. The service might + * return fewer than this value. + * If unspecified, at most 100 memberships are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of memberships to return. The service might + * return fewer than this value. + * If unspecified, at most 100 memberships are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. A page token, received from a previous call to list memberships. + * Provide this parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous call to list memberships. + * Provide this parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A query filter. + * You can filter memberships by a member's role + * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) + * and type + * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). + * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. + * To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also + * filter for `member.type` using the `!=` operator. + * To filter by both role and type, use the `AND` operator. To filter by + * either role or type, use the `OR` operator. + * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required + * when `use_admin_access` is set to true. Other member type filters will be + * rejected. + * For example, the following queries are valid: + * ``` + * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" + * member.type = "HUMAN" AND role = "ROLE_MANAGER" + * member.type != "BOT" + * ``` + * The following queries are invalid: + * ``` + * member.type = "HUMAN" AND member.type = "BOT" + * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A query filter. + * You can filter memberships by a member's role + * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) + * and type + * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). + * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. + * To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also + * filter for `member.type` using the `!=` operator. + * To filter by both role and type, use the `AND` operator. To filter by + * either role or type, use the `OR` operator. + * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required + * when `use_admin_access` is set to true. Other member type filters will be + * rejected. + * For example, the following queries are valid: + * ``` + * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" + * member.type = "HUMAN" AND role = "ROLE_MANAGER" + * member.type != "BOT" + * ``` + * The following queries are invalid: + * ``` + * member.type = "HUMAN" AND member.type = "BOT" + * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional. When `true`, also returns memberships associated with a + * [Google Group][google.chat.v1.Membership.group_member], in + * addition to other types of memberships. If a + * [filter][google.chat.v1.ListMembershipsRequest.filter] is set, + * [Google Group][google.chat.v1.Membership.group_member] + * memberships that don't match the filter criteria aren't returned. + * + * Generated from protobuf field bool show_groups = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowGroups() + { + return $this->show_groups; + } + + /** + * Optional. When `true`, also returns memberships associated with a + * [Google Group][google.chat.v1.Membership.group_member], in + * addition to other types of memberships. If a + * [filter][google.chat.v1.ListMembershipsRequest.filter] is set, + * [Google Group][google.chat.v1.Membership.group_member] + * memberships that don't match the filter criteria aren't returned. + * + * Generated from protobuf field bool show_groups = 6 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowGroups($var) + { + GPBUtil::checkBool($var); + $this->show_groups = $var; + + return $this; + } + + /** + * Optional. When `true`, also returns memberships associated with + * [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in + * addition to other types of memberships. If a + * filter is set, + * [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships + * that don't match the filter criteria aren't returned. + * Currently requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * Generated from protobuf field bool show_invited = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getShowInvited() + { + return $this->show_invited; + } + + /** + * Optional. When `true`, also returns memberships associated with + * [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in + * addition to other types of memberships. If a + * filter is set, + * [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships + * that don't match the filter criteria aren't returned. + * Currently requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * Generated from protobuf field bool show_invited = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setShowInvited($var) + { + GPBUtil::checkBool($var); + $this->show_invited = $var; + + return $this; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires either the `chat.admin.memberships.readonly` or + * `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Listing app memberships in a space isn't supported when using admin access. + * + * Generated from protobuf field bool use_admin_access = 8; + * @return bool + */ + public function getUseAdminAccess() + { + return $this->use_admin_access; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires either the `chat.admin.memberships.readonly` or + * `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Listing app memberships in a space isn't supported when using admin access. + * + * Generated from protobuf field bool use_admin_access = 8; + * @param bool $var + * @return $this + */ + public function setUseAdminAccess($var) + { + GPBUtil::checkBool($var); + $this->use_admin_access = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsResponse.php new file mode 100644 index 000000000000..683786ade983 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsResponse.php @@ -0,0 +1,105 @@ +google.chat.v1.ListMembershipsResponse + */ +class ListMembershipsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Unordered list. List of memberships in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 1 [(.google.api.field_behavior) = UNORDERED_LIST]; + */ + private $memberships; + /** + * A token that you can send as `pageToken` to retrieve the next page of + * results. If empty, 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 array<\Google\Apps\Chat\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $memberships + * Unordered list. List of memberships in the requested (or first) page. + * @type string $next_page_token + * A token that you can send as `pageToken` to retrieve the next page of + * results. If empty, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Unordered list. List of memberships in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 1 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMemberships() + { + return $this->memberships; + } + + /** + * Unordered list. List of memberships in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 1 [(.google.api.field_behavior) = UNORDERED_LIST]; + * @param array<\Google\Apps\Chat\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMemberships($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Membership::class); + $this->memberships = $arr; + + return $this; + } + + /** + * A token that you can send as `pageToken` to retrieve the next page of + * results. If empty, 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 that you can send as `pageToken` to retrieve the next page of + * results. If empty, 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesRequest.php new file mode 100644 index 000000000000..ab83af2f4080 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesRequest.php @@ -0,0 +1,421 @@ +google.chat.v1.ListMessagesRequest + */ +class ListMessagesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The resource name of the space to list messages from. + * Format: `spaces/{space}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * The maximum number of messages returned. The service might return fewer + * messages than this value. + * If unspecified, at most 25 are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Optional, if resuming from a previous query. + * A page token received from a previous list messages call. Provide this + * parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * A query filter. + * You can filter messages by date (`create_time`) and thread (`thread.name`). + * To filter messages by the date they were created, specify the `create_time` + * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) + * format and double quotation marks. For example, + * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to + * list messages that were created after a timestamp, or the less than + * operator `<` to list messages that were created before a timestamp. To + * filter messages within a time interval, use the `AND` operator between two + * timestamps. + * To filter by thread, specify the `thread.name`, formatted as + * `spaces/{space}/threads/{thread}`. You can only specify one + * `thread.name` per query. + * To filter by both thread and date, use the `AND` operator in your query. + * For example, the following queries are valid: + * ``` + * create_time > "2012-04-21T11:30:00-04:00" + * create_time > "2012-04-21T11:30:00-04:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * create_time > "2012-04-21T11:30:00+00:00" AND + * create_time < "2013-01-01T00:00:00+00:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 4; + */ + protected $filter = ''; + /** + * Optional, if resuming from a previous query. + * How the list of messages is ordered. Specify a value to order by an + * ordering operation. Valid ordering operation values are as follows: + * - `ASC` for ascending. + * - `DESC` for descending. + * The default ordering is `create_time ASC`. + * + * Generated from protobuf field string order_by = 5; + */ + protected $order_by = ''; + /** + * Whether to include deleted messages. Deleted messages include deleted time + * and metadata about their deletion, but message content is unavailable. + * + * Generated from protobuf field bool show_deleted = 6; + */ + protected $show_deleted = false; + + /** + * @param string $parent Required. The resource name of the space to list messages from. + * + * Format: `spaces/{space}` + * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\ListMessagesRequest + * + * @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 space to list messages from. + * Format: `spaces/{space}` + * @type int $page_size + * The maximum number of messages returned. The service might return fewer + * messages than this value. + * If unspecified, at most 25 are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * @type string $page_token + * Optional, if resuming from a previous query. + * A page token received from a previous list messages call. Provide this + * parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * @type string $filter + * A query filter. + * You can filter messages by date (`create_time`) and thread (`thread.name`). + * To filter messages by the date they were created, specify the `create_time` + * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) + * format and double quotation marks. For example, + * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to + * list messages that were created after a timestamp, or the less than + * operator `<` to list messages that were created before a timestamp. To + * filter messages within a time interval, use the `AND` operator between two + * timestamps. + * To filter by thread, specify the `thread.name`, formatted as + * `spaces/{space}/threads/{thread}`. You can only specify one + * `thread.name` per query. + * To filter by both thread and date, use the `AND` operator in your query. + * For example, the following queries are valid: + * ``` + * create_time > "2012-04-21T11:30:00-04:00" + * create_time > "2012-04-21T11:30:00-04:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * create_time > "2012-04-21T11:30:00+00:00" AND + * create_time < "2013-01-01T00:00:00+00:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * @type string $order_by + * Optional, if resuming from a previous query. + * How the list of messages is ordered. Specify a value to order by an + * ordering operation. Valid ordering operation values are as follows: + * - `ASC` for ascending. + * - `DESC` for descending. + * The default ordering is `create_time ASC`. + * @type bool $show_deleted + * Whether to include deleted messages. Deleted messages include deleted time + * and metadata about their deletion, but message content is unavailable. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Required. The resource name of the space to list messages from. + * Format: `spaces/{space}` + * + * 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 space to list messages from. + * Format: `spaces/{space}` + * + * 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 messages returned. The service might return fewer + * messages than this value. + * If unspecified, at most 25 are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of messages returned. The service might return fewer + * messages than this value. + * If unspecified, at most 25 are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * 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; + } + + /** + * Optional, if resuming from a previous query. + * A page token received from a previous list messages call. Provide this + * parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional, if resuming from a previous query. + * A page token received from a previous list messages call. Provide this + * parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * 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; + } + + /** + * A query filter. + * You can filter messages by date (`create_time`) and thread (`thread.name`). + * To filter messages by the date they were created, specify the `create_time` + * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) + * format and double quotation marks. For example, + * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to + * list messages that were created after a timestamp, or the less than + * operator `<` to list messages that were created before a timestamp. To + * filter messages within a time interval, use the `AND` operator between two + * timestamps. + * To filter by thread, specify the `thread.name`, formatted as + * `spaces/{space}/threads/{thread}`. You can only specify one + * `thread.name` per query. + * To filter by both thread and date, use the `AND` operator in your query. + * For example, the following queries are valid: + * ``` + * create_time > "2012-04-21T11:30:00-04:00" + * create_time > "2012-04-21T11:30:00-04:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * create_time > "2012-04-21T11:30:00+00:00" AND + * create_time < "2013-01-01T00:00:00+00:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 4; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * A query filter. + * You can filter messages by date (`create_time`) and thread (`thread.name`). + * To filter messages by the date they were created, specify the `create_time` + * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) + * format and double quotation marks. For example, + * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to + * list messages that were created after a timestamp, or the less than + * operator `<` to list messages that were created before a timestamp. To + * filter messages within a time interval, use the `AND` operator between two + * timestamps. + * To filter by thread, specify the `thread.name`, formatted as + * `spaces/{space}/threads/{thread}`. You can only specify one + * `thread.name` per query. + * To filter by both thread and date, use the `AND` operator in your query. + * For example, the following queries are valid: + * ``` + * create_time > "2012-04-21T11:30:00-04:00" + * create_time > "2012-04-21T11:30:00-04:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * create_time > "2012-04-21T11:30:00+00:00" AND + * create_time < "2013-01-01T00:00:00+00:00" AND + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * thread.name = spaces/AAAAAAAAAAA/threads/123 + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 4; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + + /** + * Optional, if resuming from a previous query. + * How the list of messages is ordered. Specify a value to order by an + * ordering operation. Valid ordering operation values are as follows: + * - `ASC` for ascending. + * - `DESC` for descending. + * The default ordering is `create_time ASC`. + * + * Generated from protobuf field string order_by = 5; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional, if resuming from a previous query. + * How the list of messages is ordered. Specify a value to order by an + * ordering operation. Valid ordering operation values are as follows: + * - `ASC` for ascending. + * - `DESC` for descending. + * The default ordering is `create_time ASC`. + * + * Generated from protobuf field string order_by = 5; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + + /** + * Whether to include deleted messages. Deleted messages include deleted time + * and metadata about their deletion, but message content is unavailable. + * + * Generated from protobuf field bool show_deleted = 6; + * @return bool + */ + public function getShowDeleted() + { + return $this->show_deleted; + } + + /** + * Whether to include deleted messages. Deleted messages include deleted time + * and metadata about their deletion, but message content is unavailable. + * + * Generated from protobuf field bool show_deleted = 6; + * @param bool $var + * @return $this + */ + public function setShowDeleted($var) + { + GPBUtil::checkBool($var); + $this->show_deleted = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesResponse.php new file mode 100644 index 000000000000..2b34fab21efd --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesResponse.php @@ -0,0 +1,105 @@ +google.chat.v1.ListMessagesResponse + */ +class ListMessagesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of messages. + * + * Generated from protobuf field repeated .google.chat.v1.Message messages = 1; + */ + private $messages; + /** + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, 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 array<\Google\Apps\Chat\V1\Message>|\Google\Protobuf\Internal\RepeatedField $messages + * List of messages. + * @type string $next_page_token + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * List of messages. + * + * Generated from protobuf field repeated .google.chat.v1.Message messages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * List of messages. + * + * Generated from protobuf field repeated .google.chat.v1.Message messages = 1; + * @param array<\Google\Apps\Chat\V1\Message>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Message::class); + $this->messages = $arr; + + return $this; + } + + /** + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsRequest.php new file mode 100644 index 000000000000..57ee4da7a254 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsRequest.php @@ -0,0 +1,349 @@ +google.chat.v1.ListReactionsRequest + */ +class ListReactionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The message users reacted to. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of reactions returned. The service can return + * fewer reactions than this value. If unspecified, the default value is 25. + * The maximum value is 200; values above 200 are changed to 200. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. (If resuming from a previous query.) + * A page token received from a previous list reactions call. Provide this + * to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A query filter. + * You can filter reactions by + * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) + * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * (`user.name`). + * To filter reactions for multiple emojis or users, join similar fields + * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = + * "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. + * To filter reactions by emoji and user, use the `AND` operator, such as + * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. + * If your query uses both `AND` and `OR`, group them with parentheses. + * For example, the following queries are valid: + * ``` + * user.name = "users/{user}" + * emoji.unicode = "🙂" + * emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR emoji.unicode = "👍" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" AND user.name = "users/{user}" + * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") + * AND user.name = "users/{user}" + * ``` + * The following queries are invalid: + * ``` + * emoji.unicode = "🙂" AND emoji.unicode = "👍" + * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR + * user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * AND user.name = "users/{user}" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. The message users reacted to. + * + * Format: `spaces/{space}/messages/{message}` + * Please see {@see ChatServiceClient::messageName()} for help formatting this field. + * + * @return \Google\Apps\Chat\V1\ListReactionsRequest + * + * @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 message users reacted to. + * Format: `spaces/{space}/messages/{message}` + * @type int $page_size + * Optional. The maximum number of reactions returned. The service can return + * fewer reactions than this value. If unspecified, the default value is 25. + * The maximum value is 200; values above 200 are changed to 200. + * @type string $page_token + * Optional. (If resuming from a previous query.) + * A page token received from a previous list reactions call. Provide this + * to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value might lead to unexpected results. + * @type string $filter + * Optional. A query filter. + * You can filter reactions by + * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) + * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * (`user.name`). + * To filter reactions for multiple emojis or users, join similar fields + * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = + * "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. + * To filter reactions by emoji and user, use the `AND` operator, such as + * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. + * If your query uses both `AND` and `OR`, group them with parentheses. + * For example, the following queries are valid: + * ``` + * user.name = "users/{user}" + * emoji.unicode = "🙂" + * emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR emoji.unicode = "👍" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" AND user.name = "users/{user}" + * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") + * AND user.name = "users/{user}" + * ``` + * The following queries are invalid: + * ``` + * emoji.unicode = "🙂" AND emoji.unicode = "👍" + * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR + * user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * AND user.name = "users/{user}" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * Required. The message users reacted to. + * Format: `spaces/{space}/messages/{message}` + * + * 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 message users reacted to. + * Format: `spaces/{space}/messages/{message}` + * + * 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. The maximum number of reactions returned. The service can return + * fewer reactions than this value. If unspecified, the default value is 25. + * The maximum value is 200; values above 200 are changed to 200. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of reactions returned. The service can return + * fewer reactions than this value. If unspecified, the default value is 25. + * The maximum value is 200; values above 200 are changed to 200. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * Optional. (If resuming from a previous query.) + * A page token received from a previous list reactions call. Provide this + * to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. (If resuming from a previous query.) + * A page token received from a previous list reactions call. Provide this + * to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A query filter. + * You can filter reactions by + * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) + * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * (`user.name`). + * To filter reactions for multiple emojis or users, join similar fields + * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = + * "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. + * To filter reactions by emoji and user, use the `AND` operator, such as + * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. + * If your query uses both `AND` and `OR`, group them with parentheses. + * For example, the following queries are valid: + * ``` + * user.name = "users/{user}" + * emoji.unicode = "🙂" + * emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR emoji.unicode = "👍" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" AND user.name = "users/{user}" + * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") + * AND user.name = "users/{user}" + * ``` + * The following queries are invalid: + * ``` + * emoji.unicode = "🙂" AND emoji.unicode = "👍" + * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR + * user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * AND user.name = "users/{user}" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A query filter. + * You can filter reactions by + * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) + * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * (`user.name`). + * To filter reactions for multiple emojis or users, join similar fields + * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = + * "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. + * To filter reactions by emoji and user, use the `AND` operator, such as + * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. + * If your query uses both `AND` and `OR`, group them with parentheses. + * For example, the following queries are valid: + * ``` + * user.name = "users/{user}" + * emoji.unicode = "🙂" + * emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR emoji.unicode = "👍" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" AND user.name = "users/{user}" + * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") + * AND user.name = "users/{user}" + * ``` + * The following queries are invalid: + * ``` + * emoji.unicode = "🙂" AND emoji.unicode = "👍" + * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" + * emoji.unicode = "🙂" OR user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR + * user.name = "users/{user}" + * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" + * AND user.name = "users/{user}" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsResponse.php new file mode 100644 index 000000000000..429f5e5b5565 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsResponse.php @@ -0,0 +1,105 @@ +google.chat.v1.ListReactionsResponse + */ +class ListReactionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of reactions in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Reaction reactions = 1; + */ + private $reactions; + /** + * Continuation token to retrieve the next page of results. It's empty + * for the last page of results. + * + * 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 array<\Google\Apps\Chat\V1\Reaction>|\Google\Protobuf\Internal\RepeatedField $reactions + * List of reactions in the requested (or first) page. + * @type string $next_page_token + * Continuation token to retrieve the next page of results. It's empty + * for the last page of results. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * List of reactions in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Reaction reactions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReactions() + { + return $this->reactions; + } + + /** + * List of reactions in the requested (or first) page. + * + * Generated from protobuf field repeated .google.chat.v1.Reaction reactions = 1; + * @param array<\Google\Apps\Chat\V1\Reaction>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReactions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Reaction::class); + $this->reactions = $arr; + + return $this; + } + + /** + * Continuation token to retrieve the next page of results. It's empty + * for the last page of results. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Continuation token to retrieve the next page of results. It's empty + * for the last page of results. + * + * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsRequest.php new file mode 100644 index 000000000000..d4cf55391b8b --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsRequest.php @@ -0,0 +1,444 @@ +google.chat.v1.ListSpaceEventsRequest + */ +class ListSpaceEventsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the [Google Chat + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * where the events occurred. + * Format: `spaces/{space}`. + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. The maximum number of space events returned. The service might + * return fewer than this value. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 5; + */ + protected $page_size = 0; + /** + * A page token, received from a previous list space events call. Provide this + * to retrieve the subsequent page. + * When paginating, all other parameters provided to list space events must + * match the call that provided the page token. Passing different values to + * the other parameters might lead to unexpected results. + * + * Generated from protobuf field string page_token = 6; + */ + protected $page_token = ''; + /** + * Required. A query filter. + * You must specify at least one event type (`event_type`) + * using the has `:` operator. To filter by multiple event types, use the `OR` + * operator. Omit batch event types in your filter. The request automatically + * returns any related batch events. For example, if you filter by new + * reactions + * (`google.workspace.chat.reaction.v1.created`), the server also returns + * batch new reactions events + * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported + * event types, see the [`SpaceEvents` reference + * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). + * Optionally, you can also filter by start time (`start_time`) and + * end time (`end_time`): + * * `start_time`: Exclusive timestamp from which to start listing space + * events. + * You can list events that occurred up to 28 days ago. If unspecified, lists + * space events from the past 28 days. + * * `end_time`: Inclusive timestamp until which space events are listed. + * If unspecified, lists events up to the time of the request. + * To specify a start or end time, use the equals `=` operator and format in + * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both + * `start_time` and `end_time`, use the `AND` operator. + * For example, the following queries are valid: + * ``` + * start_time="2023-08-23T19:20:33+00:00" AND + * end_time="2023-08-23T19:21:54+00:00" + * ``` + * ``` + * start_time="2023-08-23T19:20:33+00:00" AND + * (event_types:"google.workspace.chat.space.v1.updated" OR + * event_types:"google.workspace.chat.message.v1.created") + * ``` + * The following queries are invalid: + * ``` + * start_time="2023-08-23T19:20:33+00:00" OR + * end_time="2023-08-23T19:21:54+00:00" + * ``` + * ``` + * event_types:"google.workspace.chat.space.v1.updated" AND + * event_types:"google.workspace.chat.message.v1.created" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 8 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Resource name of the [Google Chat + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * where the events occurred. + * + * Format: `spaces/{space}`. Please see + * {@see ChatServiceClient::spaceName()} for help formatting this field. + * @param string $filter Required. A query filter. + * + * You must specify at least one event type (`event_type`) + * using the has `:` operator. To filter by multiple event types, use the `OR` + * operator. Omit batch event types in your filter. The request automatically + * returns any related batch events. For example, if you filter by new + * reactions + * (`google.workspace.chat.reaction.v1.created`), the server also returns + * batch new reactions events + * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported + * event types, see the [`SpaceEvents` reference + * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). + * + * Optionally, you can also filter by start time (`start_time`) and + * end time (`end_time`): + * + * * `start_time`: Exclusive timestamp from which to start listing space + * events. + * You can list events that occurred up to 28 days ago. If unspecified, lists + * space events from the past 28 days. + * * `end_time`: Inclusive timestamp until which space events are listed. + * If unspecified, lists events up to the time of the request. + * + * To specify a start or end time, use the equals `=` operator and format in + * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both + * `start_time` and `end_time`, use the `AND` operator. + * + * For example, the following queries are valid: + * + * ``` + * start_time="2023-08-23T19:20:33+00:00" AND + * end_time="2023-08-23T19:21:54+00:00" + * ``` + * ``` + * start_time="2023-08-23T19:20:33+00:00" AND + * (event_types:"google.workspace.chat.space.v1.updated" OR + * event_types:"google.workspace.chat.message.v1.created") + * ``` + * + * The following queries are invalid: + * + * ``` + * start_time="2023-08-23T19:20:33+00:00" OR + * end_time="2023-08-23T19:21:54+00:00" + * ``` + * ``` + * event_types:"google.workspace.chat.space.v1.updated" AND + * event_types:"google.workspace.chat.message.v1.created" + * ``` + * + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * @return \Google\Apps\Chat\V1\ListSpaceEventsRequest + * + * @experimental + */ + public static function build(string $parent, string $filter): self + { + return (new self()) + ->setParent($parent) + ->setFilter($filter); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the [Google Chat + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * where the events occurred. + * Format: `spaces/{space}`. + * @type int $page_size + * Optional. The maximum number of space events returned. The service might + * return fewer than this value. + * Negative values return an `INVALID_ARGUMENT` error. + * @type string $page_token + * A page token, received from a previous list space events call. Provide this + * to retrieve the subsequent page. + * When paginating, all other parameters provided to list space events must + * match the call that provided the page token. Passing different values to + * the other parameters might lead to unexpected results. + * @type string $filter + * Required. A query filter. + * You must specify at least one event type (`event_type`) + * using the has `:` operator. To filter by multiple event types, use the `OR` + * operator. Omit batch event types in your filter. The request automatically + * returns any related batch events. For example, if you filter by new + * reactions + * (`google.workspace.chat.reaction.v1.created`), the server also returns + * batch new reactions events + * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported + * event types, see the [`SpaceEvents` reference + * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). + * Optionally, you can also filter by start time (`start_time`) and + * end time (`end_time`): + * * `start_time`: Exclusive timestamp from which to start listing space + * events. + * You can list events that occurred up to 28 days ago. If unspecified, lists + * space events from the past 28 days. + * * `end_time`: Inclusive timestamp until which space events are listed. + * If unspecified, lists events up to the time of the request. + * To specify a start or end time, use the equals `=` operator and format in + * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both + * `start_time` and `end_time`, use the `AND` operator. + * For example, the following queries are valid: + * ``` + * start_time="2023-08-23T19:20:33+00:00" AND + * end_time="2023-08-23T19:21:54+00:00" + * ``` + * ``` + * start_time="2023-08-23T19:20:33+00:00" AND + * (event_types:"google.workspace.chat.space.v1.updated" OR + * event_types:"google.workspace.chat.message.v1.created") + * ``` + * The following queries are invalid: + * ``` + * start_time="2023-08-23T19:20:33+00:00" OR + * end_time="2023-08-23T19:21:54+00:00" + * ``` + * ``` + * event_types:"google.workspace.chat.space.v1.updated" AND + * event_types:"google.workspace.chat.message.v1.created" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceEvent::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the [Google Chat + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * where the events occurred. + * Format: `spaces/{space}`. + * + * 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. Resource name of the [Google Chat + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * where the events occurred. + * Format: `spaces/{space}`. + * + * 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. The maximum number of space events returned. The service might + * return fewer than this value. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 5; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of space events returned. The service might + * return fewer than this value. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 5; + * @param int $var + * @return $this + */ + public function setPageSize($var) + { + GPBUtil::checkInt32($var); + $this->page_size = $var; + + return $this; + } + + /** + * A page token, received from a previous list space events call. Provide this + * to retrieve the subsequent page. + * When paginating, all other parameters provided to list space events must + * match the call that provided the page token. Passing different values to + * the other parameters might lead to unexpected results. + * + * Generated from protobuf field string page_token = 6; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A page token, received from a previous list space events call. Provide this + * to retrieve the subsequent page. + * When paginating, all other parameters provided to list space events must + * match the call that provided the page token. Passing different values to + * the other parameters might lead to unexpected results. + * + * Generated from protobuf field string page_token = 6; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Required. A query filter. + * You must specify at least one event type (`event_type`) + * using the has `:` operator. To filter by multiple event types, use the `OR` + * operator. Omit batch event types in your filter. The request automatically + * returns any related batch events. For example, if you filter by new + * reactions + * (`google.workspace.chat.reaction.v1.created`), the server also returns + * batch new reactions events + * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported + * event types, see the [`SpaceEvents` reference + * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). + * Optionally, you can also filter by start time (`start_time`) and + * end time (`end_time`): + * * `start_time`: Exclusive timestamp from which to start listing space + * events. + * You can list events that occurred up to 28 days ago. If unspecified, lists + * space events from the past 28 days. + * * `end_time`: Inclusive timestamp until which space events are listed. + * If unspecified, lists events up to the time of the request. + * To specify a start or end time, use the equals `=` operator and format in + * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both + * `start_time` and `end_time`, use the `AND` operator. + * For example, the following queries are valid: + * ``` + * start_time="2023-08-23T19:20:33+00:00" AND + * end_time="2023-08-23T19:21:54+00:00" + * ``` + * ``` + * start_time="2023-08-23T19:20:33+00:00" AND + * (event_types:"google.workspace.chat.space.v1.updated" OR + * event_types:"google.workspace.chat.message.v1.created") + * ``` + * The following queries are invalid: + * ``` + * start_time="2023-08-23T19:20:33+00:00" OR + * end_time="2023-08-23T19:21:54+00:00" + * ``` + * ``` + * event_types:"google.workspace.chat.space.v1.updated" AND + * event_types:"google.workspace.chat.message.v1.created" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 8 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Required. A query filter. + * You must specify at least one event type (`event_type`) + * using the has `:` operator. To filter by multiple event types, use the `OR` + * operator. Omit batch event types in your filter. The request automatically + * returns any related batch events. For example, if you filter by new + * reactions + * (`google.workspace.chat.reaction.v1.created`), the server also returns + * batch new reactions events + * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported + * event types, see the [`SpaceEvents` reference + * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). + * Optionally, you can also filter by start time (`start_time`) and + * end time (`end_time`): + * * `start_time`: Exclusive timestamp from which to start listing space + * events. + * You can list events that occurred up to 28 days ago. If unspecified, lists + * space events from the past 28 days. + * * `end_time`: Inclusive timestamp until which space events are listed. + * If unspecified, lists events up to the time of the request. + * To specify a start or end time, use the equals `=` operator and format in + * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both + * `start_time` and `end_time`, use the `AND` operator. + * For example, the following queries are valid: + * ``` + * start_time="2023-08-23T19:20:33+00:00" AND + * end_time="2023-08-23T19:21:54+00:00" + * ``` + * ``` + * start_time="2023-08-23T19:20:33+00:00" AND + * (event_types:"google.workspace.chat.space.v1.updated" OR + * event_types:"google.workspace.chat.message.v1.created") + * ``` + * The following queries are invalid: + * ``` + * start_time="2023-08-23T19:20:33+00:00" OR + * end_time="2023-08-23T19:21:54+00:00" + * ``` + * ``` + * event_types:"google.workspace.chat.space.v1.updated" AND + * event_types:"google.workspace.chat.message.v1.created" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 8 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsResponse.php new file mode 100644 index 000000000000..9ed151c8bdda --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsResponse.php @@ -0,0 +1,113 @@ +google.chat.v1.ListSpaceEventsResponse + */ +class ListSpaceEventsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Results are returned in chronological order (oldest event first). + * Note: The `permissionSettings` field is not returned in the Space + * object for list requests. + * + * Generated from protobuf field repeated .google.chat.v1.SpaceEvent space_events = 1; + */ + private $space_events; + /** + * Continuation token used to fetch more events. + * 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 array<\Google\Apps\Chat\V1\SpaceEvent>|\Google\Protobuf\Internal\RepeatedField $space_events + * Results are returned in chronological order (oldest event first). + * Note: The `permissionSettings` field is not returned in the Space + * object for list requests. + * @type string $next_page_token + * Continuation token used to fetch more events. + * If this field is omitted, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceEvent::initOnce(); + parent::__construct($data); + } + + /** + * Results are returned in chronological order (oldest event first). + * Note: The `permissionSettings` field is not returned in the Space + * object for list requests. + * + * Generated from protobuf field repeated .google.chat.v1.SpaceEvent space_events = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpaceEvents() + { + return $this->space_events; + } + + /** + * Results are returned in chronological order (oldest event first). + * Note: The `permissionSettings` field is not returned in the Space + * object for list requests. + * + * Generated from protobuf field repeated .google.chat.v1.SpaceEvent space_events = 1; + * @param array<\Google\Apps\Chat\V1\SpaceEvent>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpaceEvents($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\SpaceEvent::class); + $this->space_events = $arr; + + return $this; + } + + /** + * Continuation token used to fetch more events. + * 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; + } + + /** + * Continuation token used to fetch more events. + * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesRequest.php new file mode 100644 index 000000000000..b1764b3e4d93 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesRequest.php @@ -0,0 +1,219 @@ +google.chat.v1.ListSpacesRequest + */ +class ListSpacesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. The maximum number of spaces to return. The service might return + * fewer than this value. + * If unspecified, at most 100 spaces are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. A page token, received from a previous list spaces call. + * Provide this parameter to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value may lead to unexpected results. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. A query filter. + * You can filter spaces by the space type + * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). + * To filter by space type, you must specify valid enum value, such as + * `SPACE` or `GROUP_CHAT` (the `space_type` can't be + * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` + * operator. + * For example, the following queries are valid: + * ``` + * space_type = "SPACE" + * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $page_size + * Optional. The maximum number of spaces to return. The service might return + * fewer than this value. + * If unspecified, at most 100 spaces are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * @type string $page_token + * Optional. A page token, received from a previous list spaces call. + * Provide this parameter to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value may lead to unexpected results. + * @type string $filter + * Optional. A query filter. + * You can filter spaces by the space type + * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). + * To filter by space type, you must specify valid enum value, such as + * `SPACE` or `GROUP_CHAT` (the `space_type` can't be + * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` + * operator. + * For example, the following queries are valid: + * ``` + * space_type = "SPACE" + * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Optional. The maximum number of spaces to return. The service might return + * fewer than this value. + * If unspecified, at most 100 spaces are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. The maximum number of spaces to return. The service might return + * fewer than this value. + * If unspecified, at most 100 spaces are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * Negative values return an `INVALID_ARGUMENT` error. + * + * Generated from protobuf field int32 page_size = 1 [(.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 page token, received from a previous list spaces call. + * Provide this parameter to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value may lead to unexpected results. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. A page token, received from a previous list spaces call. + * Provide this parameter to retrieve the subsequent page. + * When paginating, the filter value should match the call that provided the + * page token. Passing a different value may lead to unexpected results. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. A query filter. + * You can filter spaces by the space type + * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). + * To filter by space type, you must specify valid enum value, such as + * `SPACE` or `GROUP_CHAT` (the `space_type` can't be + * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` + * operator. + * For example, the following queries are valid: + * ``` + * space_type = "SPACE" + * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. A query filter. + * You can filter spaces by the space type + * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). + * To filter by space type, you must specify valid enum value, such as + * `SPACE` or `GROUP_CHAT` (the `space_type` can't be + * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` + * operator. + * For example, the following queries are valid: + * ``` + * space_type = "SPACE" + * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" + * ``` + * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` + * error. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setFilter($var) + { + GPBUtil::checkString($var, True); + $this->filter = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesResponse.php new file mode 100644 index 000000000000..866249c6ff30 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesResponse.php @@ -0,0 +1,113 @@ +google.chat.v1.ListSpacesResponse + */ +class ListSpacesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of spaces in the requested (or first) page. + * Note: The `permissionSettings` field is not returned in the Space + * object for list requests. + * + * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; + */ + private $spaces; + /** + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, 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 array<\Google\Apps\Chat\V1\Space>|\Google\Protobuf\Internal\RepeatedField $spaces + * List of spaces in the requested (or first) page. + * Note: The `permissionSettings` field is not returned in the Space + * object for list requests. + * @type string $next_page_token + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, there are no subsequent pages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * List of spaces in the requested (or first) page. + * Note: The `permissionSettings` field is not returned in the Space + * object for list requests. + * + * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpaces() + { + return $this->spaces; + } + + /** + * List of spaces in the requested (or first) page. + * Note: The `permissionSettings` field is not returned in the Space + * object for list requests. + * + * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; + * @param array<\Google\Apps\Chat\V1\Space>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Space::class); + $this->spaces = $arr; + + return $this; + } + + /** + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * You can send a token as `pageToken` to retrieve the next page of + * results. If empty, 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MatchedUrl.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MatchedUrl.php new file mode 100644 index 000000000000..2500f22c05fc --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MatchedUrl.php @@ -0,0 +1,69 @@ +google.chat.v1.MatchedUrl + */ +class MatchedUrl extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The URL that was matched. + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * Output only. The URL that was matched. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\MatchedUrl::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The URL that was matched. + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * Output only. The URL that was matched. + * + * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership.php new file mode 100644 index 000000000000..f62c182830dc --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership.php @@ -0,0 +1,342 @@ +google.chat.v1.Membership + */ +class Membership extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the membership, assigned by the server. + * Format: `spaces/{space}/members/{member}` + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. State of the membership. + * + * Generated from protobuf field .google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Optional. User's role within a Chat space, which determines their permitted + * actions in the space. + * This field can only be used as input in `UpdateMembership`. + * + * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $role = 0; + /** + * Optional. Immutable. The creation time of the membership, such as when a + * member joined or was invited to join a space. This field is output only, + * except when used to import historical memberships in import mode spaces. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $create_time = null; + /** + * Optional. Immutable. The deletion time of the membership, such as when a + * member left or was removed from a space. This field is output only, except + * when used to import historical memberships in import mode spaces. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $delete_time = null; + protected $memberType; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the membership, assigned by the server. + * Format: `spaces/{space}/members/{member}` + * @type int $state + * Output only. State of the membership. + * @type int $role + * Optional. User's role within a Chat space, which determines their permitted + * actions in the space. + * This field can only be used as input in `UpdateMembership`. + * @type \Google\Apps\Chat\V1\User $member + * The Google Chat user or app the membership corresponds to. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * @type \Google\Apps\Chat\V1\Group $group_member + * The Google Group the membership corresponds to. + * @type \Google\Protobuf\Timestamp $create_time + * Optional. Immutable. The creation time of the membership, such as when a + * member joined or was invited to join a space. This field is output only, + * except when used to import historical memberships in import mode spaces. + * @type \Google\Protobuf\Timestamp $delete_time + * Optional. Immutable. The deletion time of the membership, such as when a + * member left or was removed from a space. This field is output only, except + * when used to import historical memberships in import mode spaces. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the membership, assigned by the server. + * Format: `spaces/{space}/members/{member}` + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the membership, assigned by the server. + * Format: `spaces/{space}/members/{member}` + * + * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. State of the membership. + * + * Generated from protobuf field .google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. State of the membership. + * + * Generated from protobuf field .google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Membership\MembershipState::class); + $this->state = $var; + + return $this; + } + + /** + * Optional. User's role within a Chat space, which determines their permitted + * actions in the space. + * This field can only be used as input in `UpdateMembership`. + * + * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getRole() + { + return $this->role; + } + + /** + * Optional. User's role within a Chat space, which determines their permitted + * actions in the space. + * This field can only be used as input in `UpdateMembership`. + * + * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setRole($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Membership\MembershipRole::class); + $this->role = $var; + + return $this; + } + + /** + * The Google Chat user or app the membership corresponds to. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * + * Generated from protobuf field .google.chat.v1.User member = 3; + * @return \Google\Apps\Chat\V1\User|null + */ + public function getMember() + { + return $this->readOneof(3); + } + + public function hasMember() + { + return $this->hasOneof(3); + } + + /** + * The Google Chat user or app the membership corresponds to. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * + * Generated from protobuf field .google.chat.v1.User member = 3; + * @param \Google\Apps\Chat\V1\User $var + * @return $this + */ + public function setMember($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The Google Group the membership corresponds to. + * + * Generated from protobuf field .google.chat.v1.Group group_member = 5; + * @return \Google\Apps\Chat\V1\Group|null + */ + public function getGroupMember() + { + return $this->readOneof(5); + } + + public function hasGroupMember() + { + return $this->hasOneof(5); + } + + /** + * The Google Group the membership corresponds to. + * + * Generated from protobuf field .google.chat.v1.Group group_member = 5; + * @param \Google\Apps\Chat\V1\Group $var + * @return $this + */ + public function setGroupMember($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Group::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * Optional. Immutable. The creation time of the membership, such as when a + * member joined or was invited to join a space. This field is output only, + * except when used to import historical memberships in import mode spaces. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Immutable. The creation time of the membership, such as when a + * member joined or was invited to join a space. This field is output only, + * except when used to import historical memberships in import mode spaces. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setCreateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->create_time = $var; + + return $this; + } + + /** + * Optional. Immutable. The deletion time of the membership, such as when a + * member left or was removed from a space. This field is output only, except + * when used to import historical memberships in import mode spaces. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Immutable. The deletion time of the membership, such as when a + * member left or was removed from a space. This field is output only, except + * when used to import historical memberships in import mode spaces. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setDeleteTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->delete_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getMemberType() + { + return $this->whichOneof("memberType"); + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipRole.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipRole.php new file mode 100644 index 000000000000..ca249bb5f6a2 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipRole.php @@ -0,0 +1,73 @@ +google.chat.v1.Membership.MembershipRole + */ +class MembershipRole +{ + /** + * Default value. For [users][google.chat.v1.Membership.member]: they + * aren't a member of the space, but can be invited. For + * [Google Groups][google.chat.v1.Membership.group_member]: they're always + * assigned this role (other enum values might be used in the future). + * + * Generated from protobuf enum MEMBERSHIP_ROLE_UNSPECIFIED = 0; + */ + const MEMBERSHIP_ROLE_UNSPECIFIED = 0; + /** + * A member of the space. The user has basic permissions, like sending + * messages to the space. In 1:1 and unnamed group conversations, everyone + * has this role. + * + * Generated from protobuf enum ROLE_MEMBER = 1; + */ + const ROLE_MEMBER = 1; + /** + * A space manager. The user has all basic permissions plus administrative + * permissions that let them manage the space, like adding or removing + * members. Only supported in + * [SpaceType.SPACE][google.chat.v1.Space.SpaceType]. + * + * Generated from protobuf enum ROLE_MANAGER = 2; + */ + const ROLE_MANAGER = 2; + + private static $valueToName = [ + self::MEMBERSHIP_ROLE_UNSPECIFIED => 'MEMBERSHIP_ROLE_UNSPECIFIED', + self::ROLE_MEMBER => 'ROLE_MEMBER', + self::ROLE_MANAGER => 'ROLE_MANAGER', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MembershipRole::class, \Google\Apps\Chat\V1\Membership_MembershipRole::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipState.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipState.php new file mode 100644 index 000000000000..bf40d277a30c --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipState.php @@ -0,0 +1,73 @@ +google.chat.v1.Membership.MembershipState + */ +class MembershipState +{ + /** + * Default value. Don't use. + * + * Generated from protobuf enum MEMBERSHIP_STATE_UNSPECIFIED = 0; + */ + const MEMBERSHIP_STATE_UNSPECIFIED = 0; + /** + * The user is added to the space, and can participate in the space. + * + * Generated from protobuf enum JOINED = 1; + */ + const JOINED = 1; + /** + * The user is invited to join the space, but hasn't joined it. + * + * Generated from protobuf enum INVITED = 2; + */ + const INVITED = 2; + /** + * The user doesn't belong to the space and doesn't have a pending + * invitation to join the space. + * + * Generated from protobuf enum NOT_A_MEMBER = 3; + */ + const NOT_A_MEMBER = 3; + + private static $valueToName = [ + self::MEMBERSHIP_STATE_UNSPECIFIED => 'MEMBERSHIP_STATE_UNSPECIFIED', + self::JOINED => 'JOINED', + self::INVITED => 'INVITED', + self::NOT_A_MEMBER => 'NOT_A_MEMBER', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MembershipState::class, \Google\Apps\Chat\V1\Membership_MembershipState::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchCreatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchCreatedEventData.php new file mode 100644 index 000000000000..699e47e35da3 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchCreatedEventData.php @@ -0,0 +1,68 @@ +google.chat.v1.MembershipBatchCreatedEventData + */ +class MembershipBatchCreatedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * A list of new memberships. + * + * Generated from protobuf field repeated .google.chat.v1.MembershipCreatedEventData memberships = 1; + */ + private $memberships; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Chat\V1\MembershipCreatedEventData>|\Google\Protobuf\Internal\RepeatedField $memberships + * A list of new memberships. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * A list of new memberships. + * + * Generated from protobuf field repeated .google.chat.v1.MembershipCreatedEventData memberships = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMemberships() + { + return $this->memberships; + } + + /** + * A list of new memberships. + * + * Generated from protobuf field repeated .google.chat.v1.MembershipCreatedEventData memberships = 1; + * @param array<\Google\Apps\Chat\V1\MembershipCreatedEventData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMemberships($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\MembershipCreatedEventData::class); + $this->memberships = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchDeletedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchDeletedEventData.php new file mode 100644 index 000000000000..55b38cfbba73 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchDeletedEventData.php @@ -0,0 +1,68 @@ +google.chat.v1.MembershipBatchDeletedEventData + */ +class MembershipBatchDeletedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * A list of deleted memberships. + * + * Generated from protobuf field repeated .google.chat.v1.MembershipDeletedEventData memberships = 1; + */ + private $memberships; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Chat\V1\MembershipDeletedEventData>|\Google\Protobuf\Internal\RepeatedField $memberships + * A list of deleted memberships. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * A list of deleted memberships. + * + * Generated from protobuf field repeated .google.chat.v1.MembershipDeletedEventData memberships = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMemberships() + { + return $this->memberships; + } + + /** + * A list of deleted memberships. + * + * Generated from protobuf field repeated .google.chat.v1.MembershipDeletedEventData memberships = 1; + * @param array<\Google\Apps\Chat\V1\MembershipDeletedEventData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMemberships($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\MembershipDeletedEventData::class); + $this->memberships = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchUpdatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchUpdatedEventData.php new file mode 100644 index 000000000000..a69226399552 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchUpdatedEventData.php @@ -0,0 +1,68 @@ +google.chat.v1.MembershipBatchUpdatedEventData + */ +class MembershipBatchUpdatedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * A list of updated memberships. + * + * Generated from protobuf field repeated .google.chat.v1.MembershipUpdatedEventData memberships = 1; + */ + private $memberships; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Chat\V1\MembershipUpdatedEventData>|\Google\Protobuf\Internal\RepeatedField $memberships + * A list of updated memberships. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * A list of updated memberships. + * + * Generated from protobuf field repeated .google.chat.v1.MembershipUpdatedEventData memberships = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMemberships() + { + return $this->memberships; + } + + /** + * A list of updated memberships. + * + * Generated from protobuf field repeated .google.chat.v1.MembershipUpdatedEventData memberships = 1; + * @param array<\Google\Apps\Chat\V1\MembershipUpdatedEventData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMemberships($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\MembershipUpdatedEventData::class); + $this->memberships = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipCreatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipCreatedEventData.php new file mode 100644 index 000000000000..f7eda903edad --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipCreatedEventData.php @@ -0,0 +1,78 @@ +google.chat.v1.MembershipCreatedEventData + */ +class MembershipCreatedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * The new membership. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1; + */ + protected $membership = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Membership $membership + * The new membership. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * The new membership. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1; + * @return \Google\Apps\Chat\V1\Membership|null + */ + public function getMembership() + { + return $this->membership; + } + + public function hasMembership() + { + return isset($this->membership); + } + + public function clearMembership() + { + unset($this->membership); + } + + /** + * The new membership. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1; + * @param \Google\Apps\Chat\V1\Membership $var + * @return $this + */ + public function setMembership($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); + $this->membership = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipDeletedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipDeletedEventData.php new file mode 100644 index 000000000000..ec28249ca189 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipDeletedEventData.php @@ -0,0 +1,78 @@ +google.chat.v1.MembershipDeletedEventData + */ +class MembershipDeletedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * The deleted membership. Only the `name` and `state` fields are populated. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1; + */ + protected $membership = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Membership $membership + * The deleted membership. Only the `name` and `state` fields are populated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * The deleted membership. Only the `name` and `state` fields are populated. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1; + * @return \Google\Apps\Chat\V1\Membership|null + */ + public function getMembership() + { + return $this->membership; + } + + public function hasMembership() + { + return isset($this->membership); + } + + public function clearMembership() + { + unset($this->membership); + } + + /** + * The deleted membership. Only the `name` and `state` fields are populated. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1; + * @param \Google\Apps\Chat\V1\Membership $var + * @return $this + */ + public function setMembership($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); + $this->membership = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipUpdatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipUpdatedEventData.php new file mode 100644 index 000000000000..df395bd6d237 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipUpdatedEventData.php @@ -0,0 +1,78 @@ +google.chat.v1.MembershipUpdatedEventData + */ +class MembershipUpdatedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * The updated membership. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1; + */ + protected $membership = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Membership $membership + * The updated membership. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * The updated membership. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1; + * @return \Google\Apps\Chat\V1\Membership|null + */ + public function getMembership() + { + return $this->membership; + } + + public function hasMembership() + { + return isset($this->membership); + } + + public function clearMembership() + { + unset($this->membership); + } + + /** + * The updated membership. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1; + * @param \Google\Apps\Chat\V1\Membership $var + * @return $this + */ + public function setMembership($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); + $this->membership = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Message.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Message.php new file mode 100644 index 000000000000..4a893b5e16de --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Message.php @@ -0,0 +1,1426 @@ +google.chat.v1.Message + */ +class Message extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * Where `{space}` is the ID of the space where the message is posted and + * `{message}` is a system-assigned ID for the message. For example, + * `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. + * If you set a custom ID when you create a message, you can use this ID to + * specify the message in a request by replacing `{message}` with the value + * from the `clientAssignedMessageId` field. For example, + * `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name + * a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The user who created the message. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * + * Generated from protobuf field .google.chat.v1.User sender = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $sender = null; + /** + * Optional. Immutable. For spaces created in Chat, the time at which the + * message was created. This field is output only, except when used in import + * mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the message was created in the source in order to preserve the original + * creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $create_time = null; + /** + * Output only. The time at which the message was last edited by a user. If + * the message has never been edited, this field is empty. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_update_time = null; + /** + * Output only. The time at which the message was deleted in + * Google Chat. If the message is never deleted, this field is empty. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $delete_time = null; + /** + * Plain-text body of the message. The first link to an image, video, or web + * page generates a + * [preview chip](https://developers.google.com/workspace/chat/preview-links). + * You can also [@mention a Google Chat + * user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), + * or everyone in the space. + * To learn about creating text messages, see [Send a + * message](https://developers.google.com/workspace/chat/create-messages). + * + * Generated from protobuf field string text = 4; + */ + protected $text = ''; + /** + * Output only. Contains the message `text` with markups added to communicate + * formatting. This field might not capture all formatting visible in the UI, + * but includes the following: + * * [Markup + * syntax](https://developers.google.com/workspace/chat/format-messages) + * for bold, italic, strikethrough, monospace, monospace block, and bulleted + * list. + * * [User + * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) + * using the format ``. + * * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the + * first string is the URL and the second is the rendered text—for example, + * ``. + * * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. + * This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning + * face emoji. + * For more information, see [View text formatting sent in a + * message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) + * + * Generated from protobuf field string formatted_text = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $formatted_text = ''; + /** + * Deprecated: Use `cards_v2` instead. + * Rich, formatted, and interactive cards that you can use to display UI + * elements such as: formatted texts, buttons, and clickable images. Cards are + * normally displayed below the plain-text body of the message. `cards` and + * `cards_v2` can have a maximum size of 32 KB. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true]; + * @deprecated + */ + private $cards; + /** + * An array of + * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). + * Only Chat apps can create cards. If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the messages can't contain cards. + * To learn how to create a message that contains cards, see [Send a + * message](https://developers.google.com/workspace/chat/create-messages). + * [Card builder](https://addons.gsuite.google.com/uikit/builder) + * + * Generated from protobuf field repeated .google.chat.v1.CardWithId cards_v2 = 22; + */ + private $cards_v2; + /** + * Output only. Annotations associated with the `text` in this message. + * + * Generated from protobuf field repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $annotations; + /** + * The thread the message belongs to. For example usage, see + * [Start or reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * + * Generated from protobuf field .google.chat.v1.Thread thread = 11; + */ + protected $thread = null; + /** + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * `name`. + * + * Generated from protobuf field .google.chat.v1.Space space = 12; + */ + protected $space = null; + /** + * A plain-text description of the message's cards, used when the actual cards + * can't be displayed—for example, mobile notifications. + * + * Generated from protobuf field string fallback_text = 13; + */ + protected $fallback_text = ''; + /** + * Input only. Parameters that a Chat app can use to configure how its + * response is posted. + * + * Generated from protobuf field .google.chat.v1.ActionResponse action_response = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + */ + protected $action_response = null; + /** + * Output only. Plain-text body of the message with all Chat app mentions + * stripped out. + * + * Generated from protobuf field string argument_text = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $argument_text = ''; + /** + * Output only. Slash command information, if applicable. + * + * Generated from protobuf field .google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $slash_command = null; + /** + * User-uploaded attachment. + * + * Generated from protobuf field repeated .google.chat.v1.Attachment attachment = 18; + */ + private $attachment; + /** + * Output only. A URL in `spaces.messages.text` that matches a link preview + * pattern. For more information, see [Preview + * links](https://developers.google.com/workspace/chat/preview-links). + * + * Generated from protobuf field .google.chat.v1.MatchedUrl matched_url = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $matched_url = null; + /** + * Output only. When `true`, the message is a response in a reply thread. When + * `false`, the message is visible in the space's top-level conversation as + * either the first message of a thread or a message with no threaded replies. + * If the space doesn't support reply in threads, this field is always + * `false`. + * + * Generated from protobuf field bool thread_reply = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $thread_reply = false; + /** + * Optional. A custom ID for the message. You can use field to identify a + * message, or to get, delete, or update a message. To set a custom ID, + * specify the + * [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) + * field when you create the message. For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string client_assigned_message_id = 32; + */ + protected $client_assigned_message_id = ''; + /** + * Output only. The list of emoji reaction summaries on the message. + * + * Generated from protobuf field repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $emoji_reaction_summaries; + /** + * Immutable. Input for creating a message, otherwise output only. The user + * that can view the message. When set, the message is private and only + * visible to the specified user and the Chat app. To include this field in + * your request, you must call the Chat API using [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and omit the following: + * * [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments) + * * [Accessory + * widgets](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget) + * For details, see [Send a message + * privately](https://developers.google.com/workspace/chat/create-messages#private). + * + * Generated from protobuf field .google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $private_message_viewer = null; + /** + * Output only. Information about a deleted message. A message is deleted when + * `delete_time` is set. + * + * Generated from protobuf field .google.chat.v1.DeletionMetadata deletion_metadata = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $deletion_metadata = null; + /** + * Output only. Information about a message that's quoted by a Google Chat + * user in a space. Google Chat users can quote a message to reply to it. + * + * Generated from protobuf field .google.chat.v1.QuotedMessageMetadata quoted_message_metadata = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $quoted_message_metadata = null; + /** + * Output only. GIF images that are attached to the message. + * + * Generated from protobuf field repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $attached_gifs; + /** + * One or more interactive widgets that appear at the bottom of a message. + * You can add accessory widgets to messages that contain text, cards, or both + * text and cards. Not supported for messages that contain dialogs. For + * details, see [Add interactive widgets at the bottom of a + * message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). + * Creating a message with accessory widgets requires [app + * authentication] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44; + */ + private $accessory_widgets; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * Where `{space}` is the ID of the space where the message is posted and + * `{message}` is a system-assigned ID for the message. For example, + * `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. + * If you set a custom ID when you create a message, you can use this ID to + * specify the message in a request by replacing `{message}` with the value + * from the `clientAssignedMessageId` field. For example, + * `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name + * a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * @type \Google\Apps\Chat\V1\User $sender + * Output only. The user who created the message. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * @type \Google\Protobuf\Timestamp $create_time + * Optional. Immutable. For spaces created in Chat, the time at which the + * message was created. This field is output only, except when used in import + * mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the message was created in the source in order to preserve the original + * creation time. + * @type \Google\Protobuf\Timestamp $last_update_time + * Output only. The time at which the message was last edited by a user. If + * the message has never been edited, this field is empty. + * @type \Google\Protobuf\Timestamp $delete_time + * Output only. The time at which the message was deleted in + * Google Chat. If the message is never deleted, this field is empty. + * @type string $text + * Plain-text body of the message. The first link to an image, video, or web + * page generates a + * [preview chip](https://developers.google.com/workspace/chat/preview-links). + * You can also [@mention a Google Chat + * user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), + * or everyone in the space. + * To learn about creating text messages, see [Send a + * message](https://developers.google.com/workspace/chat/create-messages). + * @type string $formatted_text + * Output only. Contains the message `text` with markups added to communicate + * formatting. This field might not capture all formatting visible in the UI, + * but includes the following: + * * [Markup + * syntax](https://developers.google.com/workspace/chat/format-messages) + * for bold, italic, strikethrough, monospace, monospace block, and bulleted + * list. + * * [User + * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) + * using the format ``. + * * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the + * first string is the URL and the second is the rendered text—for example, + * ``. + * * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. + * This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning + * face emoji. + * For more information, see [View text formatting sent in a + * message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) + * @type array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card>|\Google\Protobuf\Internal\RepeatedField $cards + * Deprecated: Use `cards_v2` instead. + * Rich, formatted, and interactive cards that you can use to display UI + * elements such as: formatted texts, buttons, and clickable images. Cards are + * normally displayed below the plain-text body of the message. `cards` and + * `cards_v2` can have a maximum size of 32 KB. + * @type array<\Google\Apps\Chat\V1\CardWithId>|\Google\Protobuf\Internal\RepeatedField $cards_v2 + * An array of + * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). + * Only Chat apps can create cards. If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the messages can't contain cards. + * To learn how to create a message that contains cards, see [Send a + * message](https://developers.google.com/workspace/chat/create-messages). + * [Card builder](https://addons.gsuite.google.com/uikit/builder) + * @type array<\Google\Apps\Chat\V1\Annotation>|\Google\Protobuf\Internal\RepeatedField $annotations + * Output only. Annotations associated with the `text` in this message. + * @type \Google\Apps\Chat\V1\Thread $thread + * The thread the message belongs to. For example usage, see + * [Start or reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * @type \Google\Apps\Chat\V1\Space $space + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * `name`. + * @type string $fallback_text + * A plain-text description of the message's cards, used when the actual cards + * can't be displayed—for example, mobile notifications. + * @type \Google\Apps\Chat\V1\ActionResponse $action_response + * Input only. Parameters that a Chat app can use to configure how its + * response is posted. + * @type string $argument_text + * Output only. Plain-text body of the message with all Chat app mentions + * stripped out. + * @type \Google\Apps\Chat\V1\SlashCommand $slash_command + * Output only. Slash command information, if applicable. + * @type array<\Google\Apps\Chat\V1\Attachment>|\Google\Protobuf\Internal\RepeatedField $attachment + * User-uploaded attachment. + * @type \Google\Apps\Chat\V1\MatchedUrl $matched_url + * Output only. A URL in `spaces.messages.text` that matches a link preview + * pattern. For more information, see [Preview + * links](https://developers.google.com/workspace/chat/preview-links). + * @type bool $thread_reply + * Output only. When `true`, the message is a response in a reply thread. When + * `false`, the message is visible in the space's top-level conversation as + * either the first message of a thread or a message with no threaded replies. + * If the space doesn't support reply in threads, this field is always + * `false`. + * @type string $client_assigned_message_id + * Optional. A custom ID for the message. You can use field to identify a + * message, or to get, delete, or update a message. To set a custom ID, + * specify the + * [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) + * field when you create the message. For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * @type array<\Google\Apps\Chat\V1\EmojiReactionSummary>|\Google\Protobuf\Internal\RepeatedField $emoji_reaction_summaries + * Output only. The list of emoji reaction summaries on the message. + * @type \Google\Apps\Chat\V1\User $private_message_viewer + * Immutable. Input for creating a message, otherwise output only. The user + * that can view the message. When set, the message is private and only + * visible to the specified user and the Chat app. To include this field in + * your request, you must call the Chat API using [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and omit the following: + * * [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments) + * * [Accessory + * widgets](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget) + * For details, see [Send a message + * privately](https://developers.google.com/workspace/chat/create-messages#private). + * @type \Google\Apps\Chat\V1\DeletionMetadata $deletion_metadata + * Output only. Information about a deleted message. A message is deleted when + * `delete_time` is set. + * @type \Google\Apps\Chat\V1\QuotedMessageMetadata $quoted_message_metadata + * Output only. Information about a message that's quoted by a Google Chat + * user in a space. Google Chat users can quote a message to reply to it. + * @type array<\Google\Apps\Chat\V1\AttachedGif>|\Google\Protobuf\Internal\RepeatedField $attached_gifs + * Output only. GIF images that are attached to the message. + * @type array<\Google\Apps\Chat\V1\AccessoryWidget>|\Google\Protobuf\Internal\RepeatedField $accessory_widgets + * One or more interactive widgets that appear at the bottom of a message. + * You can add accessory widgets to messages that contain text, cards, or both + * text and cards. Not supported for messages that contain dialogs. For + * details, see [Add interactive widgets at the bottom of a + * message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). + * Creating a message with accessory widgets requires [app + * authentication] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * Where `{space}` is the ID of the space where the message is posted and + * `{message}` is a system-assigned ID for the message. For example, + * `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. + * If you set a custom ID when you create a message, you can use this ID to + * specify the message in a request by replacing `{message}` with the value + * from the `clientAssignedMessageId` field. For example, + * `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name + * a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the message. + * Format: `spaces/{space}/messages/{message}` + * Where `{space}` is the ID of the space where the message is posted and + * `{message}` is a system-assigned ID for the message. For example, + * `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. + * If you set a custom ID when you create a message, you can use this ID to + * specify the message in a request by replacing `{message}` with the value + * from the `clientAssignedMessageId` field. For example, + * `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name + * a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The user who created the message. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * + * Generated from protobuf field .google.chat.v1.User sender = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\User|null + */ + public function getSender() + { + return $this->sender; + } + + public function hasSender() + { + return isset($this->sender); + } + + public function clearSender() + { + unset($this->sender); + } + + /** + * Output only. The user who created the message. + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) + * `name` and `type`. + * + * Generated from protobuf field .google.chat.v1.User sender = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\User $var + * @return $this + */ + public function setSender($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); + $this->sender = $var; + + return $this; + } + + /** + * Optional. Immutable. For spaces created in Chat, the time at which the + * message was created. This field is output only, except when used in import + * mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the message was created in the source in order to preserve the original + * creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Immutable. For spaces created in Chat, the time at which the + * message was created. This field is output only, except when used in import + * mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the message was created in the source in order to preserve the original + * creation time. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @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 message was last edited by a user. If + * the message has never been edited, this field is empty. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastUpdateTime() + { + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + unset($this->last_update_time); + } + + /** + * Output only. The time at which the message was last edited by a user. If + * the message has never been edited, this field is empty. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + + /** + * Output only. The time at which the message was deleted in + * Google Chat. If the message is never deleted, this field is empty. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 26 [(.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 message was deleted in + * Google Chat. If the message is never deleted, this field is empty. + * + * Generated from protobuf field .google.protobuf.Timestamp delete_time = 26 [(.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; + } + + /** + * Plain-text body of the message. The first link to an image, video, or web + * page generates a + * [preview chip](https://developers.google.com/workspace/chat/preview-links). + * You can also [@mention a Google Chat + * user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), + * or everyone in the space. + * To learn about creating text messages, see [Send a + * message](https://developers.google.com/workspace/chat/create-messages). + * + * Generated from protobuf field string text = 4; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Plain-text body of the message. The first link to an image, video, or web + * page generates a + * [preview chip](https://developers.google.com/workspace/chat/preview-links). + * You can also [@mention a Google Chat + * user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), + * or everyone in the space. + * To learn about creating text messages, see [Send a + * message](https://developers.google.com/workspace/chat/create-messages). + * + * Generated from protobuf field string text = 4; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Output only. Contains the message `text` with markups added to communicate + * formatting. This field might not capture all formatting visible in the UI, + * but includes the following: + * * [Markup + * syntax](https://developers.google.com/workspace/chat/format-messages) + * for bold, italic, strikethrough, monospace, monospace block, and bulleted + * list. + * * [User + * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) + * using the format ``. + * * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the + * first string is the URL and the second is the rendered text—for example, + * ``. + * * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. + * This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning + * face emoji. + * For more information, see [View text formatting sent in a + * message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) + * + * Generated from protobuf field string formatted_text = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFormattedText() + { + return $this->formatted_text; + } + + /** + * Output only. Contains the message `text` with markups added to communicate + * formatting. This field might not capture all formatting visible in the UI, + * but includes the following: + * * [Markup + * syntax](https://developers.google.com/workspace/chat/format-messages) + * for bold, italic, strikethrough, monospace, monospace block, and bulleted + * list. + * * [User + * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) + * using the format ``. + * * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the + * first string is the URL and the second is the rendered text—for example, + * ``. + * * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. + * This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning + * face emoji. + * For more information, see [View text formatting sent in a + * message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) + * + * Generated from protobuf field string formatted_text = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFormattedText($var) + { + GPBUtil::checkString($var, True); + $this->formatted_text = $var; + + return $this; + } + + /** + * Deprecated: Use `cards_v2` instead. + * Rich, formatted, and interactive cards that you can use to display UI + * elements such as: formatted texts, buttons, and clickable images. Cards are + * normally displayed below the plain-text body of the message. `cards` and + * `cards_v2` can have a maximum size of 32 KB. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true]; + * @return \Google\Protobuf\Internal\RepeatedField + * @deprecated + */ + public function getCards() + { + @trigger_error('cards is deprecated.', E_USER_DEPRECATED); + return $this->cards; + } + + /** + * Deprecated: Use `cards_v2` instead. + * Rich, formatted, and interactive cards that you can use to display UI + * elements such as: formatted texts, buttons, and clickable images. Cards are + * normally displayed below the plain-text body of the message. `cards` and + * `cards_v2` can have a maximum size of 32 KB. + * + * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true]; + * @param array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + * @deprecated + */ + public function setCards($var) + { + @trigger_error('cards is deprecated.', E_USER_DEPRECATED); + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card::class); + $this->cards = $arr; + + return $this; + } + + /** + * An array of + * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). + * Only Chat apps can create cards. If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the messages can't contain cards. + * To learn how to create a message that contains cards, see [Send a + * message](https://developers.google.com/workspace/chat/create-messages). + * [Card builder](https://addons.gsuite.google.com/uikit/builder) + * + * Generated from protobuf field repeated .google.chat.v1.CardWithId cards_v2 = 22; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getCardsV2() + { + return $this->cards_v2; + } + + /** + * An array of + * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). + * Only Chat apps can create cards. If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the messages can't contain cards. + * To learn how to create a message that contains cards, see [Send a + * message](https://developers.google.com/workspace/chat/create-messages). + * [Card builder](https://addons.gsuite.google.com/uikit/builder) + * + * Generated from protobuf field repeated .google.chat.v1.CardWithId cards_v2 = 22; + * @param array<\Google\Apps\Chat\V1\CardWithId>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setCardsV2($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\CardWithId::class); + $this->cards_v2 = $arr; + + return $this; + } + + /** + * Output only. Annotations associated with the `text` in this message. + * + * Generated from protobuf field repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAnnotations() + { + return $this->annotations; + } + + /** + * Output only. Annotations associated with the `text` in this message. + * + * Generated from protobuf field repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Apps\Chat\V1\Annotation>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAnnotations($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Annotation::class); + $this->annotations = $arr; + + return $this; + } + + /** + * The thread the message belongs to. For example usage, see + * [Start or reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * + * Generated from protobuf field .google.chat.v1.Thread thread = 11; + * @return \Google\Apps\Chat\V1\Thread|null + */ + public function getThread() + { + return $this->thread; + } + + public function hasThread() + { + return isset($this->thread); + } + + public function clearThread() + { + unset($this->thread); + } + + /** + * The thread the message belongs to. For example usage, see + * [Start or reply to a message + * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). + * + * Generated from protobuf field .google.chat.v1.Thread thread = 11; + * @param \Google\Apps\Chat\V1\Thread $var + * @return $this + */ + public function setThread($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Thread::class); + $this->thread = $var; + + return $this; + } + + /** + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * `name`. + * + * Generated from protobuf field .google.chat.v1.Space space = 12; + * @return \Google\Apps\Chat\V1\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * If your Chat app [authenticates as a + * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * the output populates the + * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) + * `name`. + * + * Generated from protobuf field .google.chat.v1.Space space = 12; + * @param \Google\Apps\Chat\V1\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); + $this->space = $var; + + return $this; + } + + /** + * A plain-text description of the message's cards, used when the actual cards + * can't be displayed—for example, mobile notifications. + * + * Generated from protobuf field string fallback_text = 13; + * @return string + */ + public function getFallbackText() + { + return $this->fallback_text; + } + + /** + * A plain-text description of the message's cards, used when the actual cards + * can't be displayed—for example, mobile notifications. + * + * Generated from protobuf field string fallback_text = 13; + * @param string $var + * @return $this + */ + public function setFallbackText($var) + { + GPBUtil::checkString($var, True); + $this->fallback_text = $var; + + return $this; + } + + /** + * Input only. Parameters that a Chat app can use to configure how its + * response is posted. + * + * Generated from protobuf field .google.chat.v1.ActionResponse action_response = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * @return \Google\Apps\Chat\V1\ActionResponse|null + */ + public function getActionResponse() + { + return $this->action_response; + } + + public function hasActionResponse() + { + return isset($this->action_response); + } + + public function clearActionResponse() + { + unset($this->action_response); + } + + /** + * Input only. Parameters that a Chat app can use to configure how its + * response is posted. + * + * Generated from protobuf field .google.chat.v1.ActionResponse action_response = 14 [(.google.api.field_behavior) = INPUT_ONLY]; + * @param \Google\Apps\Chat\V1\ActionResponse $var + * @return $this + */ + public function setActionResponse($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ActionResponse::class); + $this->action_response = $var; + + return $this; + } + + /** + * Output only. Plain-text body of the message with all Chat app mentions + * stripped out. + * + * Generated from protobuf field string argument_text = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getArgumentText() + { + return $this->argument_text; + } + + /** + * Output only. Plain-text body of the message with all Chat app mentions + * stripped out. + * + * Generated from protobuf field string argument_text = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setArgumentText($var) + { + GPBUtil::checkString($var, True); + $this->argument_text = $var; + + return $this; + } + + /** + * Output only. Slash command information, if applicable. + * + * Generated from protobuf field .google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\SlashCommand|null + */ + public function getSlashCommand() + { + return $this->slash_command; + } + + public function hasSlashCommand() + { + return isset($this->slash_command); + } + + public function clearSlashCommand() + { + unset($this->slash_command); + } + + /** + * Output only. Slash command information, if applicable. + * + * Generated from protobuf field .google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\SlashCommand $var + * @return $this + */ + public function setSlashCommand($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SlashCommand::class); + $this->slash_command = $var; + + return $this; + } + + /** + * User-uploaded attachment. + * + * Generated from protobuf field repeated .google.chat.v1.Attachment attachment = 18; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttachment() + { + return $this->attachment; + } + + /** + * User-uploaded attachment. + * + * Generated from protobuf field repeated .google.chat.v1.Attachment attachment = 18; + * @param array<\Google\Apps\Chat\V1\Attachment>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttachment($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Attachment::class); + $this->attachment = $arr; + + return $this; + } + + /** + * Output only. A URL in `spaces.messages.text` that matches a link preview + * pattern. For more information, see [Preview + * links](https://developers.google.com/workspace/chat/preview-links). + * + * Generated from protobuf field .google.chat.v1.MatchedUrl matched_url = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\MatchedUrl|null + */ + public function getMatchedUrl() + { + return $this->matched_url; + } + + public function hasMatchedUrl() + { + return isset($this->matched_url); + } + + public function clearMatchedUrl() + { + unset($this->matched_url); + } + + /** + * Output only. A URL in `spaces.messages.text` that matches a link preview + * pattern. For more information, see [Preview + * links](https://developers.google.com/workspace/chat/preview-links). + * + * Generated from protobuf field .google.chat.v1.MatchedUrl matched_url = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\MatchedUrl $var + * @return $this + */ + public function setMatchedUrl($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MatchedUrl::class); + $this->matched_url = $var; + + return $this; + } + + /** + * Output only. When `true`, the message is a response in a reply thread. When + * `false`, the message is visible in the space's top-level conversation as + * either the first message of a thread or a message with no threaded replies. + * If the space doesn't support reply in threads, this field is always + * `false`. + * + * Generated from protobuf field bool thread_reply = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getThreadReply() + { + return $this->thread_reply; + } + + /** + * Output only. When `true`, the message is a response in a reply thread. When + * `false`, the message is visible in the space's top-level conversation as + * either the first message of a thread or a message with no threaded replies. + * If the space doesn't support reply in threads, this field is always + * `false`. + * + * Generated from protobuf field bool thread_reply = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setThreadReply($var) + { + GPBUtil::checkBool($var); + $this->thread_reply = $var; + + return $this; + } + + /** + * Optional. A custom ID for the message. You can use field to identify a + * message, or to get, delete, or update a message. To set a custom ID, + * specify the + * [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) + * field when you create the message. For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string client_assigned_message_id = 32; + * @return string + */ + public function getClientAssignedMessageId() + { + return $this->client_assigned_message_id; + } + + /** + * Optional. A custom ID for the message. You can use field to identify a + * message, or to get, delete, or update a message. To set a custom ID, + * specify the + * [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) + * field when you create the message. For details, see [Name a + * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). + * + * Generated from protobuf field string client_assigned_message_id = 32; + * @param string $var + * @return $this + */ + public function setClientAssignedMessageId($var) + { + GPBUtil::checkString($var, True); + $this->client_assigned_message_id = $var; + + return $this; + } + + /** + * Output only. The list of emoji reaction summaries on the message. + * + * Generated from protobuf field repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getEmojiReactionSummaries() + { + return $this->emoji_reaction_summaries; + } + + /** + * Output only. The list of emoji reaction summaries on the message. + * + * Generated from protobuf field repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Apps\Chat\V1\EmojiReactionSummary>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setEmojiReactionSummaries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\EmojiReactionSummary::class); + $this->emoji_reaction_summaries = $arr; + + return $this; + } + + /** + * Immutable. Input for creating a message, otherwise output only. The user + * that can view the message. When set, the message is private and only + * visible to the specified user and the Chat app. To include this field in + * your request, you must call the Chat API using [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and omit the following: + * * [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments) + * * [Accessory + * widgets](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget) + * For details, see [Send a message + * privately](https://developers.google.com/workspace/chat/create-messages#private). + * + * Generated from protobuf field .google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE]; + * @return \Google\Apps\Chat\V1\User|null + */ + public function getPrivateMessageViewer() + { + return $this->private_message_viewer; + } + + public function hasPrivateMessageViewer() + { + return isset($this->private_message_viewer); + } + + public function clearPrivateMessageViewer() + { + unset($this->private_message_viewer); + } + + /** + * Immutable. Input for creating a message, otherwise output only. The user + * that can view the message. When set, the message is private and only + * visible to the specified user and the Chat app. To include this field in + * your request, you must call the Chat API using [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and omit the following: + * * [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments) + * * [Accessory + * widgets](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget) + * For details, see [Send a message + * privately](https://developers.google.com/workspace/chat/create-messages#private). + * + * Generated from protobuf field .google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE]; + * @param \Google\Apps\Chat\V1\User $var + * @return $this + */ + public function setPrivateMessageViewer($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); + $this->private_message_viewer = $var; + + return $this; + } + + /** + * Output only. Information about a deleted message. A message is deleted when + * `delete_time` is set. + * + * Generated from protobuf field .google.chat.v1.DeletionMetadata deletion_metadata = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\DeletionMetadata|null + */ + public function getDeletionMetadata() + { + return $this->deletion_metadata; + } + + public function hasDeletionMetadata() + { + return isset($this->deletion_metadata); + } + + public function clearDeletionMetadata() + { + unset($this->deletion_metadata); + } + + /** + * Output only. Information about a deleted message. A message is deleted when + * `delete_time` is set. + * + * Generated from protobuf field .google.chat.v1.DeletionMetadata deletion_metadata = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\DeletionMetadata $var + * @return $this + */ + public function setDeletionMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DeletionMetadata::class); + $this->deletion_metadata = $var; + + return $this; + } + + /** + * Output only. Information about a message that's quoted by a Google Chat + * user in a space. Google Chat users can quote a message to reply to it. + * + * Generated from protobuf field .google.chat.v1.QuotedMessageMetadata quoted_message_metadata = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\QuotedMessageMetadata|null + */ + public function getQuotedMessageMetadata() + { + return $this->quoted_message_metadata; + } + + public function hasQuotedMessageMetadata() + { + return isset($this->quoted_message_metadata); + } + + public function clearQuotedMessageMetadata() + { + unset($this->quoted_message_metadata); + } + + /** + * Output only. Information about a message that's quoted by a Google Chat + * user in a space. Google Chat users can quote a message to reply to it. + * + * Generated from protobuf field .google.chat.v1.QuotedMessageMetadata quoted_message_metadata = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\QuotedMessageMetadata $var + * @return $this + */ + public function setQuotedMessageMetadata($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\QuotedMessageMetadata::class); + $this->quoted_message_metadata = $var; + + return $this; + } + + /** + * Output only. GIF images that are attached to the message. + * + * Generated from protobuf field repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAttachedGifs() + { + return $this->attached_gifs; + } + + /** + * Output only. GIF images that are attached to the message. + * + * Generated from protobuf field repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param array<\Google\Apps\Chat\V1\AttachedGif>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAttachedGifs($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\AttachedGif::class); + $this->attached_gifs = $arr; + + return $this; + } + + /** + * One or more interactive widgets that appear at the bottom of a message. + * You can add accessory widgets to messages that contain text, cards, or both + * text and cards. Not supported for messages that contain dialogs. For + * details, see [Add interactive widgets at the bottom of a + * message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). + * Creating a message with accessory widgets requires [app + * authentication] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getAccessoryWidgets() + { + return $this->accessory_widgets; + } + + /** + * One or more interactive widgets that appear at the bottom of a message. + * You can add accessory widgets to messages that contain text, cards, or both + * text and cards. Not supported for messages that contain dialogs. For + * details, see [Add interactive widgets at the bottom of a + * message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). + * Creating a message with accessory widgets requires [app + * authentication] + * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44; + * @param array<\Google\Apps\Chat\V1\AccessoryWidget>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setAccessoryWidgets($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\AccessoryWidget::class); + $this->accessory_widgets = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchCreatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchCreatedEventData.php new file mode 100644 index 000000000000..df1973205c35 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchCreatedEventData.php @@ -0,0 +1,68 @@ +google.chat.v1.MessageBatchCreatedEventData + */ +class MessageBatchCreatedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * A list of new messages. + * + * Generated from protobuf field repeated .google.chat.v1.MessageCreatedEventData messages = 1; + */ + private $messages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Chat\V1\MessageCreatedEventData>|\Google\Protobuf\Internal\RepeatedField $messages + * A list of new messages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * A list of new messages. + * + * Generated from protobuf field repeated .google.chat.v1.MessageCreatedEventData messages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * A list of new messages. + * + * Generated from protobuf field repeated .google.chat.v1.MessageCreatedEventData messages = 1; + * @param array<\Google\Apps\Chat\V1\MessageCreatedEventData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\MessageCreatedEventData::class); + $this->messages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchDeletedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchDeletedEventData.php new file mode 100644 index 000000000000..0264ff4cfea5 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchDeletedEventData.php @@ -0,0 +1,68 @@ +google.chat.v1.MessageBatchDeletedEventData + */ +class MessageBatchDeletedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * A list of deleted messages. + * + * Generated from protobuf field repeated .google.chat.v1.MessageDeletedEventData messages = 1; + */ + private $messages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Chat\V1\MessageDeletedEventData>|\Google\Protobuf\Internal\RepeatedField $messages + * A list of deleted messages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * A list of deleted messages. + * + * Generated from protobuf field repeated .google.chat.v1.MessageDeletedEventData messages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * A list of deleted messages. + * + * Generated from protobuf field repeated .google.chat.v1.MessageDeletedEventData messages = 1; + * @param array<\Google\Apps\Chat\V1\MessageDeletedEventData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\MessageDeletedEventData::class); + $this->messages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchUpdatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchUpdatedEventData.php new file mode 100644 index 000000000000..2085b91f0887 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchUpdatedEventData.php @@ -0,0 +1,68 @@ +google.chat.v1.MessageBatchUpdatedEventData + */ +class MessageBatchUpdatedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * A list of updated messages. + * + * Generated from protobuf field repeated .google.chat.v1.MessageUpdatedEventData messages = 1; + */ + private $messages; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Chat\V1\MessageUpdatedEventData>|\Google\Protobuf\Internal\RepeatedField $messages + * A list of updated messages. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * A list of updated messages. + * + * Generated from protobuf field repeated .google.chat.v1.MessageUpdatedEventData messages = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMessages() + { + return $this->messages; + } + + /** + * A list of updated messages. + * + * Generated from protobuf field repeated .google.chat.v1.MessageUpdatedEventData messages = 1; + * @param array<\Google\Apps\Chat\V1\MessageUpdatedEventData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMessages($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\MessageUpdatedEventData::class); + $this->messages = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageCreatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageCreatedEventData.php new file mode 100644 index 000000000000..9fd83ebb9454 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageCreatedEventData.php @@ -0,0 +1,78 @@ +google.chat.v1.MessageCreatedEventData + */ +class MessageCreatedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * The new message. + * + * Generated from protobuf field .google.chat.v1.Message message = 1; + */ + protected $message = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Message $message + * The new message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * The new message. + * + * Generated from protobuf field .google.chat.v1.Message message = 1; + * @return \Google\Apps\Chat\V1\Message|null + */ + public function getMessage() + { + return $this->message; + } + + public function hasMessage() + { + return isset($this->message); + } + + public function clearMessage() + { + unset($this->message); + } + + /** + * The new message. + * + * Generated from protobuf field .google.chat.v1.Message message = 1; + * @param \Google\Apps\Chat\V1\Message $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Message::class); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageDeletedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageDeletedEventData.php new file mode 100644 index 000000000000..979e52ff7474 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageDeletedEventData.php @@ -0,0 +1,82 @@ +google.chat.v1.MessageDeletedEventData + */ +class MessageDeletedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * The deleted message. Only the `name`, `createTime`, `deleteTime`, and + * `deletionMetadata` fields are populated. + * + * Generated from protobuf field .google.chat.v1.Message message = 1; + */ + protected $message = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Message $message + * The deleted message. Only the `name`, `createTime`, `deleteTime`, and + * `deletionMetadata` fields are populated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * The deleted message. Only the `name`, `createTime`, `deleteTime`, and + * `deletionMetadata` fields are populated. + * + * Generated from protobuf field .google.chat.v1.Message message = 1; + * @return \Google\Apps\Chat\V1\Message|null + */ + public function getMessage() + { + return $this->message; + } + + public function hasMessage() + { + return isset($this->message); + } + + public function clearMessage() + { + unset($this->message); + } + + /** + * The deleted message. Only the `name`, `createTime`, `deleteTime`, and + * `deletionMetadata` fields are populated. + * + * Generated from protobuf field .google.chat.v1.Message message = 1; + * @param \Google\Apps\Chat\V1\Message $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Message::class); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageUpdatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageUpdatedEventData.php new file mode 100644 index 000000000000..515273c038c8 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageUpdatedEventData.php @@ -0,0 +1,78 @@ +google.chat.v1.MessageUpdatedEventData + */ +class MessageUpdatedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * The updated message. + * + * Generated from protobuf field .google.chat.v1.Message message = 1; + */ + protected $message = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Message $message + * The updated message. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * The updated message. + * + * Generated from protobuf field .google.chat.v1.Message message = 1; + * @return \Google\Apps\Chat\V1\Message|null + */ + public function getMessage() + { + return $this->message; + } + + public function hasMessage() + { + return isset($this->message); + } + + public function clearMessage() + { + unset($this->message); + } + + /** + * The updated message. + * + * Generated from protobuf field .google.chat.v1.Message message = 1; + * @param \Google\Apps\Chat\V1\Message $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Message::class); + $this->message = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/QuotedMessageMetadata.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/QuotedMessageMetadata.php new file mode 100644 index 000000000000..776a4ab987d7 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/QuotedMessageMetadata.php @@ -0,0 +1,119 @@ +google.chat.v1.QuotedMessageMetadata + */ +class QuotedMessageMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of the quoted message. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $name = ''; + /** + * Output only. The timestamp when the quoted message was created or when the + * quoted message was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_update_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Resource name of the quoted message. + * Format: `spaces/{space}/messages/{message}` + * @type \Google\Protobuf\Timestamp $last_update_time + * Output only. The timestamp when the quoted message was created or when the + * quoted message was last updated. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Resource name of the quoted message. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of the quoted message. + * Format: `spaces/{space}/messages/{message}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The timestamp when the quoted message was created or when the + * quoted message was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastUpdateTime() + { + return $this->last_update_time; + } + + public function hasLastUpdateTime() + { + return isset($this->last_update_time); + } + + public function clearLastUpdateTime() + { + unset($this->last_update_time); + } + + /** + * Output only. The timestamp when the quoted message was created or when the + * quoted message was last updated. + * + * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastUpdateTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_update_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Reaction.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Reaction.php new file mode 100644 index 000000000000..373aec899eaf --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Reaction.php @@ -0,0 +1,159 @@ +google.chat.v1.Reaction + */ +class Reaction extends \Google\Protobuf\Internal\Message +{ + /** + * The resource name of the reaction. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The user who created the reaction. + * + * Generated from protobuf field .google.chat.v1.User user = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $user = null; + /** + * The emoji used in the reaction. + * + * Generated from protobuf field .google.chat.v1.Emoji emoji = 3; + */ + protected $emoji = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * The resource name of the reaction. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * @type \Google\Apps\Chat\V1\User $user + * Output only. The user who created the reaction. + * @type \Google\Apps\Chat\V1\Emoji $emoji + * The emoji used in the reaction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); + parent::__construct($data); + } + + /** + * The resource name of the reaction. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The resource name of the reaction. + * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The user who created the reaction. + * + * Generated from protobuf field .google.chat.v1.User user = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\User|null + */ + public function getUser() + { + return $this->user; + } + + public function hasUser() + { + return isset($this->user); + } + + public function clearUser() + { + unset($this->user); + } + + /** + * Output only. The user who created the reaction. + * + * Generated from protobuf field .google.chat.v1.User user = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\User $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); + $this->user = $var; + + return $this; + } + + /** + * The emoji used in the reaction. + * + * Generated from protobuf field .google.chat.v1.Emoji emoji = 3; + * @return \Google\Apps\Chat\V1\Emoji|null + */ + public function getEmoji() + { + return $this->emoji; + } + + public function hasEmoji() + { + return isset($this->emoji); + } + + public function clearEmoji() + { + unset($this->emoji); + } + + /** + * The emoji used in the reaction. + * + * Generated from protobuf field .google.chat.v1.Emoji emoji = 3; + * @param \Google\Apps\Chat\V1\Emoji $var + * @return $this + */ + public function setEmoji($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Emoji::class); + $this->emoji = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchCreatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchCreatedEventData.php new file mode 100644 index 000000000000..35bcef50d126 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchCreatedEventData.php @@ -0,0 +1,68 @@ +google.chat.v1.ReactionBatchCreatedEventData + */ +class ReactionBatchCreatedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * A list of new reactions. + * + * Generated from protobuf field repeated .google.chat.v1.ReactionCreatedEventData reactions = 1; + */ + private $reactions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Chat\V1\ReactionCreatedEventData>|\Google\Protobuf\Internal\RepeatedField $reactions + * A list of new reactions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * A list of new reactions. + * + * Generated from protobuf field repeated .google.chat.v1.ReactionCreatedEventData reactions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReactions() + { + return $this->reactions; + } + + /** + * A list of new reactions. + * + * Generated from protobuf field repeated .google.chat.v1.ReactionCreatedEventData reactions = 1; + * @param array<\Google\Apps\Chat\V1\ReactionCreatedEventData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReactions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ReactionCreatedEventData::class); + $this->reactions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchDeletedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchDeletedEventData.php new file mode 100644 index 000000000000..cfa937973a8b --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchDeletedEventData.php @@ -0,0 +1,68 @@ +google.chat.v1.ReactionBatchDeletedEventData + */ +class ReactionBatchDeletedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * A list of deleted reactions. + * + * Generated from protobuf field repeated .google.chat.v1.ReactionDeletedEventData reactions = 1; + */ + private $reactions; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Chat\V1\ReactionDeletedEventData>|\Google\Protobuf\Internal\RepeatedField $reactions + * A list of deleted reactions. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * A list of deleted reactions. + * + * Generated from protobuf field repeated .google.chat.v1.ReactionDeletedEventData reactions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getReactions() + { + return $this->reactions; + } + + /** + * A list of deleted reactions. + * + * Generated from protobuf field repeated .google.chat.v1.ReactionDeletedEventData reactions = 1; + * @param array<\Google\Apps\Chat\V1\ReactionDeletedEventData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setReactions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ReactionDeletedEventData::class); + $this->reactions = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionCreatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionCreatedEventData.php new file mode 100644 index 000000000000..12a3ca4640f4 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionCreatedEventData.php @@ -0,0 +1,78 @@ +google.chat.v1.ReactionCreatedEventData + */ +class ReactionCreatedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * The new reaction. + * + * Generated from protobuf field .google.chat.v1.Reaction reaction = 1; + */ + protected $reaction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Reaction $reaction + * The new reaction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * The new reaction. + * + * Generated from protobuf field .google.chat.v1.Reaction reaction = 1; + * @return \Google\Apps\Chat\V1\Reaction|null + */ + public function getReaction() + { + return $this->reaction; + } + + public function hasReaction() + { + return isset($this->reaction); + } + + public function clearReaction() + { + unset($this->reaction); + } + + /** + * The new reaction. + * + * Generated from protobuf field .google.chat.v1.Reaction reaction = 1; + * @param \Google\Apps\Chat\V1\Reaction $var + * @return $this + */ + public function setReaction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Reaction::class); + $this->reaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionDeletedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionDeletedEventData.php new file mode 100644 index 000000000000..e6d5a9e766d1 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionDeletedEventData.php @@ -0,0 +1,78 @@ +google.chat.v1.ReactionDeletedEventData + */ +class ReactionDeletedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * The deleted reaction. + * + * Generated from protobuf field .google.chat.v1.Reaction reaction = 1; + */ + protected $reaction = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Reaction $reaction + * The deleted reaction. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * The deleted reaction. + * + * Generated from protobuf field .google.chat.v1.Reaction reaction = 1; + * @return \Google\Apps\Chat\V1\Reaction|null + */ + public function getReaction() + { + return $this->reaction; + } + + public function hasReaction() + { + return isset($this->reaction); + } + + public function clearReaction() + { + unset($this->reaction); + } + + /** + * The deleted reaction. + * + * Generated from protobuf field .google.chat.v1.Reaction reaction = 1; + * @param \Google\Apps\Chat\V1\Reaction $var + * @return $this + */ + public function setReaction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Reaction::class); + $this->reaction = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata.php new file mode 100644 index 000000000000..8b4b40d772e9 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata.php @@ -0,0 +1,176 @@ +google.chat.v1.RichLinkMetadata + */ +class RichLinkMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The URI of this link. + * + * Generated from protobuf field string uri = 1; + */ + protected $uri = ''; + /** + * The rich link type. + * + * Generated from protobuf field .google.chat.v1.RichLinkMetadata.RichLinkType rich_link_type = 2; + */ + protected $rich_link_type = 0; + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $uri + * The URI of this link. + * @type int $rich_link_type + * The rich link type. + * @type \Google\Apps\Chat\V1\DriveLinkData $drive_link_data + * Data for a drive link. + * @type \Google\Apps\Chat\V1\ChatSpaceLinkData $chat_space_link_data + * Data for a chat space link. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); + parent::__construct($data); + } + + /** + * The URI of this link. + * + * Generated from protobuf field string uri = 1; + * @return string + */ + public function getUri() + { + return $this->uri; + } + + /** + * The URI of this link. + * + * Generated from protobuf field string uri = 1; + * @param string $var + * @return $this + */ + public function setUri($var) + { + GPBUtil::checkString($var, True); + $this->uri = $var; + + return $this; + } + + /** + * The rich link type. + * + * Generated from protobuf field .google.chat.v1.RichLinkMetadata.RichLinkType rich_link_type = 2; + * @return int + */ + public function getRichLinkType() + { + return $this->rich_link_type; + } + + /** + * The rich link type. + * + * Generated from protobuf field .google.chat.v1.RichLinkMetadata.RichLinkType rich_link_type = 2; + * @param int $var + * @return $this + */ + public function setRichLinkType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\RichLinkMetadata\RichLinkType::class); + $this->rich_link_type = $var; + + return $this; + } + + /** + * Data for a drive link. + * + * Generated from protobuf field .google.chat.v1.DriveLinkData drive_link_data = 3; + * @return \Google\Apps\Chat\V1\DriveLinkData|null + */ + public function getDriveLinkData() + { + return $this->readOneof(3); + } + + public function hasDriveLinkData() + { + return $this->hasOneof(3); + } + + /** + * Data for a drive link. + * + * Generated from protobuf field .google.chat.v1.DriveLinkData drive_link_data = 3; + * @param \Google\Apps\Chat\V1\DriveLinkData $var + * @return $this + */ + public function setDriveLinkData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DriveLinkData::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * Data for a chat space link. + * + * Generated from protobuf field .google.chat.v1.ChatSpaceLinkData chat_space_link_data = 4; + * @return \Google\Apps\Chat\V1\ChatSpaceLinkData|null + */ + public function getChatSpaceLinkData() + { + return $this->readOneof(4); + } + + public function hasChatSpaceLinkData() + { + return $this->hasOneof(4); + } + + /** + * Data for a chat space link. + * + * Generated from protobuf field .google.chat.v1.ChatSpaceLinkData chat_space_link_data = 4; + * @param \Google\Apps\Chat\V1\ChatSpaceLinkData $var + * @return $this + */ + public function setChatSpaceLinkData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ChatSpaceLinkData::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata/RichLinkType.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata/RichLinkType.php new file mode 100644 index 000000000000..9aa8967a83ff --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata/RichLinkType.php @@ -0,0 +1,64 @@ +google.chat.v1.RichLinkMetadata.RichLinkType + */ +class RichLinkType +{ + /** + * Default value for the enum. Don't use. + * + * Generated from protobuf enum RICH_LINK_TYPE_UNSPECIFIED = 0; + */ + const RICH_LINK_TYPE_UNSPECIFIED = 0; + /** + * A Google Drive rich link type. + * + * Generated from protobuf enum DRIVE_FILE = 1; + */ + const DRIVE_FILE = 1; + /** + * A Chat space rich link type. For example, a space smart chip. + * + * Generated from protobuf enum CHAT_SPACE = 2; + */ + const CHAT_SPACE = 2; + + private static $valueToName = [ + self::RICH_LINK_TYPE_UNSPECIFIED => 'RICH_LINK_TYPE_UNSPECIFIED', + self::DRIVE_FILE => 'DRIVE_FILE', + self::CHAT_SPACE => 'CHAT_SPACE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(RichLinkType::class, \Google\Apps\Chat\V1\RichLinkMetadata_RichLinkType::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesRequest.php new file mode 100644 index 000000000000..4be411a8272e --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesRequest.php @@ -0,0 +1,539 @@ +google.chat.v1.SearchSpacesRequest + */ +class SearchSpacesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` + * [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * This method currently only supports admin access, thus only `true` is + * accepted for this field. + * + * Generated from protobuf field bool use_admin_access = 1; + */ + protected $use_admin_access = false; + /** + * The maximum number of spaces to return. The service may return fewer than + * this value. + * If unspecified, at most 100 spaces are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * A token, received from the previous search spaces call. Provide this + * parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Required. A search query. + * You can search by using the following parameters: + * - `create_time` + * - `customer` + * - `display_name` + * - `external_user_allowed` + * - `last_active_time` + * - `space_history_state` + * - `space_type` + * `create_time` and `last_active_time` accept a timestamp in + * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported + * comparison operators are: `=`, `<`, `>`, `<=`, `>=`. + * `customer` is required and is used to indicate which customer + * to fetch spaces from. `customers/my_customer` is the only supported value. + * `display_name` only accepts the `HAS` (`:`) operator. The text to + * match is first tokenized into tokens and each token is prefix-matched + * case-insensitively and independently as a substring anywhere in the space's + * `display_name`. For example, `Fun Eve` matches `Fun event` or `The + * evening was fun`, but not `notFun event` or `even`. + * `external_user_allowed` accepts either `true` or `false`. + * `space_history_state` only accepts values from the [`historyState`] + * (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) + * field of a `space` resource. + * `space_type` is required and the only valid value is `SPACE`. + * Across different fields, only `AND` operators are supported. A valid + * example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid + * example is `space_type = "SPACE" OR display_name:"Hello"`. + * Among the same field, + * `space_type` doesn't support `AND` or `OR` operators. + * `display_name`, 'space_history_state', and 'external_user_allowed' only + * support `OR` operators. + * `last_active_time` and `create_time` support both `AND` and `OR` operators. + * `AND` can only be used to represent an interval, such as `last_active_time + * < "2022-01-01T00:00:00+00:00" AND last_active_time > + * "2023-01-01T00:00:00+00:00"`. + * The following example queries are valid: + * ``` + * customer = "customers/my_customer" AND space_type = "SPACE" + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * display_name:"Hello World" + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > + * "2022-01-01T00:00:00+00:00") + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (display_name:"Hello World" OR display_name:"Fun event") AND + * (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < + * "2022-01-01T00:00:00+00:00") + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (create_time > "2019-01-01T00:00:00+00:00" AND create_time < + * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND + * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") + * ``` + * + * Generated from protobuf field string query = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $query = ''; + /** + * Optional. How the list of spaces is ordered. + * Supported attributes to order by are: + * - `membership_count.joined_direct_human_user_count` — Denotes the count of + * human users that have directly joined a space. + * - `last_active_time` — Denotes the time when last eligible item is added to + * any topic of this space. + * - `create_time` — Denotes the time of the space creation. + * Valid ordering operation values are: + * - `ASC` for ascending. Default value. + * - `DESC` for descending. + * The supported syntax are: + * - `membership_count.joined_direct_human_user_count DESC` + * - `membership_count.joined_direct_human_user_count ASC` + * - `last_active_time DESC` + * - `last_active_time ASC` + * - `create_time DESC` + * - `create_time ASC` + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $order_by = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $use_admin_access + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` + * [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * This method currently only supports admin access, thus only `true` is + * accepted for this field. + * @type int $page_size + * The maximum number of spaces to return. The service may return fewer than + * this value. + * If unspecified, at most 100 spaces are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * @type string $page_token + * A token, received from the previous search spaces call. Provide this + * parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * @type string $query + * Required. A search query. + * You can search by using the following parameters: + * - `create_time` + * - `customer` + * - `display_name` + * - `external_user_allowed` + * - `last_active_time` + * - `space_history_state` + * - `space_type` + * `create_time` and `last_active_time` accept a timestamp in + * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported + * comparison operators are: `=`, `<`, `>`, `<=`, `>=`. + * `customer` is required and is used to indicate which customer + * to fetch spaces from. `customers/my_customer` is the only supported value. + * `display_name` only accepts the `HAS` (`:`) operator. The text to + * match is first tokenized into tokens and each token is prefix-matched + * case-insensitively and independently as a substring anywhere in the space's + * `display_name`. For example, `Fun Eve` matches `Fun event` or `The + * evening was fun`, but not `notFun event` or `even`. + * `external_user_allowed` accepts either `true` or `false`. + * `space_history_state` only accepts values from the [`historyState`] + * (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) + * field of a `space` resource. + * `space_type` is required and the only valid value is `SPACE`. + * Across different fields, only `AND` operators are supported. A valid + * example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid + * example is `space_type = "SPACE" OR display_name:"Hello"`. + * Among the same field, + * `space_type` doesn't support `AND` or `OR` operators. + * `display_name`, 'space_history_state', and 'external_user_allowed' only + * support `OR` operators. + * `last_active_time` and `create_time` support both `AND` and `OR` operators. + * `AND` can only be used to represent an interval, such as `last_active_time + * < "2022-01-01T00:00:00+00:00" AND last_active_time > + * "2023-01-01T00:00:00+00:00"`. + * The following example queries are valid: + * ``` + * customer = "customers/my_customer" AND space_type = "SPACE" + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * display_name:"Hello World" + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > + * "2022-01-01T00:00:00+00:00") + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (display_name:"Hello World" OR display_name:"Fun event") AND + * (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < + * "2022-01-01T00:00:00+00:00") + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (create_time > "2019-01-01T00:00:00+00:00" AND create_time < + * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND + * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") + * ``` + * @type string $order_by + * Optional. How the list of spaces is ordered. + * Supported attributes to order by are: + * - `membership_count.joined_direct_human_user_count` — Denotes the count of + * human users that have directly joined a space. + * - `last_active_time` — Denotes the time when last eligible item is added to + * any topic of this space. + * - `create_time` — Denotes the time of the space creation. + * Valid ordering operation values are: + * - `ASC` for ascending. Default value. + * - `DESC` for descending. + * The supported syntax are: + * - `membership_count.joined_direct_human_user_count DESC` + * - `membership_count.joined_direct_human_user_count ASC` + * - `last_active_time DESC` + * - `last_active_time ASC` + * - `create_time DESC` + * - `create_time ASC` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` + * [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * This method currently only supports admin access, thus only `true` is + * accepted for this field. + * + * Generated from protobuf field bool use_admin_access = 1; + * @return bool + */ + public function getUseAdminAccess() + { + return $this->use_admin_access; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` + * [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * This method currently only supports admin access, thus only `true` is + * accepted for this field. + * + * Generated from protobuf field bool use_admin_access = 1; + * @param bool $var + * @return $this + */ + public function setUseAdminAccess($var) + { + GPBUtil::checkBool($var); + $this->use_admin_access = $var; + + return $this; + } + + /** + * The maximum number of spaces to return. The service may return fewer than + * this value. + * If unspecified, at most 100 spaces are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * The maximum number of spaces to return. The service may return fewer than + * this value. + * If unspecified, at most 100 spaces are returned. + * The maximum value is 1000. If you use a value more than 1000, it's + * automatically changed to 1000. + * + * 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, received from the previous search spaces call. Provide this + * parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * A token, received from the previous search spaces call. Provide this + * parameter to retrieve the subsequent page. + * When paginating, all other parameters provided should match the call that + * provided the page token. Passing different values to the other parameters + * might lead to unexpected results. + * + * 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; + } + + /** + * Required. A search query. + * You can search by using the following parameters: + * - `create_time` + * - `customer` + * - `display_name` + * - `external_user_allowed` + * - `last_active_time` + * - `space_history_state` + * - `space_type` + * `create_time` and `last_active_time` accept a timestamp in + * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported + * comparison operators are: `=`, `<`, `>`, `<=`, `>=`. + * `customer` is required and is used to indicate which customer + * to fetch spaces from. `customers/my_customer` is the only supported value. + * `display_name` only accepts the `HAS` (`:`) operator. The text to + * match is first tokenized into tokens and each token is prefix-matched + * case-insensitively and independently as a substring anywhere in the space's + * `display_name`. For example, `Fun Eve` matches `Fun event` or `The + * evening was fun`, but not `notFun event` or `even`. + * `external_user_allowed` accepts either `true` or `false`. + * `space_history_state` only accepts values from the [`historyState`] + * (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) + * field of a `space` resource. + * `space_type` is required and the only valid value is `SPACE`. + * Across different fields, only `AND` operators are supported. A valid + * example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid + * example is `space_type = "SPACE" OR display_name:"Hello"`. + * Among the same field, + * `space_type` doesn't support `AND` or `OR` operators. + * `display_name`, 'space_history_state', and 'external_user_allowed' only + * support `OR` operators. + * `last_active_time` and `create_time` support both `AND` and `OR` operators. + * `AND` can only be used to represent an interval, such as `last_active_time + * < "2022-01-01T00:00:00+00:00" AND last_active_time > + * "2023-01-01T00:00:00+00:00"`. + * The following example queries are valid: + * ``` + * customer = "customers/my_customer" AND space_type = "SPACE" + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * display_name:"Hello World" + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > + * "2022-01-01T00:00:00+00:00") + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (display_name:"Hello World" OR display_name:"Fun event") AND + * (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < + * "2022-01-01T00:00:00+00:00") + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (create_time > "2019-01-01T00:00:00+00:00" AND create_time < + * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND + * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") + * ``` + * + * Generated from protobuf field string query = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getQuery() + { + return $this->query; + } + + /** + * Required. A search query. + * You can search by using the following parameters: + * - `create_time` + * - `customer` + * - `display_name` + * - `external_user_allowed` + * - `last_active_time` + * - `space_history_state` + * - `space_type` + * `create_time` and `last_active_time` accept a timestamp in + * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported + * comparison operators are: `=`, `<`, `>`, `<=`, `>=`. + * `customer` is required and is used to indicate which customer + * to fetch spaces from. `customers/my_customer` is the only supported value. + * `display_name` only accepts the `HAS` (`:`) operator. The text to + * match is first tokenized into tokens and each token is prefix-matched + * case-insensitively and independently as a substring anywhere in the space's + * `display_name`. For example, `Fun Eve` matches `Fun event` or `The + * evening was fun`, but not `notFun event` or `even`. + * `external_user_allowed` accepts either `true` or `false`. + * `space_history_state` only accepts values from the [`historyState`] + * (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) + * field of a `space` resource. + * `space_type` is required and the only valid value is `SPACE`. + * Across different fields, only `AND` operators are supported. A valid + * example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid + * example is `space_type = "SPACE" OR display_name:"Hello"`. + * Among the same field, + * `space_type` doesn't support `AND` or `OR` operators. + * `display_name`, 'space_history_state', and 'external_user_allowed' only + * support `OR` operators. + * `last_active_time` and `create_time` support both `AND` and `OR` operators. + * `AND` can only be used to represent an interval, such as `last_active_time + * < "2022-01-01T00:00:00+00:00" AND last_active_time > + * "2023-01-01T00:00:00+00:00"`. + * The following example queries are valid: + * ``` + * customer = "customers/my_customer" AND space_type = "SPACE" + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * display_name:"Hello World" + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > + * "2022-01-01T00:00:00+00:00") + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (display_name:"Hello World" OR display_name:"Fun event") AND + * (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < + * "2022-01-01T00:00:00+00:00") + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (create_time > "2019-01-01T00:00:00+00:00" AND create_time < + * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND + * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") + * ``` + * + * Generated from protobuf field string query = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setQuery($var) + { + GPBUtil::checkString($var, True); + $this->query = $var; + + return $this; + } + + /** + * Optional. How the list of spaces is ordered. + * Supported attributes to order by are: + * - `membership_count.joined_direct_human_user_count` — Denotes the count of + * human users that have directly joined a space. + * - `last_active_time` — Denotes the time when last eligible item is added to + * any topic of this space. + * - `create_time` — Denotes the time of the space creation. + * Valid ordering operation values are: + * - `ASC` for ascending. Default value. + * - `DESC` for descending. + * The supported syntax are: + * - `membership_count.joined_direct_human_user_count DESC` + * - `membership_count.joined_direct_human_user_count ASC` + * - `last_active_time DESC` + * - `last_active_time ASC` + * - `create_time DESC` + * - `create_time ASC` + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getOrderBy() + { + return $this->order_by; + } + + /** + * Optional. How the list of spaces is ordered. + * Supported attributes to order by are: + * - `membership_count.joined_direct_human_user_count` — Denotes the count of + * human users that have directly joined a space. + * - `last_active_time` — Denotes the time when last eligible item is added to + * any topic of this space. + * - `create_time` — Denotes the time of the space creation. + * Valid ordering operation values are: + * - `ASC` for ascending. Default value. + * - `DESC` for descending. + * The supported syntax are: + * - `membership_count.joined_direct_human_user_count DESC` + * - `membership_count.joined_direct_human_user_count ASC` + * - `last_active_time DESC` + * - `last_active_time ASC` + * - `create_time DESC` + * - `create_time ASC` + * + * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setOrderBy($var) + { + GPBUtil::checkString($var, True); + $this->order_by = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesResponse.php new file mode 100644 index 000000000000..abebcdd76299 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesResponse.php @@ -0,0 +1,143 @@ +google.chat.v1.SearchSpacesResponse + */ +class SearchSpacesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * A page of the requested spaces. + * + * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; + */ + private $spaces; + /** + * A token that can be used to retrieve the next page. If this field is empty, + * there are no subsequent pages. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * The total number of spaces that match the query, across all pages. If the + * result is over 10,000 spaces, this value is an estimate. + * + * Generated from protobuf field int32 total_size = 3; + */ + protected $total_size = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Chat\V1\Space>|\Google\Protobuf\Internal\RepeatedField $spaces + * A page of the requested spaces. + * @type string $next_page_token + * A token that can be used to retrieve the next page. If this field is empty, + * there are no subsequent pages. + * @type int $total_size + * The total number of spaces that match the query, across all pages. If the + * result is over 10,000 spaces, this value is an estimate. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * A page of the requested spaces. + * + * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpaces() + { + return $this->spaces; + } + + /** + * A page of the requested spaces. + * + * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; + * @param array<\Google\Apps\Chat\V1\Space>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Space::class); + $this->spaces = $arr; + + return $this; + } + + /** + * A token that can be used to retrieve the next page. If this field is empty, + * 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 that can be used to retrieve the next page. If this field is empty, + * 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; + } + + /** + * The total number of spaces that match the query, across all pages. If the + * result is over 10,000 spaces, this value is an estimate. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * The total number of spaces that match the query, across all pages. If the + * result is over 10,000 spaces, this value is an estimate. + * + * Generated from protobuf field int32 total_size = 3; + * @param int $var + * @return $this + */ + public function setTotalSize($var) + { + GPBUtil::checkInt32($var); + $this->total_size = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SetUpSpaceRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SetUpSpaceRequest.php new file mode 100644 index 000000000000..7f7313f13d2c --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SetUpSpaceRequest.php @@ -0,0 +1,317 @@ +google.chat.v1.SetUpSpaceRequest + */ +class SetUpSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The `Space.spaceType` field is required. + * To create a space, set `Space.spaceType` to `SPACE` and set + * `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when + * setting up a space, try a different `displayName`. An existing space + * within the Google Workspace organization might already use this display + * name. + * To create a group chat, set `Space.spaceType` to + * `GROUP_CHAT`. Don't set `Space.displayName`. + * To create a 1:1 conversation between humans, + * set `Space.spaceType` to `DIRECT_MESSAGE` and set + * `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * To create an 1:1 conversation between a human and the calling Chat app, set + * `Space.spaceType` to `DIRECT_MESSAGE` and + * `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * If a `DIRECT_MESSAGE` space already exists, that space is returned instead + * of creating a new space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $space = null; + /** + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $request_id = ''; + /** + * Optional. The Google Chat users or groups to invite to join the space. Omit + * the calling user, as they are added automatically. + * The set currently allows up to 20 memberships (in addition to the caller). + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. + * For Google group membership, the `Membership.group_member` field must + * contain a `group` with `name` populated (format `groups/{group}`). You + * can only add Google groups when setting `Space.spaceType` to `SPACE`. + * Optional when setting `Space.spaceType` to `SPACE`. + * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at + * least two memberships. + * Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human + * user, along with exactly one membership. + * Must be empty when creating a 1:1 conversation between a human and the + * calling Chat app (when setting `Space.spaceType` to + * `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). + * + * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + private $memberships; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Space $space + * Required. The `Space.spaceType` field is required. + * To create a space, set `Space.spaceType` to `SPACE` and set + * `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when + * setting up a space, try a different `displayName`. An existing space + * within the Google Workspace organization might already use this display + * name. + * To create a group chat, set `Space.spaceType` to + * `GROUP_CHAT`. Don't set `Space.displayName`. + * To create a 1:1 conversation between humans, + * set `Space.spaceType` to `DIRECT_MESSAGE` and set + * `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * To create an 1:1 conversation between a human and the calling Chat app, set + * `Space.spaceType` to `DIRECT_MESSAGE` and + * `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * If a `DIRECT_MESSAGE` space already exists, that space is returned instead + * of creating a new space. + * @type string $request_id + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * @type array<\Google\Apps\Chat\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $memberships + * Optional. The Google Chat users or groups to invite to join the space. Omit + * the calling user, as they are added automatically. + * The set currently allows up to 20 memberships (in addition to the caller). + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. + * For Google group membership, the `Membership.group_member` field must + * contain a `group` with `name` populated (format `groups/{group}`). You + * can only add Google groups when setting `Space.spaceType` to `SPACE`. + * Optional when setting `Space.spaceType` to `SPACE`. + * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at + * least two memberships. + * Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human + * user, along with exactly one membership. + * Must be empty when creating a 1:1 conversation between a human and the + * calling Chat app (when setting `Space.spaceType` to + * `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceSetup::initOnce(); + parent::__construct($data); + } + + /** + * Required. The `Space.spaceType` field is required. + * To create a space, set `Space.spaceType` to `SPACE` and set + * `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when + * setting up a space, try a different `displayName`. An existing space + * within the Google Workspace organization might already use this display + * name. + * To create a group chat, set `Space.spaceType` to + * `GROUP_CHAT`. Don't set `Space.displayName`. + * To create a 1:1 conversation between humans, + * set `Space.spaceType` to `DIRECT_MESSAGE` and set + * `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * To create an 1:1 conversation between a human and the calling Chat app, set + * `Space.spaceType` to `DIRECT_MESSAGE` and + * `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * If a `DIRECT_MESSAGE` space already exists, that space is returned instead + * of creating a new space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * Required. The `Space.spaceType` field is required. + * To create a space, set `Space.spaceType` to `SPACE` and set + * `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when + * setting up a space, try a different `displayName`. An existing space + * within the Google Workspace organization might already use this display + * name. + * To create a group chat, set `Space.spaceType` to + * `GROUP_CHAT`. Don't set `Space.displayName`. + * To create a 1:1 conversation between humans, + * set `Space.spaceType` to `DIRECT_MESSAGE` and set + * `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * To create an 1:1 conversation between a human and the calling Chat app, set + * `Space.spaceType` to `DIRECT_MESSAGE` and + * `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or + * `Space.spaceDetails`. + * If a `DIRECT_MESSAGE` space already exists, that space is returned instead + * of creating a new space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); + $this->space = $var; + + return $this; + } + + /** + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getRequestId() + { + return $this->request_id; + } + + /** + * Optional. A unique identifier for this request. + * A random UUID is recommended. + * Specifying an existing request ID returns the space created with that ID + * instead of creating a new space. + * Specifying an existing request ID from the same Chat app with a different + * authenticated user returns an error. + * + * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setRequestId($var) + { + GPBUtil::checkString($var, True); + $this->request_id = $var; + + return $this; + } + + /** + * Optional. The Google Chat users or groups to invite to join the space. Omit + * the calling user, as they are added automatically. + * The set currently allows up to 20 memberships (in addition to the caller). + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. + * For Google group membership, the `Membership.group_member` field must + * contain a `group` with `name` populated (format `groups/{group}`). You + * can only add Google groups when setting `Space.spaceType` to `SPACE`. + * Optional when setting `Space.spaceType` to `SPACE`. + * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at + * least two memberships. + * Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human + * user, along with exactly one membership. + * Must be empty when creating a 1:1 conversation between a human and the + * calling Chat app (when setting `Space.spaceType` to + * `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). + * + * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getMemberships() + { + return $this->memberships; + } + + /** + * Optional. The Google Chat users or groups to invite to join the space. Omit + * the calling user, as they are added automatically. + * The set currently allows up to 20 memberships (in addition to the caller). + * For human membership, the `Membership.member` field must contain a `user` + * with `name` populated (format: `users/{user}`) and `type` set to + * `User.Type.HUMAN`. You can only add human users when setting up a space + * (adding Chat apps is only supported for direct message setup with the + * calling app). You can also add members using the user's email as an alias + * for {user}. For example, the `user.name` can be `users/example@gmail.com`. + * To invite Gmail users or users from external Google Workspace domains, + * user's email must be used for `{user}`. + * For Google group membership, the `Membership.group_member` field must + * contain a `group` with `name` populated (format `groups/{group}`). You + * can only add Google groups when setting `Space.spaceType` to `SPACE`. + * Optional when setting `Space.spaceType` to `SPACE`. + * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at + * least two memberships. + * Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human + * user, along with exactly one membership. + * Must be empty when creating a 1:1 conversation between a human and the + * calling Chat app (when setting `Space.spaceType` to + * `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). + * + * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param array<\Google\Apps\Chat\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setMemberships($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Membership::class); + $this->memberships = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommand.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommand.php new file mode 100644 index 000000000000..07f44423d3b2 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommand.php @@ -0,0 +1,69 @@ +google.chat.v1.SlashCommand + */ +class SlashCommand extends \Google\Protobuf\Internal\Message +{ + /** + * The ID of the slash command invoked. + * + * Generated from protobuf field int64 command_id = 1; + */ + protected $command_id = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int|string $command_id + * The ID of the slash command invoked. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SlashCommand::initOnce(); + parent::__construct($data); + } + + /** + * The ID of the slash command invoked. + * + * Generated from protobuf field int64 command_id = 1; + * @return int|string + */ + public function getCommandId() + { + return $this->command_id; + } + + /** + * The ID of the slash command invoked. + * + * Generated from protobuf field int64 command_id = 1; + * @param int|string $var + * @return $this + */ + public function setCommandId($var) + { + GPBUtil::checkInt64($var); + $this->command_id = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata.php new file mode 100644 index 000000000000..316532e5b3ee --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata.php @@ -0,0 +1,213 @@ +google.chat.v1.SlashCommandMetadata + */ +class SlashCommandMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The Chat app whose command was invoked. + * + * Generated from protobuf field .google.chat.v1.User bot = 1; + */ + protected $bot = null; + /** + * The type of slash command. + * + * Generated from protobuf field .google.chat.v1.SlashCommandMetadata.Type type = 2; + */ + protected $type = 0; + /** + * The name of the invoked slash command. + * + * Generated from protobuf field string command_name = 3; + */ + protected $command_name = ''; + /** + * The command ID of the invoked slash command. + * + * Generated from protobuf field int64 command_id = 4; + */ + protected $command_id = 0; + /** + * Indicates whether the slash command is for a dialog. + * + * Generated from protobuf field bool triggers_dialog = 5; + */ + protected $triggers_dialog = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\User $bot + * The Chat app whose command was invoked. + * @type int $type + * The type of slash command. + * @type string $command_name + * The name of the invoked slash command. + * @type int|string $command_id + * The command ID of the invoked slash command. + * @type bool $triggers_dialog + * Indicates whether the slash command is for a dialog. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); + parent::__construct($data); + } + + /** + * The Chat app whose command was invoked. + * + * Generated from protobuf field .google.chat.v1.User bot = 1; + * @return \Google\Apps\Chat\V1\User|null + */ + public function getBot() + { + return $this->bot; + } + + public function hasBot() + { + return isset($this->bot); + } + + public function clearBot() + { + unset($this->bot); + } + + /** + * The Chat app whose command was invoked. + * + * Generated from protobuf field .google.chat.v1.User bot = 1; + * @param \Google\Apps\Chat\V1\User $var + * @return $this + */ + public function setBot($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); + $this->bot = $var; + + return $this; + } + + /** + * The type of slash command. + * + * Generated from protobuf field .google.chat.v1.SlashCommandMetadata.Type type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of slash command. + * + * Generated from protobuf field .google.chat.v1.SlashCommandMetadata.Type type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\SlashCommandMetadata\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The name of the invoked slash command. + * + * Generated from protobuf field string command_name = 3; + * @return string + */ + public function getCommandName() + { + return $this->command_name; + } + + /** + * The name of the invoked slash command. + * + * Generated from protobuf field string command_name = 3; + * @param string $var + * @return $this + */ + public function setCommandName($var) + { + GPBUtil::checkString($var, True); + $this->command_name = $var; + + return $this; + } + + /** + * The command ID of the invoked slash command. + * + * Generated from protobuf field int64 command_id = 4; + * @return int|string + */ + public function getCommandId() + { + return $this->command_id; + } + + /** + * The command ID of the invoked slash command. + * + * Generated from protobuf field int64 command_id = 4; + * @param int|string $var + * @return $this + */ + public function setCommandId($var) + { + GPBUtil::checkInt64($var); + $this->command_id = $var; + + return $this; + } + + /** + * Indicates whether the slash command is for a dialog. + * + * Generated from protobuf field bool triggers_dialog = 5; + * @return bool + */ + public function getTriggersDialog() + { + return $this->triggers_dialog; + } + + /** + * Indicates whether the slash command is for a dialog. + * + * Generated from protobuf field bool triggers_dialog = 5; + * @param bool $var + * @return $this + */ + public function setTriggersDialog($var) + { + GPBUtil::checkBool($var); + $this->triggers_dialog = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata/Type.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata/Type.php new file mode 100644 index 000000000000..a85da5995578 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata/Type.php @@ -0,0 +1,62 @@ +google.chat.v1.SlashCommandMetadata.Type + */ +class Type +{ + /** + * Default value for the enum. Don't use. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Add Chat app to space. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * Invoke slash command in space. + * + * Generated from protobuf enum INVOKE = 2; + */ + const INVOKE = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::ADD => 'ADD', + self::INVOKE => 'INVOKE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Apps\Chat\V1\SlashCommandMetadata_Type::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space.php new file mode 100644 index 000000000000..9fe556109f1e --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space.php @@ -0,0 +1,978 @@ +google.chat.v1.Space + */ +class Space extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the space. + * Format: `spaces/{space}` + * Where `{space}` represents the system-assigned ID for the space. You can + * obtain the space ID by calling the + * [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) + * method or from the space URL. For example, if the space URL + * is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID + * is `AAAAAAAAA`. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. Deprecated: Use `space_type` instead. + * The type of a space. + * + * Generated from protobuf field .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $type = 0; + /** + * The type of space. Required when creating a space or updating the space + * type of a space. Output only for other usage. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceType space_type = 10; + */ + protected $space_type = 0; + /** + * Optional. Whether the space is a DM between a Chat app and a single + * human. + * + * Generated from protobuf field bool single_user_bot_dm = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $single_user_bot_dm = false; + /** + * Output only. Deprecated: Use `spaceThreadingState` instead. + * Whether messages are threaded in this space. + * + * Generated from protobuf field bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @deprecated + */ + protected $threaded = false; + /** + * The space's display name. Required when [creating a + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) + * with a `spaceType` of `SPACE`. If you receive the error message + * `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a + * different `displayName`. An existing space within the Google Workspace + * organization might already use this display name. + * For direct messages, this field might be empty. + * Supports up to 128 characters. + * + * Generated from protobuf field string display_name = 3; + */ + protected $display_name = ''; + /** + * Immutable. Whether this space permits any Google Chat user as a member. + * Input when creating a space in a Google Workspace organization. Omit this + * field when creating spaces in the following conditions: + * * The authenticated user uses a consumer account (unmanaged user + * account). By default, a space created by a consumer account permits any + * Google Chat user. + * For existing spaces, this field is output only. + * + * Generated from protobuf field bool external_user_allowed = 8 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $external_user_allowed = false; + /** + * Output only. The threading state in the Chat space. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $space_threading_state = 0; + /** + * Details about the space including description and rules. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceDetails space_details = 11; + */ + protected $space_details = null; + /** + * The message history state for messages and threads in this space. + * + * Generated from protobuf field .google.chat.v1.HistoryState space_history_state = 13; + */ + protected $space_history_state = 0; + /** + * Optional. Whether this space is created in `Import Mode` as part of a data + * migration into Google Workspace. While spaces are being imported, they + * aren't visible to users until the import is complete. + * + * Generated from protobuf field bool import_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $import_mode = false; + /** + * Optional. Immutable. For spaces created in Chat, the time the space was + * created. This field is output only, except when used in import mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the space was created in the source in order to preserve the original + * creation time. + * Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + */ + protected $create_time = null; + /** + * Output only. Timestamp of the last message in the space. + * + * Generated from protobuf field .google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $last_active_time = null; + /** + * Output only. For direct message (DM) spaces with a Chat app, whether the + * space was created by a Google Workspace administrator. Administrators can + * install and set up a direct message with a Chat app on behalf of users in + * their organization. + * To support admin install, your Chat app must feature direct messaging. + * + * Generated from protobuf field bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $admin_installed = false; + /** + * Output only. The count of joined memberships grouped by member type. + * Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or + * `GROUP_CHAT`. + * + * Generated from protobuf field .google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $membership_count = null; + /** + * Optional. Specifies the [access + * setting](https://support.google.com/chat/answer/11971020) of the space. + * Only populated when the `space_type` is `SPACE`. + * + * Generated from protobuf field .google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $access_settings = null; + /** + * Output only. The URI for a user to access the space. + * + * Generated from protobuf field string space_uri = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $space_uri = ''; + /** + * Output only. The time when the space will be automatically deleted by the + * system if it remains in import mode. + * Each space created in import mode must exit this mode before this expire + * time using `spaces.completeImport`. + * This field is only populated for spaces that were created with import mode. + * + * Generated from protobuf field .google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $import_mode_expire_time = null; + protected $space_permission_settings; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the space. + * Format: `spaces/{space}` + * Where `{space}` represents the system-assigned ID for the space. You can + * obtain the space ID by calling the + * [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) + * method or from the space URL. For example, if the space URL + * is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID + * is `AAAAAAAAA`. + * @type int $type + * Output only. Deprecated: Use `space_type` instead. + * The type of a space. + * @type int $space_type + * The type of space. Required when creating a space or updating the space + * type of a space. Output only for other usage. + * @type bool $single_user_bot_dm + * Optional. Whether the space is a DM between a Chat app and a single + * human. + * @type bool $threaded + * Output only. Deprecated: Use `spaceThreadingState` instead. + * Whether messages are threaded in this space. + * @type string $display_name + * The space's display name. Required when [creating a + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) + * with a `spaceType` of `SPACE`. If you receive the error message + * `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a + * different `displayName`. An existing space within the Google Workspace + * organization might already use this display name. + * For direct messages, this field might be empty. + * Supports up to 128 characters. + * @type bool $external_user_allowed + * Immutable. Whether this space permits any Google Chat user as a member. + * Input when creating a space in a Google Workspace organization. Omit this + * field when creating spaces in the following conditions: + * * The authenticated user uses a consumer account (unmanaged user + * account). By default, a space created by a consumer account permits any + * Google Chat user. + * For existing spaces, this field is output only. + * @type int $space_threading_state + * Output only. The threading state in the Chat space. + * @type \Google\Apps\Chat\V1\Space\SpaceDetails $space_details + * Details about the space including description and rules. + * @type int $space_history_state + * The message history state for messages and threads in this space. + * @type bool $import_mode + * Optional. Whether this space is created in `Import Mode` as part of a data + * migration into Google Workspace. While spaces are being imported, they + * aren't visible to users until the import is complete. + * @type \Google\Protobuf\Timestamp $create_time + * Optional. Immutable. For spaces created in Chat, the time the space was + * created. This field is output only, except when used in import mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the space was created in the source in order to preserve the original + * creation time. + * Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. + * @type \Google\Protobuf\Timestamp $last_active_time + * Output only. Timestamp of the last message in the space. + * @type bool $admin_installed + * Output only. For direct message (DM) spaces with a Chat app, whether the + * space was created by a Google Workspace administrator. Administrators can + * install and set up a direct message with a Chat app on behalf of users in + * their organization. + * To support admin install, your Chat app must feature direct messaging. + * @type \Google\Apps\Chat\V1\Space\MembershipCount $membership_count + * Output only. The count of joined memberships grouped by member type. + * Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or + * `GROUP_CHAT`. + * @type \Google\Apps\Chat\V1\Space\AccessSettings $access_settings + * Optional. Specifies the [access + * setting](https://support.google.com/chat/answer/11971020) of the space. + * Only populated when the `space_type` is `SPACE`. + * @type string $space_uri + * Output only. The URI for a user to access the space. + * @type int $predefined_permission_settings + * Optional. Input only. Predefined space permission settings, input only + * when creating a space. If the field is not set, a collaboration space is + * created. After you create the space, settings are populated in the + * `PermissionSettings` field. + * @type \Google\Apps\Chat\V1\Space\PermissionSettings $permission_settings + * Optional. Space permission settings for existing spaces. Input for + * updating exact space permission settings, where existing permission + * settings are replaced. Output lists current permission settings. + * @type \Google\Protobuf\Timestamp $import_mode_expire_time + * Output only. The time when the space will be automatically deleted by the + * system if it remains in import mode. + * Each space created in import mode must exit this mode before this expire + * time using `spaces.completeImport`. + * This field is only populated for spaces that were created with import mode. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the space. + * Format: `spaces/{space}` + * Where `{space}` represents the system-assigned ID for the space. You can + * obtain the space ID by calling the + * [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) + * method or from the space URL. For example, if the space URL + * is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID + * is `AAAAAAAAA`. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the space. + * Format: `spaces/{space}` + * Where `{space}` represents the system-assigned ID for the space. You can + * obtain the space ID by calling the + * [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) + * method or from the space URL. For example, if the space URL + * is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID + * is `AAAAAAAAA`. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Deprecated: Use `space_type` instead. + * The type of a space. + * + * Generated from protobuf field .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + * @deprecated + */ + public function getType() + { + @trigger_error('type is deprecated.', E_USER_DEPRECATED); + return $this->type; + } + + /** + * Output only. Deprecated: Use `space_type` instead. + * The type of a space. + * + * Generated from protobuf field .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + * @deprecated + */ + public function setType($var) + { + @trigger_error('type is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\Type::class); + $this->type = $var; + + return $this; + } + + /** + * The type of space. Required when creating a space or updating the space + * type of a space. Output only for other usage. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceType space_type = 10; + * @return int + */ + public function getSpaceType() + { + return $this->space_type; + } + + /** + * The type of space. Required when creating a space or updating the space + * type of a space. Output only for other usage. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceType space_type = 10; + * @param int $var + * @return $this + */ + public function setSpaceType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\SpaceType::class); + $this->space_type = $var; + + return $this; + } + + /** + * Optional. Whether the space is a DM between a Chat app and a single + * human. + * + * Generated from protobuf field bool single_user_bot_dm = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getSingleUserBotDm() + { + return $this->single_user_bot_dm; + } + + /** + * Optional. Whether the space is a DM between a Chat app and a single + * human. + * + * Generated from protobuf field bool single_user_bot_dm = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setSingleUserBotDm($var) + { + GPBUtil::checkBool($var); + $this->single_user_bot_dm = $var; + + return $this; + } + + /** + * Output only. Deprecated: Use `spaceThreadingState` instead. + * Whether messages are threaded in this space. + * + * Generated from protobuf field bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + * @deprecated + */ + public function getThreaded() + { + @trigger_error('threaded is deprecated.', E_USER_DEPRECATED); + return $this->threaded; + } + + /** + * Output only. Deprecated: Use `spaceThreadingState` instead. + * Whether messages are threaded in this space. + * + * Generated from protobuf field bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + * @deprecated + */ + public function setThreaded($var) + { + @trigger_error('threaded is deprecated.', E_USER_DEPRECATED); + GPBUtil::checkBool($var); + $this->threaded = $var; + + return $this; + } + + /** + * The space's display name. Required when [creating a + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) + * with a `spaceType` of `SPACE`. If you receive the error message + * `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a + * different `displayName`. An existing space within the Google Workspace + * organization might already use this display name. + * For direct messages, this field might be empty. + * Supports up to 128 characters. + * + * Generated from protobuf field string display_name = 3; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * The space's display name. Required when [creating a + * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) + * with a `spaceType` of `SPACE`. If you receive the error message + * `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a + * different `displayName`. An existing space within the Google Workspace + * organization might already use this display name. + * For direct messages, this field might be empty. + * Supports up to 128 characters. + * + * Generated from protobuf field string display_name = 3; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Immutable. Whether this space permits any Google Chat user as a member. + * Input when creating a space in a Google Workspace organization. Omit this + * field when creating spaces in the following conditions: + * * The authenticated user uses a consumer account (unmanaged user + * account). By default, a space created by a consumer account permits any + * Google Chat user. + * For existing spaces, this field is output only. + * + * Generated from protobuf field bool external_user_allowed = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * @return bool + */ + public function getExternalUserAllowed() + { + return $this->external_user_allowed; + } + + /** + * Immutable. Whether this space permits any Google Chat user as a member. + * Input when creating a space in a Google Workspace organization. Omit this + * field when creating spaces in the following conditions: + * * The authenticated user uses a consumer account (unmanaged user + * account). By default, a space created by a consumer account permits any + * Google Chat user. + * For existing spaces, this field is output only. + * + * Generated from protobuf field bool external_user_allowed = 8 [(.google.api.field_behavior) = IMMUTABLE]; + * @param bool $var + * @return $this + */ + public function setExternalUserAllowed($var) + { + GPBUtil::checkBool($var); + $this->external_user_allowed = $var; + + return $this; + } + + /** + * Output only. The threading state in the Chat space. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getSpaceThreadingState() + { + return $this->space_threading_state; + } + + /** + * Output only. The threading state in the Chat space. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setSpaceThreadingState($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\SpaceThreadingState::class); + $this->space_threading_state = $var; + + return $this; + } + + /** + * Details about the space including description and rules. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceDetails space_details = 11; + * @return \Google\Apps\Chat\V1\Space\SpaceDetails|null + */ + public function getSpaceDetails() + { + return $this->space_details; + } + + public function hasSpaceDetails() + { + return isset($this->space_details); + } + + public function clearSpaceDetails() + { + unset($this->space_details); + } + + /** + * Details about the space including description and rules. + * + * Generated from protobuf field .google.chat.v1.Space.SpaceDetails space_details = 11; + * @param \Google\Apps\Chat\V1\Space\SpaceDetails $var + * @return $this + */ + public function setSpaceDetails($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\SpaceDetails::class); + $this->space_details = $var; + + return $this; + } + + /** + * The message history state for messages and threads in this space. + * + * Generated from protobuf field .google.chat.v1.HistoryState space_history_state = 13; + * @return int + */ + public function getSpaceHistoryState() + { + return $this->space_history_state; + } + + /** + * The message history state for messages and threads in this space. + * + * Generated from protobuf field .google.chat.v1.HistoryState space_history_state = 13; + * @param int $var + * @return $this + */ + public function setSpaceHistoryState($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\HistoryState::class); + $this->space_history_state = $var; + + return $this; + } + + /** + * Optional. Whether this space is created in `Import Mode` as part of a data + * migration into Google Workspace. While spaces are being imported, they + * aren't visible to users until the import is complete. + * + * Generated from protobuf field bool import_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getImportMode() + { + return $this->import_mode; + } + + /** + * Optional. Whether this space is created in `Import Mode` as part of a data + * migration into Google Workspace. While spaces are being imported, they + * aren't visible to users until the import is complete. + * + * Generated from protobuf field bool import_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setImportMode($var) + { + GPBUtil::checkBool($var); + $this->import_mode = $var; + + return $this; + } + + /** + * Optional. Immutable. For spaces created in Chat, the time the space was + * created. This field is output only, except when used in import mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the space was created in the source in order to preserve the original + * creation time. + * Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @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); + } + + /** + * Optional. Immutable. For spaces created in Chat, the time the space was + * created. This field is output only, except when used in import mode spaces. + * For import mode spaces, set this field to the historical timestamp at which + * the space was created in the source in order to preserve the original + * creation time. + * Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. + * + * Generated from protobuf field .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; + * @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. Timestamp of the last message in the space. + * + * Generated from protobuf field .google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastActiveTime() + { + return $this->last_active_time; + } + + public function hasLastActiveTime() + { + return isset($this->last_active_time); + } + + public function clearLastActiveTime() + { + unset($this->last_active_time); + } + + /** + * Output only. Timestamp of the last message in the space. + * + * Generated from protobuf field .google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastActiveTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_active_time = $var; + + return $this; + } + + /** + * Output only. For direct message (DM) spaces with a Chat app, whether the + * space was created by a Google Workspace administrator. Administrators can + * install and set up a direct message with a Chat app on behalf of users in + * their organization. + * To support admin install, your Chat app must feature direct messaging. + * + * Generated from protobuf field bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getAdminInstalled() + { + return $this->admin_installed; + } + + /** + * Output only. For direct message (DM) spaces with a Chat app, whether the + * space was created by a Google Workspace administrator. Administrators can + * install and set up a direct message with a Chat app on behalf of users in + * their organization. + * To support admin install, your Chat app must feature direct messaging. + * + * Generated from protobuf field bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setAdminInstalled($var) + { + GPBUtil::checkBool($var); + $this->admin_installed = $var; + + return $this; + } + + /** + * Output only. The count of joined memberships grouped by member type. + * Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or + * `GROUP_CHAT`. + * + * Generated from protobuf field .google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\Space\MembershipCount|null + */ + public function getMembershipCount() + { + return $this->membership_count; + } + + public function hasMembershipCount() + { + return isset($this->membership_count); + } + + public function clearMembershipCount() + { + unset($this->membership_count); + } + + /** + * Output only. The count of joined memberships grouped by member type. + * Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or + * `GROUP_CHAT`. + * + * Generated from protobuf field .google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\Space\MembershipCount $var + * @return $this + */ + public function setMembershipCount($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\MembershipCount::class); + $this->membership_count = $var; + + return $this; + } + + /** + * Optional. Specifies the [access + * setting](https://support.google.com/chat/answer/11971020) of the space. + * Only populated when the `space_type` is `SPACE`. + * + * Generated from protobuf field .google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Apps\Chat\V1\Space\AccessSettings|null + */ + public function getAccessSettings() + { + return $this->access_settings; + } + + public function hasAccessSettings() + { + return isset($this->access_settings); + } + + public function clearAccessSettings() + { + unset($this->access_settings); + } + + /** + * Optional. Specifies the [access + * setting](https://support.google.com/chat/answer/11971020) of the space. + * Only populated when the `space_type` is `SPACE`. + * + * Generated from protobuf field .google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Apps\Chat\V1\Space\AccessSettings $var + * @return $this + */ + public function setAccessSettings($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\AccessSettings::class); + $this->access_settings = $var; + + return $this; + } + + /** + * Output only. The URI for a user to access the space. + * + * Generated from protobuf field string space_uri = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getSpaceUri() + { + return $this->space_uri; + } + + /** + * Output only. The URI for a user to access the space. + * + * Generated from protobuf field string space_uri = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setSpaceUri($var) + { + GPBUtil::checkString($var, True); + $this->space_uri = $var; + + return $this; + } + + /** + * Optional. Input only. Predefined space permission settings, input only + * when creating a space. If the field is not set, a collaboration space is + * created. After you create the space, settings are populated in the + * `PermissionSettings` field. + * + * Generated from protobuf field .google.chat.v1.Space.PredefinedPermissionSettings predefined_permission_settings = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPredefinedPermissionSettings() + { + return $this->readOneof(26); + } + + public function hasPredefinedPermissionSettings() + { + return $this->hasOneof(26); + } + + /** + * Optional. Input only. Predefined space permission settings, input only + * when creating a space. If the field is not set, a collaboration space is + * created. After you create the space, settings are populated in the + * `PermissionSettings` field. + * + * Generated from protobuf field .google.chat.v1.Space.PredefinedPermissionSettings predefined_permission_settings = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; + * @param int $var + * @return $this + */ + public function setPredefinedPermissionSettings($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\PredefinedPermissionSettings::class); + $this->writeOneof(26, $var); + + return $this; + } + + /** + * Optional. Space permission settings for existing spaces. Input for + * updating exact space permission settings, where existing permission + * settings are replaced. Output lists current permission settings. + * + * Generated from protobuf field .google.chat.v1.Space.PermissionSettings permission_settings = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Apps\Chat\V1\Space\PermissionSettings|null + */ + public function getPermissionSettings() + { + return $this->readOneof(27); + } + + public function hasPermissionSettings() + { + return $this->hasOneof(27); + } + + /** + * Optional. Space permission settings for existing spaces. Input for + * updating exact space permission settings, where existing permission + * settings are replaced. Output lists current permission settings. + * + * Generated from protobuf field .google.chat.v1.Space.PermissionSettings permission_settings = 27 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Apps\Chat\V1\Space\PermissionSettings $var + * @return $this + */ + public function setPermissionSettings($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSettings::class); + $this->writeOneof(27, $var); + + return $this; + } + + /** + * Output only. The time when the space will be automatically deleted by the + * system if it remains in import mode. + * Each space created in import mode must exit this mode before this expire + * time using `spaces.completeImport`. + * This field is only populated for spaces that were created with import mode. + * + * Generated from protobuf field .google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getImportModeExpireTime() + { + return $this->import_mode_expire_time; + } + + public function hasImportModeExpireTime() + { + return isset($this->import_mode_expire_time); + } + + public function clearImportModeExpireTime() + { + unset($this->import_mode_expire_time); + } + + /** + * Output only. The time when the space will be automatically deleted by the + * system if it remains in import mode. + * Each space created in import mode must exit this mode before this expire + * time using `spaces.completeImport`. + * This field is only populated for spaces that were created with import mode. + * + * Generated from protobuf field .google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setImportModeExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->import_mode_expire_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getSpacePermissionSettings() + { + return $this->whichOneof("space_permission_settings"); + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings.php new file mode 100644 index 000000000000..db62121be0a9 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings.php @@ -0,0 +1,149 @@ +google.chat.v1.Space.AccessSettings + */ +class AccessSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Indicates the access state of the space. + * + * Generated from protobuf field .google.chat.v1.Space.AccessSettings.AccessState access_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $access_state = 0; + /** + * Optional. The resource name of the [target + * audience](https://support.google.com/a/answer/9934697) who can discover + * the space, join the space, and preview the messages in the space. If + * unset, only users or Google Groups who have been individually invited or + * added to the space can access it. For details, see [Make a space + * discoverable to a target + * audience](https://developers.google.com/workspace/chat/space-target-audience). + * Format: `audiences/{audience}` + * To use the default target audience for the Google Workspace organization, + * set to `audiences/default`. + * This field is not populated when using the `chat.bot` scope with [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $audience = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $access_state + * Output only. Indicates the access state of the space. + * @type string $audience + * Optional. The resource name of the [target + * audience](https://support.google.com/a/answer/9934697) who can discover + * the space, join the space, and preview the messages in the space. If + * unset, only users or Google Groups who have been individually invited or + * added to the space can access it. For details, see [Make a space + * discoverable to a target + * audience](https://developers.google.com/workspace/chat/space-target-audience). + * Format: `audiences/{audience}` + * To use the default target audience for the Google Workspace organization, + * set to `audiences/default`. + * This field is not populated when using the `chat.bot` scope with [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Indicates the access state of the space. + * + * Generated from protobuf field .google.chat.v1.Space.AccessSettings.AccessState access_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getAccessState() + { + return $this->access_state; + } + + /** + * Output only. Indicates the access state of the space. + * + * Generated from protobuf field .google.chat.v1.Space.AccessSettings.AccessState access_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setAccessState($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\AccessSettings\AccessState::class); + $this->access_state = $var; + + return $this; + } + + /** + * Optional. The resource name of the [target + * audience](https://support.google.com/a/answer/9934697) who can discover + * the space, join the space, and preview the messages in the space. If + * unset, only users or Google Groups who have been individually invited or + * added to the space can access it. For details, see [Make a space + * discoverable to a target + * audience](https://developers.google.com/workspace/chat/space-target-audience). + * Format: `audiences/{audience}` + * To use the default target audience for the Google Workspace organization, + * set to `audiences/default`. + * This field is not populated when using the `chat.bot` scope with [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getAudience() + { + return $this->audience; + } + + /** + * Optional. The resource name of the [target + * audience](https://support.google.com/a/answer/9934697) who can discover + * the space, join the space, and preview the messages in the space. If + * unset, only users or Google Groups who have been individually invited or + * added to the space can access it. For details, see [Make a space + * discoverable to a target + * audience](https://developers.google.com/workspace/chat/space-target-audience). + * Format: `audiences/{audience}` + * To use the default target audience for the Google Workspace organization, + * set to `audiences/default`. + * This field is not populated when using the `chat.bot` scope with [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setAudience($var) + { + GPBUtil::checkString($var, True); + $this->audience = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AccessSettings::class, \Google\Apps\Chat\V1\Space_AccessSettings::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings/AccessState.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings/AccessState.php new file mode 100644 index 000000000000..1bd127c0e95a --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings/AccessState.php @@ -0,0 +1,74 @@ +google.chat.v1.Space.AccessSettings.AccessState + */ +class AccessState +{ + /** + * Access state is unknown or not supported in this API. + * + * Generated from protobuf enum ACCESS_STATE_UNSPECIFIED = 0; + */ + const ACCESS_STATE_UNSPECIFIED = 0; + /** + * Only users or Google Groups that have been individually added or + * invited by other users or Google Workspace administrators can discover + * and access the space. + * + * Generated from protobuf enum PRIVATE = 1; + */ + const PBPRIVATE = 1; + /** + * A space manager has granted a target audience access to + * the space. Users or Google Groups that have been individually added or + * invited to the space can also discover and access the space. To learn + * more, see [Make a space discoverable to specific + * users](https://developers.google.com/workspace/chat/space-target-audience). + * + * Generated from protobuf enum DISCOVERABLE = 2; + */ + const DISCOVERABLE = 2; + + private static $valueToName = [ + self::ACCESS_STATE_UNSPECIFIED => 'ACCESS_STATE_UNSPECIFIED', + self::PBPRIVATE => 'PRIVATE', + self::DISCOVERABLE => 'DISCOVERABLE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(AccessState::class, \Google\Apps\Chat\V1\Space_AccessSettings_AccessState::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/MembershipCount.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/MembershipCount.php new file mode 100644 index 000000000000..44bc280089f5 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/MembershipCount.php @@ -0,0 +1,108 @@ +google.chat.v1.Space.MembershipCount + */ +class MembershipCount extends \Google\Protobuf\Internal\Message +{ + /** + * Count of human users that have directly joined the space, not counting + * users joined by having membership in a joined group. + * + * Generated from protobuf field int32 joined_direct_human_user_count = 4; + */ + protected $joined_direct_human_user_count = 0; + /** + * Count of all groups that have directly joined the space. + * + * Generated from protobuf field int32 joined_group_count = 5; + */ + protected $joined_group_count = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $joined_direct_human_user_count + * Count of human users that have directly joined the space, not counting + * users joined by having membership in a joined group. + * @type int $joined_group_count + * Count of all groups that have directly joined the space. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Count of human users that have directly joined the space, not counting + * users joined by having membership in a joined group. + * + * Generated from protobuf field int32 joined_direct_human_user_count = 4; + * @return int + */ + public function getJoinedDirectHumanUserCount() + { + return $this->joined_direct_human_user_count; + } + + /** + * Count of human users that have directly joined the space, not counting + * users joined by having membership in a joined group. + * + * Generated from protobuf field int32 joined_direct_human_user_count = 4; + * @param int $var + * @return $this + */ + public function setJoinedDirectHumanUserCount($var) + { + GPBUtil::checkInt32($var); + $this->joined_direct_human_user_count = $var; + + return $this; + } + + /** + * Count of all groups that have directly joined the space. + * + * Generated from protobuf field int32 joined_group_count = 5; + * @return int + */ + public function getJoinedGroupCount() + { + return $this->joined_group_count; + } + + /** + * Count of all groups that have directly joined the space. + * + * Generated from protobuf field int32 joined_group_count = 5; + * @param int $var + * @return $this + */ + public function setJoinedGroupCount($var) + { + GPBUtil::checkInt32($var); + $this->joined_group_count = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(MembershipCount::class, \Google\Apps\Chat\V1\Space_MembershipCount::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSetting.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSetting.php new file mode 100644 index 000000000000..7d301395f998 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSetting.php @@ -0,0 +1,104 @@ +google.chat.v1.Space.PermissionSetting + */ +class PermissionSetting extends \Google\Protobuf\Internal\Message +{ + /** + * Whether spaces managers have this permission. + * + * Generated from protobuf field bool managers_allowed = 1; + */ + protected $managers_allowed = false; + /** + * Whether non-manager members have this permission. + * + * Generated from protobuf field bool members_allowed = 2; + */ + protected $members_allowed = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type bool $managers_allowed + * Whether spaces managers have this permission. + * @type bool $members_allowed + * Whether non-manager members have this permission. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Whether spaces managers have this permission. + * + * Generated from protobuf field bool managers_allowed = 1; + * @return bool + */ + public function getManagersAllowed() + { + return $this->managers_allowed; + } + + /** + * Whether spaces managers have this permission. + * + * Generated from protobuf field bool managers_allowed = 1; + * @param bool $var + * @return $this + */ + public function setManagersAllowed($var) + { + GPBUtil::checkBool($var); + $this->managers_allowed = $var; + + return $this; + } + + /** + * Whether non-manager members have this permission. + * + * Generated from protobuf field bool members_allowed = 2; + * @return bool + */ + public function getMembersAllowed() + { + return $this->members_allowed; + } + + /** + * Whether non-manager members have this permission. + * + * Generated from protobuf field bool members_allowed = 2; + * @param bool $var + * @return $this + */ + public function setMembersAllowed($var) + { + GPBUtil::checkBool($var); + $this->members_allowed = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PermissionSetting::class, \Google\Apps\Chat\V1\Space_PermissionSetting::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSettings.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSettings.php new file mode 100644 index 000000000000..3b1999b8dec0 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSettings.php @@ -0,0 +1,391 @@ +google.chat.v1.Space.PermissionSettings + */ +class PermissionSettings extends \Google\Protobuf\Internal\Message +{ + /** + * Setting for managing members and groups in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_members_and_groups = 1; + */ + protected $manage_members_and_groups = null; + /** + * Setting for updating space name, avatar, description and guidelines. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting modify_space_details = 2; + */ + protected $modify_space_details = null; + /** + * Setting for toggling space history on and off. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting toggle_history = 3; + */ + protected $toggle_history = null; + /** + * Setting for using @all in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting use_at_mention_all = 4; + */ + protected $use_at_mention_all = null; + /** + * Setting for managing apps in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_apps = 5; + */ + protected $manage_apps = null; + /** + * Setting for managing webhooks in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_webhooks = 6; + */ + protected $manage_webhooks = null; + /** + * Output only. Setting for posting messages in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting post_messages = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $post_messages = null; + /** + * Setting for replying to messages in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting reply_messages = 8; + */ + protected $reply_messages = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Space\PermissionSetting $manage_members_and_groups + * Setting for managing members and groups in a space. + * @type \Google\Apps\Chat\V1\Space\PermissionSetting $modify_space_details + * Setting for updating space name, avatar, description and guidelines. + * @type \Google\Apps\Chat\V1\Space\PermissionSetting $toggle_history + * Setting for toggling space history on and off. + * @type \Google\Apps\Chat\V1\Space\PermissionSetting $use_at_mention_all + * Setting for using @all in a space. + * @type \Google\Apps\Chat\V1\Space\PermissionSetting $manage_apps + * Setting for managing apps in a space. + * @type \Google\Apps\Chat\V1\Space\PermissionSetting $manage_webhooks + * Setting for managing webhooks in a space. + * @type \Google\Apps\Chat\V1\Space\PermissionSetting $post_messages + * Output only. Setting for posting messages in a space. + * @type \Google\Apps\Chat\V1\Space\PermissionSetting $reply_messages + * Setting for replying to messages in a space. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Setting for managing members and groups in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_members_and_groups = 1; + * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null + */ + public function getManageMembersAndGroups() + { + return $this->manage_members_and_groups; + } + + public function hasManageMembersAndGroups() + { + return isset($this->manage_members_and_groups); + } + + public function clearManageMembersAndGroups() + { + unset($this->manage_members_and_groups); + } + + /** + * Setting for managing members and groups in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_members_and_groups = 1; + * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var + * @return $this + */ + public function setManageMembersAndGroups($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); + $this->manage_members_and_groups = $var; + + return $this; + } + + /** + * Setting for updating space name, avatar, description and guidelines. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting modify_space_details = 2; + * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null + */ + public function getModifySpaceDetails() + { + return $this->modify_space_details; + } + + public function hasModifySpaceDetails() + { + return isset($this->modify_space_details); + } + + public function clearModifySpaceDetails() + { + unset($this->modify_space_details); + } + + /** + * Setting for updating space name, avatar, description and guidelines. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting modify_space_details = 2; + * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var + * @return $this + */ + public function setModifySpaceDetails($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); + $this->modify_space_details = $var; + + return $this; + } + + /** + * Setting for toggling space history on and off. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting toggle_history = 3; + * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null + */ + public function getToggleHistory() + { + return $this->toggle_history; + } + + public function hasToggleHistory() + { + return isset($this->toggle_history); + } + + public function clearToggleHistory() + { + unset($this->toggle_history); + } + + /** + * Setting for toggling space history on and off. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting toggle_history = 3; + * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var + * @return $this + */ + public function setToggleHistory($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); + $this->toggle_history = $var; + + return $this; + } + + /** + * Setting for using @all in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting use_at_mention_all = 4; + * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null + */ + public function getUseAtMentionAll() + { + return $this->use_at_mention_all; + } + + public function hasUseAtMentionAll() + { + return isset($this->use_at_mention_all); + } + + public function clearUseAtMentionAll() + { + unset($this->use_at_mention_all); + } + + /** + * Setting for using @all in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting use_at_mention_all = 4; + * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var + * @return $this + */ + public function setUseAtMentionAll($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); + $this->use_at_mention_all = $var; + + return $this; + } + + /** + * Setting for managing apps in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_apps = 5; + * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null + */ + public function getManageApps() + { + return $this->manage_apps; + } + + public function hasManageApps() + { + return isset($this->manage_apps); + } + + public function clearManageApps() + { + unset($this->manage_apps); + } + + /** + * Setting for managing apps in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_apps = 5; + * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var + * @return $this + */ + public function setManageApps($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); + $this->manage_apps = $var; + + return $this; + } + + /** + * Setting for managing webhooks in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_webhooks = 6; + * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null + */ + public function getManageWebhooks() + { + return $this->manage_webhooks; + } + + public function hasManageWebhooks() + { + return isset($this->manage_webhooks); + } + + public function clearManageWebhooks() + { + unset($this->manage_webhooks); + } + + /** + * Setting for managing webhooks in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_webhooks = 6; + * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var + * @return $this + */ + public function setManageWebhooks($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); + $this->manage_webhooks = $var; + + return $this; + } + + /** + * Output only. Setting for posting messages in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting post_messages = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null + */ + public function getPostMessages() + { + return $this->post_messages; + } + + public function hasPostMessages() + { + return isset($this->post_messages); + } + + public function clearPostMessages() + { + unset($this->post_messages); + } + + /** + * Output only. Setting for posting messages in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting post_messages = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var + * @return $this + */ + public function setPostMessages($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); + $this->post_messages = $var; + + return $this; + } + + /** + * Setting for replying to messages in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting reply_messages = 8; + * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null + */ + public function getReplyMessages() + { + return $this->reply_messages; + } + + public function hasReplyMessages() + { + return isset($this->reply_messages); + } + + public function clearReplyMessages() + { + unset($this->reply_messages); + } + + /** + * Setting for replying to messages in a space. + * + * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting reply_messages = 8; + * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var + * @return $this + */ + public function setReplyMessages($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); + $this->reply_messages = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PermissionSettings::class, \Google\Apps\Chat\V1\Space_PermissionSettings::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PredefinedPermissionSettings.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PredefinedPermissionSettings.php new file mode 100644 index 000000000000..c867f67c55a4 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PredefinedPermissionSettings.php @@ -0,0 +1,69 @@ +google.chat.v1.Space.PredefinedPermissionSettings + */ +class PredefinedPermissionSettings +{ + /** + * Unspecified. Don't use. + * + * Generated from protobuf enum PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED = 0; + */ + const PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED = 0; + /** + * Setting to make the space a collaboration space where all members can + * post messages. + * + * Generated from protobuf enum COLLABORATION_SPACE = 1; + */ + const COLLABORATION_SPACE = 1; + /** + * Setting to make the space an announcement space where only space managers + * can post messages. + * + * Generated from protobuf enum ANNOUNCEMENT_SPACE = 2; + */ + const ANNOUNCEMENT_SPACE = 2; + + private static $valueToName = [ + self::PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED => 'PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED', + self::COLLABORATION_SPACE => 'COLLABORATION_SPACE', + self::ANNOUNCEMENT_SPACE => 'ANNOUNCEMENT_SPACE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(PredefinedPermissionSettings::class, \Google\Apps\Chat\V1\Space_PredefinedPermissionSettings::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceDetails.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceDetails.php new file mode 100644 index 000000000000..56d0208306ee --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceDetails.php @@ -0,0 +1,116 @@ +google.chat.v1.Space.SpaceDetails + */ +class SpaceDetails extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. A description of the space. For example, describe the space's + * discussion topic, functional purpose, or participants. + * Supports up to 150 characters. + * + * Generated from protobuf field string description = 1; + */ + protected $description = ''; + /** + * Optional. The space's rules, expectations, and etiquette. + * Supports up to 5,000 characters. + * + * Generated from protobuf field string guidelines = 2; + */ + protected $guidelines = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $description + * Optional. A description of the space. For example, describe the space's + * discussion topic, functional purpose, or participants. + * Supports up to 150 characters. + * @type string $guidelines + * Optional. The space's rules, expectations, and etiquette. + * Supports up to 5,000 characters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Optional. A description of the space. For example, describe the space's + * discussion topic, functional purpose, or participants. + * Supports up to 150 characters. + * + * Generated from protobuf field string description = 1; + * @return string + */ + public function getDescription() + { + return $this->description; + } + + /** + * Optional. A description of the space. For example, describe the space's + * discussion topic, functional purpose, or participants. + * Supports up to 150 characters. + * + * Generated from protobuf field string description = 1; + * @param string $var + * @return $this + */ + public function setDescription($var) + { + GPBUtil::checkString($var, True); + $this->description = $var; + + return $this; + } + + /** + * Optional. The space's rules, expectations, and etiquette. + * Supports up to 5,000 characters. + * + * Generated from protobuf field string guidelines = 2; + * @return string + */ + public function getGuidelines() + { + return $this->guidelines; + } + + /** + * Optional. The space's rules, expectations, and etiquette. + * Supports up to 5,000 characters. + * + * Generated from protobuf field string guidelines = 2; + * @param string $var + * @return $this + */ + public function setGuidelines($var) + { + GPBUtil::checkString($var, True); + $this->guidelines = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpaceDetails::class, \Google\Apps\Chat\V1\Space_SpaceDetails::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceThreadingState.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceThreadingState.php new file mode 100644 index 000000000000..09b873e2694b --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceThreadingState.php @@ -0,0 +1,75 @@ +google.chat.v1.Space.SpaceThreadingState + */ +class SpaceThreadingState +{ + /** + * Reserved. + * + * Generated from protobuf enum SPACE_THREADING_STATE_UNSPECIFIED = 0; + */ + const SPACE_THREADING_STATE_UNSPECIFIED = 0; + /** + * Named spaces that support message threads. When users respond to a + * message, they can reply in-thread, which keeps their response in the + * context of the original message. + * + * Generated from protobuf enum THREADED_MESSAGES = 2; + */ + const THREADED_MESSAGES = 2; + /** + * Named spaces where the conversation is organized by topic. Topics and + * their replies are grouped together. + * + * Generated from protobuf enum GROUPED_MESSAGES = 3; + */ + const GROUPED_MESSAGES = 3; + /** + * Direct messages (DMs) between two people and group conversations between + * 3 or more people. + * + * Generated from protobuf enum UNTHREADED_MESSAGES = 4; + */ + const UNTHREADED_MESSAGES = 4; + + private static $valueToName = [ + self::SPACE_THREADING_STATE_UNSPECIFIED => 'SPACE_THREADING_STATE_UNSPECIFIED', + self::THREADED_MESSAGES => 'THREADED_MESSAGES', + self::GROUPED_MESSAGES => 'GROUPED_MESSAGES', + self::UNTHREADED_MESSAGES => 'UNTHREADED_MESSAGES', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpaceThreadingState::class, \Google\Apps\Chat\V1\Space_SpaceThreadingState::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceType.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceType.php new file mode 100644 index 000000000000..d1dd15987481 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceType.php @@ -0,0 +1,74 @@ +google.chat.v1.Space.SpaceType + */ +class SpaceType +{ + /** + * Reserved. + * + * Generated from protobuf enum SPACE_TYPE_UNSPECIFIED = 0; + */ + const SPACE_TYPE_UNSPECIFIED = 0; + /** + * A place where people send messages, share files, and collaborate. + * A `SPACE` can include Chat apps. + * + * Generated from protobuf enum SPACE = 1; + */ + const SPACE = 1; + /** + * Group conversations between 3 or more people. + * A `GROUP_CHAT` can include Chat apps. + * + * Generated from protobuf enum GROUP_CHAT = 2; + */ + const GROUP_CHAT = 2; + /** + * 1:1 messages between two humans or a human and a Chat app. + * + * Generated from protobuf enum DIRECT_MESSAGE = 3; + */ + const DIRECT_MESSAGE = 3; + + private static $valueToName = [ + self::SPACE_TYPE_UNSPECIFIED => 'SPACE_TYPE_UNSPECIFIED', + self::SPACE => 'SPACE', + self::GROUP_CHAT => 'GROUP_CHAT', + self::DIRECT_MESSAGE => 'DIRECT_MESSAGE', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(SpaceType::class, \Google\Apps\Chat\V1\Space_SpaceType::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/Type.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/Type.php new file mode 100644 index 000000000000..06a6d6b75e69 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/Type.php @@ -0,0 +1,65 @@ +google.chat.v1.Space.Type + */ +class Type +{ + /** + * Reserved. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Conversations between two or more humans. + * + * Generated from protobuf enum ROOM = 1; + */ + const ROOM = 1; + /** + * 1:1 Direct Message between a human and a Chat app, where all messages are + * flat. Note that this doesn't include direct messages between two humans. + * + * Generated from protobuf enum DM = 2; + */ + const DM = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::ROOM => 'ROOM', + self::DM => 'DM', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Apps\Chat\V1\Space_Type::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceBatchUpdatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceBatchUpdatedEventData.php new file mode 100644 index 000000000000..766dca2695aa --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceBatchUpdatedEventData.php @@ -0,0 +1,68 @@ +google.chat.v1.SpaceBatchUpdatedEventData + */ +class SpaceBatchUpdatedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * A list of updated spaces. + * + * Generated from protobuf field repeated .google.chat.v1.SpaceUpdatedEventData spaces = 1; + */ + private $spaces; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type array<\Google\Apps\Chat\V1\SpaceUpdatedEventData>|\Google\Protobuf\Internal\RepeatedField $spaces + * A list of updated spaces. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * A list of updated spaces. + * + * Generated from protobuf field repeated .google.chat.v1.SpaceUpdatedEventData spaces = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getSpaces() + { + return $this->spaces; + } + + /** + * A list of updated spaces. + * + * Generated from protobuf field repeated .google.chat.v1.SpaceUpdatedEventData spaces = 1; + * @param array<\Google\Apps\Chat\V1\SpaceUpdatedEventData>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setSpaces($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\SpaceUpdatedEventData::class); + $this->spaces = $arr; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceEvent.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceEvent.php new file mode 100644 index 000000000000..edd947280f93 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceEvent.php @@ -0,0 +1,956 @@ +google.chat.v1.SpaceEvent + */ +class SpaceEvent extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the space event. + * Format: `spaces/{space}/spaceEvents/{spaceEvent}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Time when the event occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; + */ + protected $event_time = null; + /** + * Type of space event. Each event type has a batch version, which + * represents multiple instances of the event type that occur in a short + * period of time. For `spaceEvents.list()` requests, omit batch event types + * in your query filter. By default, the server returns both event type and + * its batch version. + * Supported event types for + * [messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages): + * * New message: `google.workspace.chat.message.v1.created` + * * Updated message: `google.workspace.chat.message.v1.updated` + * * Deleted message: `google.workspace.chat.message.v1.deleted` + * * Multiple new messages: `google.workspace.chat.message.v1.batchCreated` + * * Multiple updated messages: + * `google.workspace.chat.message.v1.batchUpdated` + * * Multiple deleted messages: + * `google.workspace.chat.message.v1.batchDeleted` + * Supported event types for + * [memberships](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members): + * * New membership: `google.workspace.chat.membership.v1.created` + * * Updated membership: `google.workspace.chat.membership.v1.updated` + * * Deleted membership: `google.workspace.chat.membership.v1.deleted` + * * Multiple new memberships: + * `google.workspace.chat.membership.v1.batchCreated` + * * Multiple updated memberships: + * `google.workspace.chat.membership.v1.batchUpdated` + * * Multiple deleted memberships: + * `google.workspace.chat.membership.v1.batchDeleted` + * Supported event types for + * [reactions](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions): + * * New reaction: `google.workspace.chat.reaction.v1.created` + * * Deleted reaction: `google.workspace.chat.reaction.v1.deleted` + * * Multiple new reactions: + * `google.workspace.chat.reaction.v1.batchCreated` + * * Multiple deleted reactions: + * `google.workspace.chat.reaction.v1.batchDeleted` + * Supported event types about the + * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces): + * * Updated space: `google.workspace.chat.space.v1.updated` + * * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated` + * + * Generated from protobuf field string event_type = 6; + */ + protected $event_type = ''; + protected $payload; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the space event. + * Format: `spaces/{space}/spaceEvents/{spaceEvent}` + * @type \Google\Protobuf\Timestamp $event_time + * Time when the event occurred. + * @type string $event_type + * Type of space event. Each event type has a batch version, which + * represents multiple instances of the event type that occur in a short + * period of time. For `spaceEvents.list()` requests, omit batch event types + * in your query filter. By default, the server returns both event type and + * its batch version. + * Supported event types for + * [messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages): + * * New message: `google.workspace.chat.message.v1.created` + * * Updated message: `google.workspace.chat.message.v1.updated` + * * Deleted message: `google.workspace.chat.message.v1.deleted` + * * Multiple new messages: `google.workspace.chat.message.v1.batchCreated` + * * Multiple updated messages: + * `google.workspace.chat.message.v1.batchUpdated` + * * Multiple deleted messages: + * `google.workspace.chat.message.v1.batchDeleted` + * Supported event types for + * [memberships](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members): + * * New membership: `google.workspace.chat.membership.v1.created` + * * Updated membership: `google.workspace.chat.membership.v1.updated` + * * Deleted membership: `google.workspace.chat.membership.v1.deleted` + * * Multiple new memberships: + * `google.workspace.chat.membership.v1.batchCreated` + * * Multiple updated memberships: + * `google.workspace.chat.membership.v1.batchUpdated` + * * Multiple deleted memberships: + * `google.workspace.chat.membership.v1.batchDeleted` + * Supported event types for + * [reactions](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions): + * * New reaction: `google.workspace.chat.reaction.v1.created` + * * Deleted reaction: `google.workspace.chat.reaction.v1.deleted` + * * Multiple new reactions: + * `google.workspace.chat.reaction.v1.batchCreated` + * * Multiple deleted reactions: + * `google.workspace.chat.reaction.v1.batchDeleted` + * Supported event types about the + * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces): + * * Updated space: `google.workspace.chat.space.v1.updated` + * * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated` + * @type \Google\Apps\Chat\V1\MessageCreatedEventData $message_created_event_data + * Event payload for a new message. + * Event type: `google.workspace.chat.message.v1.created` + * @type \Google\Apps\Chat\V1\MessageUpdatedEventData $message_updated_event_data + * Event payload for an updated message. + * Event type: `google.workspace.chat.message.v1.updated` + * @type \Google\Apps\Chat\V1\MessageDeletedEventData $message_deleted_event_data + * Event payload for a deleted message. + * Event type: `google.workspace.chat.message.v1.deleted` + * @type \Google\Apps\Chat\V1\MessageBatchCreatedEventData $message_batch_created_event_data + * Event payload for multiple new messages. + * Event type: `google.workspace.chat.message.v1.batchCreated` + * @type \Google\Apps\Chat\V1\MessageBatchUpdatedEventData $message_batch_updated_event_data + * Event payload for multiple updated messages. + * Event type: `google.workspace.chat.message.v1.batchUpdated` + * @type \Google\Apps\Chat\V1\MessageBatchDeletedEventData $message_batch_deleted_event_data + * Event payload for multiple deleted messages. + * Event type: `google.workspace.chat.message.v1.batchDeleted` + * @type \Google\Apps\Chat\V1\SpaceUpdatedEventData $space_updated_event_data + * Event payload for a space update. + * Event type: `google.workspace.chat.space.v1.updated` + * @type \Google\Apps\Chat\V1\SpaceBatchUpdatedEventData $space_batch_updated_event_data + * Event payload for multiple updates to a space. + * Event type: `google.workspace.chat.space.v1.batchUpdated` + * @type \Google\Apps\Chat\V1\MembershipCreatedEventData $membership_created_event_data + * Event payload for a new membership. + * Event type: `google.workspace.chat.membership.v1.created` + * @type \Google\Apps\Chat\V1\MembershipUpdatedEventData $membership_updated_event_data + * Event payload for an updated membership. + * Event type: `google.workspace.chat.membership.v1.updated` + * @type \Google\Apps\Chat\V1\MembershipDeletedEventData $membership_deleted_event_data + * Event payload for a deleted membership. + * Event type: `google.workspace.chat.membership.v1.deleted` + * @type \Google\Apps\Chat\V1\MembershipBatchCreatedEventData $membership_batch_created_event_data + * Event payload for multiple new memberships. + * Event type: `google.workspace.chat.membership.v1.batchCreated` + * @type \Google\Apps\Chat\V1\MembershipBatchUpdatedEventData $membership_batch_updated_event_data + * Event payload for multiple updated memberships. + * Event type: `google.workspace.chat.membership.v1.batchUpdated` + * @type \Google\Apps\Chat\V1\MembershipBatchDeletedEventData $membership_batch_deleted_event_data + * Event payload for multiple deleted memberships. + * Event type: `google.workspace.chat.membership.v1.batchDeleted` + * @type \Google\Apps\Chat\V1\ReactionCreatedEventData $reaction_created_event_data + * Event payload for a new reaction. + * Event type: `google.workspace.chat.reaction.v1.created` + * @type \Google\Apps\Chat\V1\ReactionDeletedEventData $reaction_deleted_event_data + * Event payload for a deleted reaction. + * Event type: `google.workspace.chat.reaction.v1.deleted` + * @type \Google\Apps\Chat\V1\ReactionBatchCreatedEventData $reaction_batch_created_event_data + * Event payload for multiple new reactions. + * Event type: `google.workspace.chat.reaction.v1.batchCreated` + * @type \Google\Apps\Chat\V1\ReactionBatchDeletedEventData $reaction_batch_deleted_event_data + * Event payload for multiple deleted reactions. + * Event type: `google.workspace.chat.reaction.v1.batchDeleted` + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceEvent::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the space event. + * Format: `spaces/{space}/spaceEvents/{spaceEvent}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the space event. + * Format: `spaces/{space}/spaceEvents/{spaceEvent}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Time when the event occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; + * @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); + } + + /** + * Time when the event occurred. + * + * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEventTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->event_time = $var; + + return $this; + } + + /** + * Type of space event. Each event type has a batch version, which + * represents multiple instances of the event type that occur in a short + * period of time. For `spaceEvents.list()` requests, omit batch event types + * in your query filter. By default, the server returns both event type and + * its batch version. + * Supported event types for + * [messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages): + * * New message: `google.workspace.chat.message.v1.created` + * * Updated message: `google.workspace.chat.message.v1.updated` + * * Deleted message: `google.workspace.chat.message.v1.deleted` + * * Multiple new messages: `google.workspace.chat.message.v1.batchCreated` + * * Multiple updated messages: + * `google.workspace.chat.message.v1.batchUpdated` + * * Multiple deleted messages: + * `google.workspace.chat.message.v1.batchDeleted` + * Supported event types for + * [memberships](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members): + * * New membership: `google.workspace.chat.membership.v1.created` + * * Updated membership: `google.workspace.chat.membership.v1.updated` + * * Deleted membership: `google.workspace.chat.membership.v1.deleted` + * * Multiple new memberships: + * `google.workspace.chat.membership.v1.batchCreated` + * * Multiple updated memberships: + * `google.workspace.chat.membership.v1.batchUpdated` + * * Multiple deleted memberships: + * `google.workspace.chat.membership.v1.batchDeleted` + * Supported event types for + * [reactions](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions): + * * New reaction: `google.workspace.chat.reaction.v1.created` + * * Deleted reaction: `google.workspace.chat.reaction.v1.deleted` + * * Multiple new reactions: + * `google.workspace.chat.reaction.v1.batchCreated` + * * Multiple deleted reactions: + * `google.workspace.chat.reaction.v1.batchDeleted` + * Supported event types about the + * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces): + * * Updated space: `google.workspace.chat.space.v1.updated` + * * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated` + * + * Generated from protobuf field string event_type = 6; + * @return string + */ + public function getEventType() + { + return $this->event_type; + } + + /** + * Type of space event. Each event type has a batch version, which + * represents multiple instances of the event type that occur in a short + * period of time. For `spaceEvents.list()` requests, omit batch event types + * in your query filter. By default, the server returns both event type and + * its batch version. + * Supported event types for + * [messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages): + * * New message: `google.workspace.chat.message.v1.created` + * * Updated message: `google.workspace.chat.message.v1.updated` + * * Deleted message: `google.workspace.chat.message.v1.deleted` + * * Multiple new messages: `google.workspace.chat.message.v1.batchCreated` + * * Multiple updated messages: + * `google.workspace.chat.message.v1.batchUpdated` + * * Multiple deleted messages: + * `google.workspace.chat.message.v1.batchDeleted` + * Supported event types for + * [memberships](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members): + * * New membership: `google.workspace.chat.membership.v1.created` + * * Updated membership: `google.workspace.chat.membership.v1.updated` + * * Deleted membership: `google.workspace.chat.membership.v1.deleted` + * * Multiple new memberships: + * `google.workspace.chat.membership.v1.batchCreated` + * * Multiple updated memberships: + * `google.workspace.chat.membership.v1.batchUpdated` + * * Multiple deleted memberships: + * `google.workspace.chat.membership.v1.batchDeleted` + * Supported event types for + * [reactions](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions): + * * New reaction: `google.workspace.chat.reaction.v1.created` + * * Deleted reaction: `google.workspace.chat.reaction.v1.deleted` + * * Multiple new reactions: + * `google.workspace.chat.reaction.v1.batchCreated` + * * Multiple deleted reactions: + * `google.workspace.chat.reaction.v1.batchDeleted` + * Supported event types about the + * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces): + * * Updated space: `google.workspace.chat.space.v1.updated` + * * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated` + * + * Generated from protobuf field string event_type = 6; + * @param string $var + * @return $this + */ + public function setEventType($var) + { + GPBUtil::checkString($var, True); + $this->event_type = $var; + + return $this; + } + + /** + * Event payload for a new message. + * Event type: `google.workspace.chat.message.v1.created` + * + * Generated from protobuf field .google.chat.v1.MessageCreatedEventData message_created_event_data = 12; + * @return \Google\Apps\Chat\V1\MessageCreatedEventData|null + */ + public function getMessageCreatedEventData() + { + return $this->readOneof(12); + } + + public function hasMessageCreatedEventData() + { + return $this->hasOneof(12); + } + + /** + * Event payload for a new message. + * Event type: `google.workspace.chat.message.v1.created` + * + * Generated from protobuf field .google.chat.v1.MessageCreatedEventData message_created_event_data = 12; + * @param \Google\Apps\Chat\V1\MessageCreatedEventData $var + * @return $this + */ + public function setMessageCreatedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MessageCreatedEventData::class); + $this->writeOneof(12, $var); + + return $this; + } + + /** + * Event payload for an updated message. + * Event type: `google.workspace.chat.message.v1.updated` + * + * Generated from protobuf field .google.chat.v1.MessageUpdatedEventData message_updated_event_data = 13; + * @return \Google\Apps\Chat\V1\MessageUpdatedEventData|null + */ + public function getMessageUpdatedEventData() + { + return $this->readOneof(13); + } + + public function hasMessageUpdatedEventData() + { + return $this->hasOneof(13); + } + + /** + * Event payload for an updated message. + * Event type: `google.workspace.chat.message.v1.updated` + * + * Generated from protobuf field .google.chat.v1.MessageUpdatedEventData message_updated_event_data = 13; + * @param \Google\Apps\Chat\V1\MessageUpdatedEventData $var + * @return $this + */ + public function setMessageUpdatedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MessageUpdatedEventData::class); + $this->writeOneof(13, $var); + + return $this; + } + + /** + * Event payload for a deleted message. + * Event type: `google.workspace.chat.message.v1.deleted` + * + * Generated from protobuf field .google.chat.v1.MessageDeletedEventData message_deleted_event_data = 14; + * @return \Google\Apps\Chat\V1\MessageDeletedEventData|null + */ + public function getMessageDeletedEventData() + { + return $this->readOneof(14); + } + + public function hasMessageDeletedEventData() + { + return $this->hasOneof(14); + } + + /** + * Event payload for a deleted message. + * Event type: `google.workspace.chat.message.v1.deleted` + * + * Generated from protobuf field .google.chat.v1.MessageDeletedEventData message_deleted_event_data = 14; + * @param \Google\Apps\Chat\V1\MessageDeletedEventData $var + * @return $this + */ + public function setMessageDeletedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MessageDeletedEventData::class); + $this->writeOneof(14, $var); + + return $this; + } + + /** + * Event payload for multiple new messages. + * Event type: `google.workspace.chat.message.v1.batchCreated` + * + * Generated from protobuf field .google.chat.v1.MessageBatchCreatedEventData message_batch_created_event_data = 26; + * @return \Google\Apps\Chat\V1\MessageBatchCreatedEventData|null + */ + public function getMessageBatchCreatedEventData() + { + return $this->readOneof(26); + } + + public function hasMessageBatchCreatedEventData() + { + return $this->hasOneof(26); + } + + /** + * Event payload for multiple new messages. + * Event type: `google.workspace.chat.message.v1.batchCreated` + * + * Generated from protobuf field .google.chat.v1.MessageBatchCreatedEventData message_batch_created_event_data = 26; + * @param \Google\Apps\Chat\V1\MessageBatchCreatedEventData $var + * @return $this + */ + public function setMessageBatchCreatedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MessageBatchCreatedEventData::class); + $this->writeOneof(26, $var); + + return $this; + } + + /** + * Event payload for multiple updated messages. + * Event type: `google.workspace.chat.message.v1.batchUpdated` + * + * Generated from protobuf field .google.chat.v1.MessageBatchUpdatedEventData message_batch_updated_event_data = 27; + * @return \Google\Apps\Chat\V1\MessageBatchUpdatedEventData|null + */ + public function getMessageBatchUpdatedEventData() + { + return $this->readOneof(27); + } + + public function hasMessageBatchUpdatedEventData() + { + return $this->hasOneof(27); + } + + /** + * Event payload for multiple updated messages. + * Event type: `google.workspace.chat.message.v1.batchUpdated` + * + * Generated from protobuf field .google.chat.v1.MessageBatchUpdatedEventData message_batch_updated_event_data = 27; + * @param \Google\Apps\Chat\V1\MessageBatchUpdatedEventData $var + * @return $this + */ + public function setMessageBatchUpdatedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MessageBatchUpdatedEventData::class); + $this->writeOneof(27, $var); + + return $this; + } + + /** + * Event payload for multiple deleted messages. + * Event type: `google.workspace.chat.message.v1.batchDeleted` + * + * Generated from protobuf field .google.chat.v1.MessageBatchDeletedEventData message_batch_deleted_event_data = 28; + * @return \Google\Apps\Chat\V1\MessageBatchDeletedEventData|null + */ + public function getMessageBatchDeletedEventData() + { + return $this->readOneof(28); + } + + public function hasMessageBatchDeletedEventData() + { + return $this->hasOneof(28); + } + + /** + * Event payload for multiple deleted messages. + * Event type: `google.workspace.chat.message.v1.batchDeleted` + * + * Generated from protobuf field .google.chat.v1.MessageBatchDeletedEventData message_batch_deleted_event_data = 28; + * @param \Google\Apps\Chat\V1\MessageBatchDeletedEventData $var + * @return $this + */ + public function setMessageBatchDeletedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MessageBatchDeletedEventData::class); + $this->writeOneof(28, $var); + + return $this; + } + + /** + * Event payload for a space update. + * Event type: `google.workspace.chat.space.v1.updated` + * + * Generated from protobuf field .google.chat.v1.SpaceUpdatedEventData space_updated_event_data = 15; + * @return \Google\Apps\Chat\V1\SpaceUpdatedEventData|null + */ + public function getSpaceUpdatedEventData() + { + return $this->readOneof(15); + } + + public function hasSpaceUpdatedEventData() + { + return $this->hasOneof(15); + } + + /** + * Event payload for a space update. + * Event type: `google.workspace.chat.space.v1.updated` + * + * Generated from protobuf field .google.chat.v1.SpaceUpdatedEventData space_updated_event_data = 15; + * @param \Google\Apps\Chat\V1\SpaceUpdatedEventData $var + * @return $this + */ + public function setSpaceUpdatedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SpaceUpdatedEventData::class); + $this->writeOneof(15, $var); + + return $this; + } + + /** + * Event payload for multiple updates to a space. + * Event type: `google.workspace.chat.space.v1.batchUpdated` + * + * Generated from protobuf field .google.chat.v1.SpaceBatchUpdatedEventData space_batch_updated_event_data = 29; + * @return \Google\Apps\Chat\V1\SpaceBatchUpdatedEventData|null + */ + public function getSpaceBatchUpdatedEventData() + { + return $this->readOneof(29); + } + + public function hasSpaceBatchUpdatedEventData() + { + return $this->hasOneof(29); + } + + /** + * Event payload for multiple updates to a space. + * Event type: `google.workspace.chat.space.v1.batchUpdated` + * + * Generated from protobuf field .google.chat.v1.SpaceBatchUpdatedEventData space_batch_updated_event_data = 29; + * @param \Google\Apps\Chat\V1\SpaceBatchUpdatedEventData $var + * @return $this + */ + public function setSpaceBatchUpdatedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SpaceBatchUpdatedEventData::class); + $this->writeOneof(29, $var); + + return $this; + } + + /** + * Event payload for a new membership. + * Event type: `google.workspace.chat.membership.v1.created` + * + * Generated from protobuf field .google.chat.v1.MembershipCreatedEventData membership_created_event_data = 17; + * @return \Google\Apps\Chat\V1\MembershipCreatedEventData|null + */ + public function getMembershipCreatedEventData() + { + return $this->readOneof(17); + } + + public function hasMembershipCreatedEventData() + { + return $this->hasOneof(17); + } + + /** + * Event payload for a new membership. + * Event type: `google.workspace.chat.membership.v1.created` + * + * Generated from protobuf field .google.chat.v1.MembershipCreatedEventData membership_created_event_data = 17; + * @param \Google\Apps\Chat\V1\MembershipCreatedEventData $var + * @return $this + */ + public function setMembershipCreatedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MembershipCreatedEventData::class); + $this->writeOneof(17, $var); + + return $this; + } + + /** + * Event payload for an updated membership. + * Event type: `google.workspace.chat.membership.v1.updated` + * + * Generated from protobuf field .google.chat.v1.MembershipUpdatedEventData membership_updated_event_data = 18; + * @return \Google\Apps\Chat\V1\MembershipUpdatedEventData|null + */ + public function getMembershipUpdatedEventData() + { + return $this->readOneof(18); + } + + public function hasMembershipUpdatedEventData() + { + return $this->hasOneof(18); + } + + /** + * Event payload for an updated membership. + * Event type: `google.workspace.chat.membership.v1.updated` + * + * Generated from protobuf field .google.chat.v1.MembershipUpdatedEventData membership_updated_event_data = 18; + * @param \Google\Apps\Chat\V1\MembershipUpdatedEventData $var + * @return $this + */ + public function setMembershipUpdatedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MembershipUpdatedEventData::class); + $this->writeOneof(18, $var); + + return $this; + } + + /** + * Event payload for a deleted membership. + * Event type: `google.workspace.chat.membership.v1.deleted` + * + * Generated from protobuf field .google.chat.v1.MembershipDeletedEventData membership_deleted_event_data = 219; + * @return \Google\Apps\Chat\V1\MembershipDeletedEventData|null + */ + public function getMembershipDeletedEventData() + { + return $this->readOneof(219); + } + + public function hasMembershipDeletedEventData() + { + return $this->hasOneof(219); + } + + /** + * Event payload for a deleted membership. + * Event type: `google.workspace.chat.membership.v1.deleted` + * + * Generated from protobuf field .google.chat.v1.MembershipDeletedEventData membership_deleted_event_data = 219; + * @param \Google\Apps\Chat\V1\MembershipDeletedEventData $var + * @return $this + */ + public function setMembershipDeletedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MembershipDeletedEventData::class); + $this->writeOneof(219, $var); + + return $this; + } + + /** + * Event payload for multiple new memberships. + * Event type: `google.workspace.chat.membership.v1.batchCreated` + * + * Generated from protobuf field .google.chat.v1.MembershipBatchCreatedEventData membership_batch_created_event_data = 31; + * @return \Google\Apps\Chat\V1\MembershipBatchCreatedEventData|null + */ + public function getMembershipBatchCreatedEventData() + { + return $this->readOneof(31); + } + + public function hasMembershipBatchCreatedEventData() + { + return $this->hasOneof(31); + } + + /** + * Event payload for multiple new memberships. + * Event type: `google.workspace.chat.membership.v1.batchCreated` + * + * Generated from protobuf field .google.chat.v1.MembershipBatchCreatedEventData membership_batch_created_event_data = 31; + * @param \Google\Apps\Chat\V1\MembershipBatchCreatedEventData $var + * @return $this + */ + public function setMembershipBatchCreatedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MembershipBatchCreatedEventData::class); + $this->writeOneof(31, $var); + + return $this; + } + + /** + * Event payload for multiple updated memberships. + * Event type: `google.workspace.chat.membership.v1.batchUpdated` + * + * Generated from protobuf field .google.chat.v1.MembershipBatchUpdatedEventData membership_batch_updated_event_data = 32; + * @return \Google\Apps\Chat\V1\MembershipBatchUpdatedEventData|null + */ + public function getMembershipBatchUpdatedEventData() + { + return $this->readOneof(32); + } + + public function hasMembershipBatchUpdatedEventData() + { + return $this->hasOneof(32); + } + + /** + * Event payload for multiple updated memberships. + * Event type: `google.workspace.chat.membership.v1.batchUpdated` + * + * Generated from protobuf field .google.chat.v1.MembershipBatchUpdatedEventData membership_batch_updated_event_data = 32; + * @param \Google\Apps\Chat\V1\MembershipBatchUpdatedEventData $var + * @return $this + */ + public function setMembershipBatchUpdatedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MembershipBatchUpdatedEventData::class); + $this->writeOneof(32, $var); + + return $this; + } + + /** + * Event payload for multiple deleted memberships. + * Event type: `google.workspace.chat.membership.v1.batchDeleted` + * + * Generated from protobuf field .google.chat.v1.MembershipBatchDeletedEventData membership_batch_deleted_event_data = 33; + * @return \Google\Apps\Chat\V1\MembershipBatchDeletedEventData|null + */ + public function getMembershipBatchDeletedEventData() + { + return $this->readOneof(33); + } + + public function hasMembershipBatchDeletedEventData() + { + return $this->hasOneof(33); + } + + /** + * Event payload for multiple deleted memberships. + * Event type: `google.workspace.chat.membership.v1.batchDeleted` + * + * Generated from protobuf field .google.chat.v1.MembershipBatchDeletedEventData membership_batch_deleted_event_data = 33; + * @param \Google\Apps\Chat\V1\MembershipBatchDeletedEventData $var + * @return $this + */ + public function setMembershipBatchDeletedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MembershipBatchDeletedEventData::class); + $this->writeOneof(33, $var); + + return $this; + } + + /** + * Event payload for a new reaction. + * Event type: `google.workspace.chat.reaction.v1.created` + * + * Generated from protobuf field .google.chat.v1.ReactionCreatedEventData reaction_created_event_data = 21; + * @return \Google\Apps\Chat\V1\ReactionCreatedEventData|null + */ + public function getReactionCreatedEventData() + { + return $this->readOneof(21); + } + + public function hasReactionCreatedEventData() + { + return $this->hasOneof(21); + } + + /** + * Event payload for a new reaction. + * Event type: `google.workspace.chat.reaction.v1.created` + * + * Generated from protobuf field .google.chat.v1.ReactionCreatedEventData reaction_created_event_data = 21; + * @param \Google\Apps\Chat\V1\ReactionCreatedEventData $var + * @return $this + */ + public function setReactionCreatedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ReactionCreatedEventData::class); + $this->writeOneof(21, $var); + + return $this; + } + + /** + * Event payload for a deleted reaction. + * Event type: `google.workspace.chat.reaction.v1.deleted` + * + * Generated from protobuf field .google.chat.v1.ReactionDeletedEventData reaction_deleted_event_data = 22; + * @return \Google\Apps\Chat\V1\ReactionDeletedEventData|null + */ + public function getReactionDeletedEventData() + { + return $this->readOneof(22); + } + + public function hasReactionDeletedEventData() + { + return $this->hasOneof(22); + } + + /** + * Event payload for a deleted reaction. + * Event type: `google.workspace.chat.reaction.v1.deleted` + * + * Generated from protobuf field .google.chat.v1.ReactionDeletedEventData reaction_deleted_event_data = 22; + * @param \Google\Apps\Chat\V1\ReactionDeletedEventData $var + * @return $this + */ + public function setReactionDeletedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ReactionDeletedEventData::class); + $this->writeOneof(22, $var); + + return $this; + } + + /** + * Event payload for multiple new reactions. + * Event type: `google.workspace.chat.reaction.v1.batchCreated` + * + * Generated from protobuf field .google.chat.v1.ReactionBatchCreatedEventData reaction_batch_created_event_data = 34; + * @return \Google\Apps\Chat\V1\ReactionBatchCreatedEventData|null + */ + public function getReactionBatchCreatedEventData() + { + return $this->readOneof(34); + } + + public function hasReactionBatchCreatedEventData() + { + return $this->hasOneof(34); + } + + /** + * Event payload for multiple new reactions. + * Event type: `google.workspace.chat.reaction.v1.batchCreated` + * + * Generated from protobuf field .google.chat.v1.ReactionBatchCreatedEventData reaction_batch_created_event_data = 34; + * @param \Google\Apps\Chat\V1\ReactionBatchCreatedEventData $var + * @return $this + */ + public function setReactionBatchCreatedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ReactionBatchCreatedEventData::class); + $this->writeOneof(34, $var); + + return $this; + } + + /** + * Event payload for multiple deleted reactions. + * Event type: `google.workspace.chat.reaction.v1.batchDeleted` + * + * Generated from protobuf field .google.chat.v1.ReactionBatchDeletedEventData reaction_batch_deleted_event_data = 35; + * @return \Google\Apps\Chat\V1\ReactionBatchDeletedEventData|null + */ + public function getReactionBatchDeletedEventData() + { + return $this->readOneof(35); + } + + public function hasReactionBatchDeletedEventData() + { + return $this->hasOneof(35); + } + + /** + * Event payload for multiple deleted reactions. + * Event type: `google.workspace.chat.reaction.v1.batchDeleted` + * + * Generated from protobuf field .google.chat.v1.ReactionBatchDeletedEventData reaction_batch_deleted_event_data = 35; + * @param \Google\Apps\Chat\V1\ReactionBatchDeletedEventData $var + * @return $this + */ + public function setReactionBatchDeletedEventData($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ReactionBatchDeletedEventData::class); + $this->writeOneof(35, $var); + + return $this; + } + + /** + * @return string + */ + public function getPayload() + { + return $this->whichOneof("payload"); + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceReadState.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceReadState.php new file mode 100644 index 000000000000..c50b92718f4c --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceReadState.php @@ -0,0 +1,124 @@ +google.chat.v1.SpaceReadState + */ +class SpaceReadState extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the space read state. + * Format: `users/{user}/spaces/{space}/spaceReadState` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. The time when the user's space read state was updated. Usually + * this corresponds with either the timestamp of the last read message, or a + * timestamp specified by the user to mark the last read position in a space. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $last_read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the space read state. + * Format: `users/{user}/spaces/{space}/spaceReadState` + * @type \Google\Protobuf\Timestamp $last_read_time + * Optional. The time when the user's space read state was updated. Usually + * this corresponds with either the timestamp of the last read message, or a + * timestamp specified by the user to mark the last read position in a space. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceReadState::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the space read state. + * Format: `users/{user}/spaces/{space}/spaceReadState` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the space read state. + * Format: `users/{user}/spaces/{space}/spaceReadState` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. The time when the user's space read state was updated. Usually + * this corresponds with either the timestamp of the last read message, or a + * timestamp specified by the user to mark the last read position in a space. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastReadTime() + { + return $this->last_read_time; + } + + public function hasLastReadTime() + { + return isset($this->last_read_time); + } + + public function clearLastReadTime() + { + unset($this->last_read_time); + } + + /** + * Optional. The time when the user's space read state was updated. Usually + * this corresponds with either the timestamp of the last read message, or a + * timestamp specified by the user to mark the last read position in a space. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceUpdatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceUpdatedEventData.php new file mode 100644 index 000000000000..00eb47764a7e --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceUpdatedEventData.php @@ -0,0 +1,78 @@ +google.chat.v1.SpaceUpdatedEventData + */ +class SpaceUpdatedEventData extends \Google\Protobuf\Internal\Message +{ + /** + * The updated space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1; + */ + protected $space = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Space $space + * The updated space. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); + parent::__construct($data); + } + + /** + * The updated space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1; + * @return \Google\Apps\Chat\V1\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * The updated space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1; + * @param \Google\Apps\Chat\V1\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); + $this->space = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Thread.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Thread.php new file mode 100644 index 000000000000..cef404ea9070 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Thread.php @@ -0,0 +1,134 @@ +google.chat.v1.Thread + */ +class Thread extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the thread. + * Example: `spaces/{space}/threads/{thread}` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Optional. Input for creating or updating a thread. Otherwise, output only. + * ID for the thread. Supports up to 4000 characters. + * This ID is unique to the Chat app that sets it. For example, if + * multiple Chat apps create a message using the same thread key, + * the messages are posted in different threads. To reply in a + * thread created by a person or another Chat app, specify the thread `name` + * field instead. + * + * Generated from protobuf field string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $thread_key = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the thread. + * Example: `spaces/{space}/threads/{thread}` + * @type string $thread_key + * Optional. Input for creating or updating a thread. Otherwise, output only. + * ID for the thread. Supports up to 4000 characters. + * This ID is unique to the Chat app that sets it. For example, if + * multiple Chat apps create a message using the same thread key, + * the messages are posted in different threads. To reply in a + * thread created by a person or another Chat app, specify the thread `name` + * field instead. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the thread. + * Example: `spaces/{space}/threads/{thread}` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the thread. + * Example: `spaces/{space}/threads/{thread}` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Optional. Input for creating or updating a thread. Otherwise, output only. + * ID for the thread. Supports up to 4000 characters. + * This ID is unique to the Chat app that sets it. For example, if + * multiple Chat apps create a message using the same thread key, + * the messages are posted in different threads. To reply in a + * thread created by a person or another Chat app, specify the thread `name` + * field instead. + * + * Generated from protobuf field string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getThreadKey() + { + return $this->thread_key; + } + + /** + * Optional. Input for creating or updating a thread. Otherwise, output only. + * ID for the thread. Supports up to 4000 characters. + * This ID is unique to the Chat app that sets it. For example, if + * multiple Chat apps create a message using the same thread key, + * the messages are posted in different threads. To reply in a + * thread created by a person or another Chat app, specify the thread `name` + * field instead. + * + * Generated from protobuf field string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @param string $var + * @return $this + */ + public function setThreadKey($var) + { + GPBUtil::checkString($var, True); + $this->thread_key = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ThreadReadState.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ThreadReadState.php new file mode 100644 index 000000000000..5605873dfdea --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ThreadReadState.php @@ -0,0 +1,120 @@ +google.chat.v1.ThreadReadState + */ +class ThreadReadState extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name of the thread read state. + * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * The time when the user's thread read state was updated. Usually this + * corresponds with the timestamp of the last read message in a thread. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2; + */ + protected $last_read_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name of the thread read state. + * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` + * @type \Google\Protobuf\Timestamp $last_read_time + * The time when the user's thread read state was updated. Usually this + * corresponds with the timestamp of the last read message in a thread. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\ThreadReadState::initOnce(); + parent::__construct($data); + } + + /** + * Resource name of the thread read state. + * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name of the thread read state. + * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * The time when the user's thread read state was updated. Usually this + * corresponds with the timestamp of the last read message in a thread. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLastReadTime() + { + return $this->last_read_time; + } + + public function hasLastReadTime() + { + return isset($this->last_read_time); + } + + public function clearLastReadTime() + { + unset($this->last_read_time); + } + + /** + * The time when the user's thread read state was updated. Usually this + * corresponds with the timestamp of the last read message in a thread. + * + * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLastReadTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->last_read_time = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMembershipRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMembershipRequest.php new file mode 100644 index 000000000000..cf3107d0a5e3 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMembershipRequest.php @@ -0,0 +1,216 @@ +google.chat.v1.UpdateMembershipRequest + */ +class UpdateMembershipRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $membership = null; + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `role` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * + * Generated from protobuf field bool use_admin_access = 3; + */ + protected $use_admin_access = false; + + /** + * @param \Google\Apps\Chat\V1\Membership $membership Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * + * Currently supported field paths: + * + * - `role` + * + * @return \Google\Apps\Chat\V1\UpdateMembershipRequest + * + * @experimental + */ + public static function build(\Google\Apps\Chat\V1\Membership $membership, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMembership($membership) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Membership $membership + * Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `role` + * @type bool $use_admin_access + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Membership::initOnce(); + parent::__construct($data); + } + + /** + * Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Membership|null + */ + public function getMembership() + { + return $this->membership; + } + + public function hasMembership() + { + return isset($this->membership); + } + + public function clearMembership() + { + unset($this->membership); + } + + /** + * Required. The membership to update. Only fields specified by `update_mask` + * are updated. + * + * Generated from protobuf field .google.chat.v1.Membership membership = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Membership $var + * @return $this + */ + public function setMembership($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); + $this->membership = $var; + + return $this; + } + + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `role` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `role` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * + * Generated from protobuf field bool use_admin_access = 3; + * @return bool + */ + public function getUseAdminAccess() + { + return $this->use_admin_access; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.memberships` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * + * Generated from protobuf field bool use_admin_access = 3; + * @param bool $var + * @return $this + */ + public function setUseAdminAccess($var) + { + GPBUtil::checkBool($var); + $this->use_admin_access = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMessageRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMessageRequest.php new file mode 100644 index 000000000000..338ec6bf863c --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMessageRequest.php @@ -0,0 +1,238 @@ +google.chat.v1.UpdateMessageRequest + */ +class UpdateMessageRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Message with fields updated. + * + * Generated from protobuf field .google.chat.v1.Message message = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $message = null; + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `text` + * - `attachment` + * - `cards` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `cards_v2` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `accessory_widgets` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + /** + * Optional. If `true` and the message isn't found, a new message is created + * and `updateMask` is ignored. The specified message ID must be + * [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) + * or the request fails. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $allow_missing = false; + + /** + * @param \Google\Apps\Chat\V1\Message $message Required. Message with fields updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * + * Currently supported field paths: + * + * - `text` + * + * - `attachment` + * + * - `cards` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * + * - `cards_v2` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * + * - `accessory_widgets` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * + * @return \Google\Apps\Chat\V1\UpdateMessageRequest + * + * @experimental + */ + public static function build(\Google\Apps\Chat\V1\Message $message, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setMessage($message) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Message $message + * Required. Message with fields updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `text` + * - `attachment` + * - `cards` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `cards_v2` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `accessory_widgets` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * @type bool $allow_missing + * Optional. If `true` and the message isn't found, a new message is created + * and `updateMask` is ignored. The specified message ID must be + * [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) + * or the request fails. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Message::initOnce(); + parent::__construct($data); + } + + /** + * Required. Message with fields updated. + * + * Generated from protobuf field .google.chat.v1.Message message = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Message|null + */ + public function getMessage() + { + return $this->message; + } + + public function hasMessage() + { + return isset($this->message); + } + + public function clearMessage() + { + unset($this->message); + } + + /** + * Required. Message with fields updated. + * + * Generated from protobuf field .google.chat.v1.Message message = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Message $var + * @return $this + */ + public function setMessage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Message::class); + $this->message = $var; + + return $this; + } + + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `text` + * - `attachment` + * - `cards` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `cards_v2` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `accessory_widgets` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * + * 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); + } + + /** + * Required. The field paths to update. Separate multiple values with commas + * or use `*` to update all field paths. + * Currently supported field paths: + * - `text` + * - `attachment` + * - `cards` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `cards_v2` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * - `accessory_widgets` (Requires [app + * authentication](/chat/api/guides/auth/service-accounts).) + * + * 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; + } + + /** + * Optional. If `true` and the message isn't found, a new message is created + * and `updateMask` is ignored. The specified message ID must be + * [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) + * or the request fails. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return bool + */ + public function getAllowMissing() + { + return $this->allow_missing; + } + + /** + * Optional. If `true` and the message isn't found, a new message is created + * and `updateMask` is ignored. The specified message ID must be + * [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) + * or the request fails. + * + * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @param bool $var + * @return $this + */ + public function setAllowMissing($var) + { + GPBUtil::checkBool($var); + $this->allow_missing = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceReadStateRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceReadStateRequest.php new file mode 100644 index 000000000000..ca8c1da1bda2 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceReadStateRequest.php @@ -0,0 +1,230 @@ +google.chat.v1.UpdateSpaceReadStateRequest + */ +class UpdateSpaceReadStateRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. The space read state and fields to update. + * Only supports updating read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field .google.chat.v1.SpaceReadState space_read_state = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $space_read_state = null; + /** + * Required. The field paths to update. Currently supported field paths: + * - `last_read_time` + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $update_mask = null; + + /** + * @param \Google\Apps\Chat\V1\SpaceReadState $spaceReadState Required. The space read state and fields to update. + * + * Only supports updating read state for the calling user. + * + * To refer to the calling user, set one of the following: + * + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * + * Format: users/{user}/spaces/{space}/spaceReadState + * @param \Google\Protobuf\FieldMask $updateMask Required. The field paths to update. Currently supported field paths: + * + * - `last_read_time` + * + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * + * @return \Google\Apps\Chat\V1\UpdateSpaceReadStateRequest + * + * @experimental + */ + public static function build(\Google\Apps\Chat\V1\SpaceReadState $spaceReadState, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSpaceReadState($spaceReadState) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\SpaceReadState $space_read_state + * Required. The space read state and fields to update. + * Only supports updating read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The field paths to update. Currently supported field paths: + * - `last_read_time` + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\SpaceReadState::initOnce(); + parent::__construct($data); + } + + /** + * Required. The space read state and fields to update. + * Only supports updating read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field .google.chat.v1.SpaceReadState space_read_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\SpaceReadState|null + */ + public function getSpaceReadState() + { + return $this->space_read_state; + } + + public function hasSpaceReadState() + { + return isset($this->space_read_state); + } + + public function clearSpaceReadState() + { + unset($this->space_read_state); + } + + /** + * Required. The space read state and fields to update. + * Only supports updating read state for the calling user. + * To refer to the calling user, set one of the following: + * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. + * - Their Workspace email address. For example, + * `users/user@example.com/spaces/{space}/spaceReadState`. + * - Their user id. For example, + * `users/123456789/spaces/{space}/spaceReadState`. + * Format: users/{user}/spaces/{space}/spaceReadState + * + * Generated from protobuf field .google.chat.v1.SpaceReadState space_read_state = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\SpaceReadState $var + * @return $this + */ + public function setSpaceReadState($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SpaceReadState::class); + $this->space_read_state = $var; + + return $this; + } + + /** + * Required. The field paths to update. Currently supported field paths: + * - `last_read_time` + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @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); + } + + /** + * Required. The field paths to update. Currently supported field paths: + * - `last_read_time` + * When the `last_read_time` is before the latest message create time, the + * space appears as unread in the UI. + * To mark the space as read, set `last_read_time` to any value later (larger) + * than the latest message create time. The `last_read_time` is coerced to + * match the latest message create time. Note that the space read state only + * affects the read state of messages that are visible in the space's + * top-level conversation. Replies in threads are unaffected by this + * timestamp, and instead rely on the thread read state. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; + * @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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceRequest.php new file mode 100644 index 000000000000..ef832bfb3be3 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceRequest.php @@ -0,0 +1,480 @@ +google.chat.v1.UpdateSpaceRequest + */ +class UpdateSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Space with fields to be updated. `Space.name` must be + * populated in the form of `spaces/{space}`. Only fields + * specified by `update_mask` are updated. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $space = null; + /** + * Required. The updated field paths, comma separated if there are + * multiple. + * You can update the following fields for a space: + * `space_details`: Updates the space's description. Supports up to 150 + * characters. + * `display_name`: Only supports updating the display name for spaces where + * `spaceType` field is `SPACE`. + * If you receive the error message `ALREADY_EXISTS`, try a different + * value. An existing space within the + * Google Workspace organization might already use this display name. + * `space_type`: Only supports changing a `GROUP_CHAT` space type to + * `SPACE`. Include `display_name` together + * with `space_type` in the update mask and ensure that the specified space + * has a non-empty display name and the `SPACE` space type. Including the + * `space_type` mask and the `SPACE` type in the specified space when updating + * the display name is optional if the existing space already has the `SPACE` + * type. Trying to update the space type in other ways results in an invalid + * argument error. + * `space_type` is not supported with `useAdminAccess`. + * `space_history_state`: Updates [space history + * settings](https://support.google.com/chat/answer/7664687) by turning + * history on or off for the space. Only supported if history settings are + * enabled for the Google Workspace organization. To update the + * space history state, you must omit all other field masks in your request. + * `space_history_state` is not supported with `useAdminAccess`. + * `access_settings.audience`: Updates the [access + * setting](https://support.google.com/chat/answer/11971020) of who can + * discover the space, join the space, and preview the messages in named space + * where `spaceType` field is `SPACE`. If the existing space has a + * target audience, you can remove the audience and restrict space access by + * omitting a value for this field mask. To update access settings for a + * space, the authenticating user must be a space manager and omit all other + * field masks in your request. You can't update this field if the space is in + * [import + * mode](https://developers.google.com/workspace/chat/import-data-overview). + * To learn more, see [Make a space discoverable to specific + * users](https://developers.google.com/workspace/chat/space-target-audience). + * `access_settings.audience` is not supported with `useAdminAccess`. + * `permission_settings`: Supports changing the + * [permission settings](https://support.google.com/chat/answer/13340792) + * of a space. + * When updating permission settings, you can only specify + * `permissionSettings` field masks; you cannot update other field masks + * at the same time. `permissionSettings` is not supported with + * `useAdminAccess`. + * The supported field masks include: + * - `permission_settings.manageMembersAndGroups` + * - `permission_settings.modifySpaceDetails` + * - `permission_settings.toggleHistory` + * - `permission_settings.useAtMentionAll` + * - `permission_settings.manageApps` + * - `permission_settings.manageWebhooks` + * - `permission_settings.replyMessages` + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; + */ + protected $update_mask = null; + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.spaces` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Some `FieldMask` values are not supported using admin access. For details, + * see the description of `update_mask`. + * + * Generated from protobuf field bool use_admin_access = 3; + */ + protected $use_admin_access = false; + + /** + * @param \Google\Apps\Chat\V1\Space $space Required. Space with fields to be updated. `Space.name` must be + * populated in the form of `spaces/{space}`. Only fields + * specified by `update_mask` are updated. + * @param \Google\Protobuf\FieldMask $updateMask Required. The updated field paths, comma separated if there are + * multiple. + * + * You can update the following fields for a space: + * + * `space_details`: Updates the space's description. Supports up to 150 + * characters. + * + * `display_name`: Only supports updating the display name for spaces where + * `spaceType` field is `SPACE`. + * If you receive the error message `ALREADY_EXISTS`, try a different + * value. An existing space within the + * Google Workspace organization might already use this display name. + * + * `space_type`: Only supports changing a `GROUP_CHAT` space type to + * `SPACE`. Include `display_name` together + * with `space_type` in the update mask and ensure that the specified space + * has a non-empty display name and the `SPACE` space type. Including the + * `space_type` mask and the `SPACE` type in the specified space when updating + * the display name is optional if the existing space already has the `SPACE` + * type. Trying to update the space type in other ways results in an invalid + * argument error. + * `space_type` is not supported with `useAdminAccess`. + * + * `space_history_state`: Updates [space history + * settings](https://support.google.com/chat/answer/7664687) by turning + * history on or off for the space. Only supported if history settings are + * enabled for the Google Workspace organization. To update the + * space history state, you must omit all other field masks in your request. + * `space_history_state` is not supported with `useAdminAccess`. + * + * `access_settings.audience`: Updates the [access + * setting](https://support.google.com/chat/answer/11971020) of who can + * discover the space, join the space, and preview the messages in named space + * where `spaceType` field is `SPACE`. If the existing space has a + * target audience, you can remove the audience and restrict space access by + * omitting a value for this field mask. To update access settings for a + * space, the authenticating user must be a space manager and omit all other + * field masks in your request. You can't update this field if the space is in + * [import + * mode](https://developers.google.com/workspace/chat/import-data-overview). + * To learn more, see [Make a space discoverable to specific + * users](https://developers.google.com/workspace/chat/space-target-audience). + * `access_settings.audience` is not supported with `useAdminAccess`. + * + * `permission_settings`: Supports changing the + * [permission settings](https://support.google.com/chat/answer/13340792) + * of a space. + * When updating permission settings, you can only specify + * `permissionSettings` field masks; you cannot update other field masks + * at the same time. `permissionSettings` is not supported with + * `useAdminAccess`. + * The supported field masks include: + * + * - `permission_settings.manageMembersAndGroups` + * - `permission_settings.modifySpaceDetails` + * - `permission_settings.toggleHistory` + * - `permission_settings.useAtMentionAll` + * - `permission_settings.manageApps` + * - `permission_settings.manageWebhooks` + * - `permission_settings.replyMessages` + * + * @return \Google\Apps\Chat\V1\UpdateSpaceRequest + * + * @experimental + */ + public static function build(\Google\Apps\Chat\V1\Space $space, \Google\Protobuf\FieldMask $updateMask): self + { + return (new self()) + ->setSpace($space) + ->setUpdateMask($updateMask); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Space $space + * Required. Space with fields to be updated. `Space.name` must be + * populated in the form of `spaces/{space}`. Only fields + * specified by `update_mask` are updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Required. The updated field paths, comma separated if there are + * multiple. + * You can update the following fields for a space: + * `space_details`: Updates the space's description. Supports up to 150 + * characters. + * `display_name`: Only supports updating the display name for spaces where + * `spaceType` field is `SPACE`. + * If you receive the error message `ALREADY_EXISTS`, try a different + * value. An existing space within the + * Google Workspace organization might already use this display name. + * `space_type`: Only supports changing a `GROUP_CHAT` space type to + * `SPACE`. Include `display_name` together + * with `space_type` in the update mask and ensure that the specified space + * has a non-empty display name and the `SPACE` space type. Including the + * `space_type` mask and the `SPACE` type in the specified space when updating + * the display name is optional if the existing space already has the `SPACE` + * type. Trying to update the space type in other ways results in an invalid + * argument error. + * `space_type` is not supported with `useAdminAccess`. + * `space_history_state`: Updates [space history + * settings](https://support.google.com/chat/answer/7664687) by turning + * history on or off for the space. Only supported if history settings are + * enabled for the Google Workspace organization. To update the + * space history state, you must omit all other field masks in your request. + * `space_history_state` is not supported with `useAdminAccess`. + * `access_settings.audience`: Updates the [access + * setting](https://support.google.com/chat/answer/11971020) of who can + * discover the space, join the space, and preview the messages in named space + * where `spaceType` field is `SPACE`. If the existing space has a + * target audience, you can remove the audience and restrict space access by + * omitting a value for this field mask. To update access settings for a + * space, the authenticating user must be a space manager and omit all other + * field masks in your request. You can't update this field if the space is in + * [import + * mode](https://developers.google.com/workspace/chat/import-data-overview). + * To learn more, see [Make a space discoverable to specific + * users](https://developers.google.com/workspace/chat/space-target-audience). + * `access_settings.audience` is not supported with `useAdminAccess`. + * `permission_settings`: Supports changing the + * [permission settings](https://support.google.com/chat/answer/13340792) + * of a space. + * When updating permission settings, you can only specify + * `permissionSettings` field masks; you cannot update other field masks + * at the same time. `permissionSettings` is not supported with + * `useAdminAccess`. + * The supported field masks include: + * - `permission_settings.manageMembersAndGroups` + * - `permission_settings.modifySpaceDetails` + * - `permission_settings.toggleHistory` + * - `permission_settings.useAtMentionAll` + * - `permission_settings.manageApps` + * - `permission_settings.manageWebhooks` + * - `permission_settings.replyMessages` + * @type bool $use_admin_access + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.spaces` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Some `FieldMask` values are not supported using admin access. For details, + * see the description of `update_mask`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Required. Space with fields to be updated. `Space.name` must be + * populated in the form of `spaces/{space}`. Only fields + * specified by `update_mask` are updated. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Chat\V1\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * Required. Space with fields to be updated. `Space.name` must be + * populated in the form of `spaces/{space}`. Only fields + * specified by `update_mask` are updated. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Chat\V1\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); + $this->space = $var; + + return $this; + } + + /** + * Required. The updated field paths, comma separated if there are + * multiple. + * You can update the following fields for a space: + * `space_details`: Updates the space's description. Supports up to 150 + * characters. + * `display_name`: Only supports updating the display name for spaces where + * `spaceType` field is `SPACE`. + * If you receive the error message `ALREADY_EXISTS`, try a different + * value. An existing space within the + * Google Workspace organization might already use this display name. + * `space_type`: Only supports changing a `GROUP_CHAT` space type to + * `SPACE`. Include `display_name` together + * with `space_type` in the update mask and ensure that the specified space + * has a non-empty display name and the `SPACE` space type. Including the + * `space_type` mask and the `SPACE` type in the specified space when updating + * the display name is optional if the existing space already has the `SPACE` + * type. Trying to update the space type in other ways results in an invalid + * argument error. + * `space_type` is not supported with `useAdminAccess`. + * `space_history_state`: Updates [space history + * settings](https://support.google.com/chat/answer/7664687) by turning + * history on or off for the space. Only supported if history settings are + * enabled for the Google Workspace organization. To update the + * space history state, you must omit all other field masks in your request. + * `space_history_state` is not supported with `useAdminAccess`. + * `access_settings.audience`: Updates the [access + * setting](https://support.google.com/chat/answer/11971020) of who can + * discover the space, join the space, and preview the messages in named space + * where `spaceType` field is `SPACE`. If the existing space has a + * target audience, you can remove the audience and restrict space access by + * omitting a value for this field mask. To update access settings for a + * space, the authenticating user must be a space manager and omit all other + * field masks in your request. You can't update this field if the space is in + * [import + * mode](https://developers.google.com/workspace/chat/import-data-overview). + * To learn more, see [Make a space discoverable to specific + * users](https://developers.google.com/workspace/chat/space-target-audience). + * `access_settings.audience` is not supported with `useAdminAccess`. + * `permission_settings`: Supports changing the + * [permission settings](https://support.google.com/chat/answer/13340792) + * of a space. + * When updating permission settings, you can only specify + * `permissionSettings` field masks; you cannot update other field masks + * at the same time. `permissionSettings` is not supported with + * `useAdminAccess`. + * The supported field masks include: + * - `permission_settings.manageMembersAndGroups` + * - `permission_settings.modifySpaceDetails` + * - `permission_settings.toggleHistory` + * - `permission_settings.useAtMentionAll` + * - `permission_settings.manageApps` + * - `permission_settings.manageWebhooks` + * - `permission_settings.replyMessages` + * + * 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); + } + + /** + * Required. The updated field paths, comma separated if there are + * multiple. + * You can update the following fields for a space: + * `space_details`: Updates the space's description. Supports up to 150 + * characters. + * `display_name`: Only supports updating the display name for spaces where + * `spaceType` field is `SPACE`. + * If you receive the error message `ALREADY_EXISTS`, try a different + * value. An existing space within the + * Google Workspace organization might already use this display name. + * `space_type`: Only supports changing a `GROUP_CHAT` space type to + * `SPACE`. Include `display_name` together + * with `space_type` in the update mask and ensure that the specified space + * has a non-empty display name and the `SPACE` space type. Including the + * `space_type` mask and the `SPACE` type in the specified space when updating + * the display name is optional if the existing space already has the `SPACE` + * type. Trying to update the space type in other ways results in an invalid + * argument error. + * `space_type` is not supported with `useAdminAccess`. + * `space_history_state`: Updates [space history + * settings](https://support.google.com/chat/answer/7664687) by turning + * history on or off for the space. Only supported if history settings are + * enabled for the Google Workspace organization. To update the + * space history state, you must omit all other field masks in your request. + * `space_history_state` is not supported with `useAdminAccess`. + * `access_settings.audience`: Updates the [access + * setting](https://support.google.com/chat/answer/11971020) of who can + * discover the space, join the space, and preview the messages in named space + * where `spaceType` field is `SPACE`. If the existing space has a + * target audience, you can remove the audience and restrict space access by + * omitting a value for this field mask. To update access settings for a + * space, the authenticating user must be a space manager and omit all other + * field masks in your request. You can't update this field if the space is in + * [import + * mode](https://developers.google.com/workspace/chat/import-data-overview). + * To learn more, see [Make a space discoverable to specific + * users](https://developers.google.com/workspace/chat/space-target-audience). + * `access_settings.audience` is not supported with `useAdminAccess`. + * `permission_settings`: Supports changing the + * [permission settings](https://support.google.com/chat/answer/13340792) + * of a space. + * When updating permission settings, you can only specify + * `permissionSettings` field masks; you cannot update other field masks + * at the same time. `permissionSettings` is not supported with + * `useAdminAccess`. + * The supported field masks include: + * - `permission_settings.manageMembersAndGroups` + * - `permission_settings.modifySpaceDetails` + * - `permission_settings.toggleHistory` + * - `permission_settings.useAtMentionAll` + * - `permission_settings.manageApps` + * - `permission_settings.manageWebhooks` + * - `permission_settings.replyMessages` + * + * 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; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.spaces` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Some `FieldMask` values are not supported using admin access. For details, + * see the description of `update_mask`. + * + * Generated from protobuf field bool use_admin_access = 3; + * @return bool + */ + public function getUseAdminAccess() + { + return $this->use_admin_access; + } + + /** + * When `true`, the method runs using the user's Google Workspace + * administrator privileges. + * The calling user must be a Google Workspace administrator with the + * [manage chat and spaces conversations + * privilege](https://support.google.com/a/answer/13369245). + * Requires the `chat.admin.spaces` [OAuth 2.0 + * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). + * Some `FieldMask` values are not supported using admin access. For details, + * see the description of `update_mask`. + * + * Generated from protobuf field bool use_admin_access = 3; + * @param bool $var + * @return $this + */ + public function setUseAdminAccess($var) + { + GPBUtil::checkBool($var); + $this->use_admin_access = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentRequest.php new file mode 100644 index 000000000000..2afa91efd97d --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentRequest.php @@ -0,0 +1,105 @@ +google.chat.v1.UploadAttachmentRequest + */ +class UploadAttachmentRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the Chat space in which the attachment is + * uploaded. Format "spaces/{space}". + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Required. The filename of the attachment, including the file extension. + * + * Generated from protobuf field string filename = 4 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $filename = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $parent + * Required. Resource name of the Chat space in which the attachment is + * uploaded. Format "spaces/{space}". + * @type string $filename + * Required. The filename of the attachment, including the file extension. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the Chat space in which the attachment is + * uploaded. Format "spaces/{space}". + * + * 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. Resource name of the Chat space in which the attachment is + * uploaded. Format "spaces/{space}". + * + * 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 filename of the attachment, including the file extension. + * + * Generated from protobuf field string filename = 4 [(.google.api.field_behavior) = REQUIRED]; + * @return string + */ + public function getFilename() + { + return $this->filename; + } + + /** + * Required. The filename of the attachment, including the file extension. + * + * Generated from protobuf field string filename = 4 [(.google.api.field_behavior) = REQUIRED]; + * @param string $var + * @return $this + */ + public function setFilename($var) + { + GPBUtil::checkString($var, True); + $this->filename = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentResponse.php new file mode 100644 index 000000000000..942c71f0fe3b --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentResponse.php @@ -0,0 +1,77 @@ +google.chat.v1.UploadAttachmentResponse + */ +class UploadAttachmentResponse extends \Google\Protobuf\Internal\Message +{ + /** + * Reference to the uploaded attachment. + * + * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 1; + */ + protected $attachment_data_ref = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\AttachmentDataRef $attachment_data_ref + * Reference to the uploaded attachment. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); + parent::__construct($data); + } + + /** + * Reference to the uploaded attachment. + * + * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 1; + * @return \Google\Apps\Chat\V1\AttachmentDataRef|null + */ + public function getAttachmentDataRef() + { + return $this->attachment_data_ref; + } + + public function hasAttachmentDataRef() + { + return isset($this->attachment_data_ref); + } + + public function clearAttachmentDataRef() + { + unset($this->attachment_data_ref); + } + + /** + * Reference to the uploaded attachment. + * + * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 1; + * @param \Google\Apps\Chat\V1\AttachmentDataRef $var + * @return $this + */ + public function setAttachmentDataRef($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\AttachmentDataRef::class); + $this->attachment_data_ref = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User.php new file mode 100644 index 000000000000..87cb7134117f --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User.php @@ -0,0 +1,275 @@ +google.chat.v1.User + */ +class User extends \Google\Protobuf\Internal\Message +{ + /** + * Resource name for a Google Chat [user][google.chat.v1.User]. + * Format: `users/{user}`. `users/app` can be used as an alias for the calling + * app [bot][google.chat.v1.User.Type.BOT] user. + * For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same + * user identifier as: + * - the `id` for the + * [Person](https://developers.google.com/people/api/rest/v1/people) in the + * People API. For example, `users/123456789` in Chat API represents the same + * person as the `123456789` Person profile ID in People API. + * - the `id` for a + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Admin SDK Directory API. + * - the user's email address can be used as an alias for `{user}` in API + * requests. For example, if the People API Person profile ID for + * `user@example.com` is `123456789`, you can use `users/user@example.com` as + * an alias to reference `users/123456789`. Only the canonical resource name + * (for example `users/123456789`) will be returned from the API. + * + * Generated from protobuf field string name = 1; + */ + protected $name = ''; + /** + * Output only. The user's display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + /** + * Unique identifier of the user's Google Workspace domain. + * + * Generated from protobuf field string domain_id = 6; + */ + protected $domain_id = ''; + /** + * User type. + * + * Generated from protobuf field .google.chat.v1.User.Type type = 5; + */ + protected $type = 0; + /** + * Output only. When `true`, the user is deleted or their profile is not + * visible. + * + * Generated from protobuf field bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $is_anonymous = false; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Resource name for a Google Chat [user][google.chat.v1.User]. + * Format: `users/{user}`. `users/app` can be used as an alias for the calling + * app [bot][google.chat.v1.User.Type.BOT] user. + * For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same + * user identifier as: + * - the `id` for the + * [Person](https://developers.google.com/people/api/rest/v1/people) in the + * People API. For example, `users/123456789` in Chat API represents the same + * person as the `123456789` Person profile ID in People API. + * - the `id` for a + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Admin SDK Directory API. + * - the user's email address can be used as an alias for `{user}` in API + * requests. For example, if the People API Person profile ID for + * `user@example.com` is `123456789`, you can use `users/user@example.com` as + * an alias to reference `users/123456789`. Only the canonical resource name + * (for example `users/123456789`) will be returned from the API. + * @type string $display_name + * Output only. The user's display name. + * @type string $domain_id + * Unique identifier of the user's Google Workspace domain. + * @type int $type + * User type. + * @type bool $is_anonymous + * Output only. When `true`, the user is deleted or their profile is not + * visible. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\User::initOnce(); + parent::__construct($data); + } + + /** + * Resource name for a Google Chat [user][google.chat.v1.User]. + * Format: `users/{user}`. `users/app` can be used as an alias for the calling + * app [bot][google.chat.v1.User.Type.BOT] user. + * For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same + * user identifier as: + * - the `id` for the + * [Person](https://developers.google.com/people/api/rest/v1/people) in the + * People API. For example, `users/123456789` in Chat API represents the same + * person as the `123456789` Person profile ID in People API. + * - the `id` for a + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Admin SDK Directory API. + * - the user's email address can be used as an alias for `{user}` in API + * requests. For example, if the People API Person profile ID for + * `user@example.com` is `123456789`, you can use `users/user@example.com` as + * an alias to reference `users/123456789`. Only the canonical resource name + * (for example `users/123456789`) will be returned from the API. + * + * Generated from protobuf field string name = 1; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Resource name for a Google Chat [user][google.chat.v1.User]. + * Format: `users/{user}`. `users/app` can be used as an alias for the calling + * app [bot][google.chat.v1.User.Type.BOT] user. + * For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same + * user identifier as: + * - the `id` for the + * [Person](https://developers.google.com/people/api/rest/v1/people) in the + * People API. For example, `users/123456789` in Chat API represents the same + * person as the `123456789` Person profile ID in People API. + * - the `id` for a + * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) + * in the Admin SDK Directory API. + * - the user's email address can be used as an alias for `{user}` in API + * requests. For example, if the People API Person profile ID for + * `user@example.com` is `123456789`, you can use `users/user@example.com` as + * an alias to reference `users/123456789`. Only the canonical resource name + * (for example `users/123456789`) will be returned from the API. + * + * Generated from protobuf field string name = 1; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. The user's display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. The user's display name. + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDisplayName($var) + { + GPBUtil::checkString($var, True); + $this->display_name = $var; + + return $this; + } + + /** + * Unique identifier of the user's Google Workspace domain. + * + * Generated from protobuf field string domain_id = 6; + * @return string + */ + public function getDomainId() + { + return $this->domain_id; + } + + /** + * Unique identifier of the user's Google Workspace domain. + * + * Generated from protobuf field string domain_id = 6; + * @param string $var + * @return $this + */ + public function setDomainId($var) + { + GPBUtil::checkString($var, True); + $this->domain_id = $var; + + return $this; + } + + /** + * User type. + * + * Generated from protobuf field .google.chat.v1.User.Type type = 5; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * User type. + * + * Generated from protobuf field .google.chat.v1.User.Type type = 5; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\User\Type::class); + $this->type = $var; + + return $this; + } + + /** + * Output only. When `true`, the user is deleted or their profile is not + * visible. + * + * Generated from protobuf field bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return bool + */ + public function getIsAnonymous() + { + return $this->is_anonymous; + } + + /** + * Output only. When `true`, the user is deleted or their profile is not + * visible. + * + * Generated from protobuf field bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param bool $var + * @return $this + */ + public function setIsAnonymous($var) + { + GPBUtil::checkBool($var); + $this->is_anonymous = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User/Type.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User/Type.php new file mode 100644 index 000000000000..c937b1cf005c --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User/Type.php @@ -0,0 +1,62 @@ +google.chat.v1.User.Type + */ +class Type +{ + /** + * Default value for the enum. DO NOT USE. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Human user. + * + * Generated from protobuf enum HUMAN = 1; + */ + const HUMAN = 1; + /** + * Chat app user. + * + * Generated from protobuf enum BOT = 2; + */ + const BOT = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::HUMAN => 'HUMAN', + self::BOT => 'BOT', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Apps\Chat\V1\User_Type::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata.php new file mode 100644 index 000000000000..2ac7ee99c979 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata.php @@ -0,0 +1,111 @@ +google.chat.v1.UserMentionMetadata + */ +class UserMentionMetadata extends \Google\Protobuf\Internal\Message +{ + /** + * The user mentioned. + * + * Generated from protobuf field .google.chat.v1.User user = 1; + */ + protected $user = null; + /** + * The type of user mention. + * + * Generated from protobuf field .google.chat.v1.UserMentionMetadata.Type type = 2; + */ + protected $type = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\User $user + * The user mentioned. + * @type int $type + * The type of user mention. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); + parent::__construct($data); + } + + /** + * The user mentioned. + * + * Generated from protobuf field .google.chat.v1.User user = 1; + * @return \Google\Apps\Chat\V1\User|null + */ + public function getUser() + { + return $this->user; + } + + public function hasUser() + { + return isset($this->user); + } + + public function clearUser() + { + unset($this->user); + } + + /** + * The user mentioned. + * + * Generated from protobuf field .google.chat.v1.User user = 1; + * @param \Google\Apps\Chat\V1\User $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); + $this->user = $var; + + return $this; + } + + /** + * The type of user mention. + * + * Generated from protobuf field .google.chat.v1.UserMentionMetadata.Type type = 2; + * @return int + */ + public function getType() + { + return $this->type; + } + + /** + * The type of user mention. + * + * Generated from protobuf field .google.chat.v1.UserMentionMetadata.Type type = 2; + * @param int $var + * @return $this + */ + public function setType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\UserMentionMetadata\Type::class); + $this->type = $var; + + return $this; + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata/Type.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata/Type.php new file mode 100644 index 000000000000..6ea2e9d41087 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata/Type.php @@ -0,0 +1,62 @@ +google.chat.v1.UserMentionMetadata.Type + */ +class Type +{ + /** + * Default value for the enum. Don't use. + * + * Generated from protobuf enum TYPE_UNSPECIFIED = 0; + */ + const TYPE_UNSPECIFIED = 0; + /** + * Add user to space. + * + * Generated from protobuf enum ADD = 1; + */ + const ADD = 1; + /** + * Mention user in space. + * + * Generated from protobuf enum MENTION = 2; + */ + const MENTION = 2; + + private static $valueToName = [ + self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', + self::ADD => 'ADD', + self::MENTION => 'MENTION', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Type::class, \Google\Apps\Chat\V1\UserMentionMetadata_Type::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup.php new file mode 100644 index 000000000000..e247cc73adae --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup.php @@ -0,0 +1,179 @@ +google.chat.v1.WidgetMarkup + */ +class WidgetMarkup extends \Google\Protobuf\Internal\Message +{ + /** + * A list of buttons. Buttons is also `oneof data` and only one of these + * fields should be set. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.Button buttons = 6; + */ + private $buttons; + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\WidgetMarkup\TextParagraph $text_paragraph + * Display a text paragraph in this widget. + * @type \Google\Apps\Chat\V1\WidgetMarkup\Image $image + * Display an image in this widget. + * @type \Google\Apps\Chat\V1\WidgetMarkup\KeyValue $key_value + * Display a key value item in this widget. + * @type array<\Google\Apps\Chat\V1\WidgetMarkup\Button>|\Google\Protobuf\Internal\RepeatedField $buttons + * A list of buttons. Buttons is also `oneof data` and only one of these + * fields should be set. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * Display a text paragraph in this widget. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1; + * @return \Google\Apps\Chat\V1\WidgetMarkup\TextParagraph|null + */ + public function getTextParagraph() + { + return $this->readOneof(1); + } + + public function hasTextParagraph() + { + return $this->hasOneof(1); + } + + /** + * Display a text paragraph in this widget. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1; + * @param \Google\Apps\Chat\V1\WidgetMarkup\TextParagraph $var + * @return $this + */ + public function setTextParagraph($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\TextParagraph::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * Display an image in this widget. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Image image = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\Image|null + */ + public function getImage() + { + return $this->readOneof(2); + } + + public function hasImage() + { + return $this->hasOneof(2); + } + + /** + * Display an image in this widget. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Image image = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\Image $var + * @return $this + */ + public function setImage($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\Image::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * Display a key value item in this widget. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.KeyValue key_value = 3; + * @return \Google\Apps\Chat\V1\WidgetMarkup\KeyValue|null + */ + public function getKeyValue() + { + return $this->readOneof(3); + } + + public function hasKeyValue() + { + return $this->hasOneof(3); + } + + /** + * Display a key value item in this widget. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.KeyValue key_value = 3; + * @param \Google\Apps\Chat\V1\WidgetMarkup\KeyValue $var + * @return $this + */ + public function setKeyValue($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\KeyValue::class); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * A list of buttons. Buttons is also `oneof data` and only one of these + * fields should be set. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.Button buttons = 6; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getButtons() + { + return $this->buttons; + } + + /** + * A list of buttons. Buttons is also `oneof data` and only one of these + * fields should be set. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.Button buttons = 6; + * @param array<\Google\Apps\Chat\V1\WidgetMarkup\Button>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setButtons($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\WidgetMarkup\Button::class); + $this->buttons = $arr; + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Button.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Button.php new file mode 100644 index 000000000000..4cf6fddbefc8 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Button.php @@ -0,0 +1,111 @@ +google.chat.v1.WidgetMarkup.Button + */ +class Button extends \Google\Protobuf\Internal\Message +{ + protected $type; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\WidgetMarkup\TextButton $text_button + * A button with text and `onclick` action. + * @type \Google\Apps\Chat\V1\WidgetMarkup\ImageButton $image_button + * A button with image and `onclick` action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * A button with text and `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.TextButton text_button = 1; + * @return \Google\Apps\Chat\V1\WidgetMarkup\TextButton|null + */ + public function getTextButton() + { + return $this->readOneof(1); + } + + public function hasTextButton() + { + return $this->hasOneof(1); + } + + /** + * A button with text and `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.TextButton text_button = 1; + * @param \Google\Apps\Chat\V1\WidgetMarkup\TextButton $var + * @return $this + */ + public function setTextButton($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\TextButton::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * A button with image and `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.ImageButton image_button = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\ImageButton|null + */ + public function getImageButton() + { + return $this->readOneof(2); + } + + public function hasImageButton() + { + return $this->hasOneof(2); + } + + /** + * A button with image and `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.ImageButton image_button = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\ImageButton $var + * @return $this + */ + public function setImageButton($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\ImageButton::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getType() + { + return $this->whichOneof("type"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Button::class, \Google\Apps\Chat\V1\WidgetMarkup_Button::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction.php new file mode 100644 index 000000000000..2fdac4140fbf --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction.php @@ -0,0 +1,117 @@ +google.chat.v1.WidgetMarkup.FormAction + */ +class FormAction extends \Google\Protobuf\Internal\Message +{ + /** + * The method name is used to identify which part of the form triggered the + * form submission. This information is echoed back to the Chat app as part + * of the card click event. You can use the same method name for several + * elements that trigger a common behavior. + * + * Generated from protobuf field string action_method_name = 1; + */ + protected $action_method_name = ''; + /** + * List of action parameters. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.FormAction.ActionParameter parameters = 2; + */ + private $parameters; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $action_method_name + * The method name is used to identify which part of the form triggered the + * form submission. This information is echoed back to the Chat app as part + * of the card click event. You can use the same method name for several + * elements that trigger a common behavior. + * @type array<\Google\Apps\Chat\V1\WidgetMarkup\FormAction\ActionParameter>|\Google\Protobuf\Internal\RepeatedField $parameters + * List of action parameters. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * The method name is used to identify which part of the form triggered the + * form submission. This information is echoed back to the Chat app as part + * of the card click event. You can use the same method name for several + * elements that trigger a common behavior. + * + * Generated from protobuf field string action_method_name = 1; + * @return string + */ + public function getActionMethodName() + { + return $this->action_method_name; + } + + /** + * The method name is used to identify which part of the form triggered the + * form submission. This information is echoed back to the Chat app as part + * of the card click event. You can use the same method name for several + * elements that trigger a common behavior. + * + * Generated from protobuf field string action_method_name = 1; + * @param string $var + * @return $this + */ + public function setActionMethodName($var) + { + GPBUtil::checkString($var, True); + $this->action_method_name = $var; + + return $this; + } + + /** + * List of action parameters. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.FormAction.ActionParameter parameters = 2; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * List of action parameters. + * + * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.FormAction.ActionParameter parameters = 2; + * @param array<\Google\Apps\Chat\V1\WidgetMarkup\FormAction\ActionParameter>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParameters($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\WidgetMarkup\FormAction\ActionParameter::class); + $this->parameters = $arr; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(FormAction::class, \Google\Apps\Chat\V1\WidgetMarkup_FormAction::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction/ActionParameter.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction/ActionParameter.php new file mode 100644 index 000000000000..4cdc947613a1 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction/ActionParameter.php @@ -0,0 +1,107 @@ +google.chat.v1.WidgetMarkup.FormAction.ActionParameter + */ +class ActionParameter extends \Google\Protobuf\Internal\Message +{ + /** + * The name of the parameter for the action script. + * + * Generated from protobuf field string key = 1; + */ + protected $key = ''; + /** + * The value of the parameter. + * + * Generated from protobuf field string value = 2; + */ + protected $value = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $key + * The name of the parameter for the action script. + * @type string $value + * The value of the parameter. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * The name of the parameter for the action script. + * + * Generated from protobuf field string key = 1; + * @return string + */ + public function getKey() + { + return $this->key; + } + + /** + * The name of the parameter for the action script. + * + * Generated from protobuf field string key = 1; + * @param string $var + * @return $this + */ + public function setKey($var) + { + GPBUtil::checkString($var, True); + $this->key = $var; + + return $this; + } + + /** + * The value of the parameter. + * + * Generated from protobuf field string value = 2; + * @return string + */ + public function getValue() + { + return $this->value; + } + + /** + * The value of the parameter. + * + * Generated from protobuf field string value = 2; + * @param string $var + * @return $this + */ + public function setValue($var) + { + GPBUtil::checkString($var, True); + $this->value = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ActionParameter::class, \Google\Apps\Chat\V1\WidgetMarkup_FormAction_ActionParameter::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Icon.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Icon.php new file mode 100644 index 000000000000..a94f6e4fad34 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Icon.php @@ -0,0 +1,198 @@ +google.chat.v1.WidgetMarkup.Icon + */ +class Icon +{ + /** + * Generated from protobuf enum ICON_UNSPECIFIED = 0; + */ + const ICON_UNSPECIFIED = 0; + /** + * Generated from protobuf enum AIRPLANE = 1; + */ + const AIRPLANE = 1; + /** + * Generated from protobuf enum BOOKMARK = 26; + */ + const BOOKMARK = 26; + /** + * Generated from protobuf enum BUS = 25; + */ + const BUS = 25; + /** + * Generated from protobuf enum CAR = 9; + */ + const CAR = 9; + /** + * Generated from protobuf enum CLOCK = 2; + */ + const CLOCK = 2; + /** + * Generated from protobuf enum CONFIRMATION_NUMBER_ICON = 12; + */ + const CONFIRMATION_NUMBER_ICON = 12; + /** + * Generated from protobuf enum DOLLAR = 14; + */ + const DOLLAR = 14; + /** + * Generated from protobuf enum DESCRIPTION = 27; + */ + const DESCRIPTION = 27; + /** + * Generated from protobuf enum EMAIL = 10; + */ + const EMAIL = 10; + /** + * Generated from protobuf enum EVENT_PERFORMER = 20; + */ + const EVENT_PERFORMER = 20; + /** + * Generated from protobuf enum EVENT_SEAT = 21; + */ + const EVENT_SEAT = 21; + /** + * Generated from protobuf enum FLIGHT_ARRIVAL = 16; + */ + const FLIGHT_ARRIVAL = 16; + /** + * Generated from protobuf enum FLIGHT_DEPARTURE = 15; + */ + const FLIGHT_DEPARTURE = 15; + /** + * Generated from protobuf enum HOTEL = 6; + */ + const HOTEL = 6; + /** + * Generated from protobuf enum HOTEL_ROOM_TYPE = 17; + */ + const HOTEL_ROOM_TYPE = 17; + /** + * Generated from protobuf enum INVITE = 19; + */ + const INVITE = 19; + /** + * Generated from protobuf enum MAP_PIN = 3; + */ + const MAP_PIN = 3; + /** + * Generated from protobuf enum MEMBERSHIP = 24; + */ + const MEMBERSHIP = 24; + /** + * Generated from protobuf enum MULTIPLE_PEOPLE = 18; + */ + const MULTIPLE_PEOPLE = 18; + /** + * Generated from protobuf enum OFFER = 30; + */ + const OFFER = 30; + /** + * Generated from protobuf enum PERSON = 11; + */ + const PERSON = 11; + /** + * Generated from protobuf enum PHONE = 13; + */ + const PHONE = 13; + /** + * Generated from protobuf enum RESTAURANT_ICON = 7; + */ + const RESTAURANT_ICON = 7; + /** + * Generated from protobuf enum SHOPPING_CART = 8; + */ + const SHOPPING_CART = 8; + /** + * Generated from protobuf enum STAR = 5; + */ + const STAR = 5; + /** + * Generated from protobuf enum STORE = 22; + */ + const STORE = 22; + /** + * Generated from protobuf enum TICKET = 4; + */ + const TICKET = 4; + /** + * Generated from protobuf enum TRAIN = 23; + */ + const TRAIN = 23; + /** + * Generated from protobuf enum VIDEO_CAMERA = 28; + */ + const VIDEO_CAMERA = 28; + /** + * Generated from protobuf enum VIDEO_PLAY = 29; + */ + const VIDEO_PLAY = 29; + + private static $valueToName = [ + self::ICON_UNSPECIFIED => 'ICON_UNSPECIFIED', + self::AIRPLANE => 'AIRPLANE', + self::BOOKMARK => 'BOOKMARK', + self::BUS => 'BUS', + self::CAR => 'CAR', + self::CLOCK => 'CLOCK', + self::CONFIRMATION_NUMBER_ICON => 'CONFIRMATION_NUMBER_ICON', + self::DOLLAR => 'DOLLAR', + self::DESCRIPTION => 'DESCRIPTION', + self::EMAIL => 'EMAIL', + self::EVENT_PERFORMER => 'EVENT_PERFORMER', + self::EVENT_SEAT => 'EVENT_SEAT', + self::FLIGHT_ARRIVAL => 'FLIGHT_ARRIVAL', + self::FLIGHT_DEPARTURE => 'FLIGHT_DEPARTURE', + self::HOTEL => 'HOTEL', + self::HOTEL_ROOM_TYPE => 'HOTEL_ROOM_TYPE', + self::INVITE => 'INVITE', + self::MAP_PIN => 'MAP_PIN', + self::MEMBERSHIP => 'MEMBERSHIP', + self::MULTIPLE_PEOPLE => 'MULTIPLE_PEOPLE', + self::OFFER => 'OFFER', + self::PERSON => 'PERSON', + self::PHONE => 'PHONE', + self::RESTAURANT_ICON => 'RESTAURANT_ICON', + self::SHOPPING_CART => 'SHOPPING_CART', + self::STAR => 'STAR', + self::STORE => 'STORE', + self::TICKET => 'TICKET', + self::TRAIN => 'TRAIN', + self::VIDEO_CAMERA => 'VIDEO_CAMERA', + self::VIDEO_PLAY => 'VIDEO_PLAY', + ]; + + 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); + } +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Icon::class, \Google\Apps\Chat\V1\WidgetMarkup_Icon::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Image.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Image.php new file mode 100644 index 000000000000..3b95b7a6536b --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Image.php @@ -0,0 +1,160 @@ +google.chat.v1.WidgetMarkup.Image + */ +class Image extends \Google\Protobuf\Internal\Message +{ + /** + * The URL of the image. + * + * Generated from protobuf field string image_url = 1; + */ + protected $image_url = ''; + /** + * The `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + */ + protected $on_click = null; + /** + * The aspect ratio of this image (width and height). This field lets you + * reserve the right height for the image while waiting for it to load. + * It's not meant to override the built-in aspect ratio of the image. + * If unset, the server fills it by prefetching the image. + * + * Generated from protobuf field double aspect_ratio = 3; + */ + protected $aspect_ratio = 0.0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $image_url + * The URL of the image. + * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click + * The `onclick` action. + * @type float $aspect_ratio + * The aspect ratio of this image (width and height). This field lets you + * reserve the right height for the image while waiting for it to load. + * It's not meant to override the built-in aspect ratio of the image. + * If unset, the server fills it by prefetching the image. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * The URL of the image. + * + * Generated from protobuf field string image_url = 1; + * @return string + */ + public function getImageUrl() + { + return $this->image_url; + } + + /** + * The URL of the image. + * + * Generated from protobuf field string image_url = 1; + * @param string $var + * @return $this + */ + public function setImageUrl($var) + { + GPBUtil::checkString($var, True); + $this->image_url = $var; + + return $this; + } + + /** + * The `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * The `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); + $this->on_click = $var; + + return $this; + } + + /** + * The aspect ratio of this image (width and height). This field lets you + * reserve the right height for the image while waiting for it to load. + * It's not meant to override the built-in aspect ratio of the image. + * If unset, the server fills it by prefetching the image. + * + * Generated from protobuf field double aspect_ratio = 3; + * @return float + */ + public function getAspectRatio() + { + return $this->aspect_ratio; + } + + /** + * The aspect ratio of this image (width and height). This field lets you + * reserve the right height for the image while waiting for it to load. + * It's not meant to override the built-in aspect ratio of the image. + * If unset, the server fills it by prefetching the image. + * + * Generated from protobuf field double aspect_ratio = 3; + * @param float $var + * @return $this + */ + public function setAspectRatio($var) + { + GPBUtil::checkDouble($var); + $this->aspect_ratio = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(Image::class, \Google\Apps\Chat\V1\WidgetMarkup_Image::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/ImageButton.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/ImageButton.php new file mode 100644 index 000000000000..e226db38d7ac --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/ImageButton.php @@ -0,0 +1,196 @@ +google.chat.v1.WidgetMarkup.ImageButton + */ +class ImageButton extends \Google\Protobuf\Internal\Message +{ + /** + * The `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + */ + protected $on_click = null; + /** + * The name of this `image_button` that's used for accessibility. + * Default value is provided if this name isn't specified. + * + * Generated from protobuf field string name = 4; + */ + protected $name = ''; + protected $icons; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $icon + * The icon specified by an `enum` that indices to an icon provided by + * Chat API. + * @type string $icon_url + * The icon specified by a URL. + * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click + * The `onclick` action. + * @type string $name + * The name of this `image_button` that's used for accessibility. + * Default value is provided if this name isn't specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * The icon specified by an `enum` that indices to an icon provided by + * Chat API. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Icon icon = 1; + * @return int + */ + public function getIcon() + { + return $this->readOneof(1); + } + + public function hasIcon() + { + return $this->hasOneof(1); + } + + /** + * The icon specified by an `enum` that indices to an icon provided by + * Chat API. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Icon icon = 1; + * @param int $var + * @return $this + */ + public function setIcon($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\WidgetMarkup\Icon::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The icon specified by a URL. + * + * Generated from protobuf field string icon_url = 3; + * @return string + */ + public function getIconUrl() + { + return $this->readOneof(3); + } + + public function hasIconUrl() + { + return $this->hasOneof(3); + } + + /** + * The icon specified by a URL. + * + * Generated from protobuf field string icon_url = 3; + * @param string $var + * @return $this + */ + public function setIconUrl($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(3, $var); + + return $this; + } + + /** + * The `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * The `onclick` action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); + $this->on_click = $var; + + return $this; + } + + /** + * The name of this `image_button` that's used for accessibility. + * Default value is provided if this name isn't specified. + * + * Generated from protobuf field string name = 4; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * The name of this `image_button` that's used for accessibility. + * Default value is provided if this name isn't specified. + * + * Generated from protobuf field string name = 4; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * @return string + */ + public function getIcons() + { + return $this->whichOneof("icons"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(ImageButton::class, \Google\Apps\Chat\V1\WidgetMarkup_ImageButton::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/KeyValue.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/KeyValue.php new file mode 100644 index 000000000000..a4a0a65819b7 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/KeyValue.php @@ -0,0 +1,425 @@ +google.chat.v1.WidgetMarkup.KeyValue + */ +class KeyValue extends \Google\Protobuf\Internal\Message +{ + /** + * The text of the top label. Formatted text supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string top_label = 3; + */ + protected $top_label = ''; + /** + * The text of the content. Formatted text supported and always required. + * For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string content = 4; + */ + protected $content = ''; + /** + * If the content should be multiline. + * + * Generated from protobuf field bool content_multiline = 9; + */ + protected $content_multiline = false; + /** + * The text of the bottom label. Formatted text supported. For more + * information about formatting text, see [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string bottom_label = 5; + */ + protected $bottom_label = ''; + /** + * The `onclick` action. Only the top label, bottom label, and content + * region are clickable. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 6; + */ + protected $on_click = null; + protected $icons; + protected $control; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $icon + * An enum value that's replaced by the Chat API with the + * corresponding icon image. + * @type string $icon_url + * The icon specified by a URL. + * @type string $top_label + * The text of the top label. Formatted text supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * @type string $content + * The text of the content. Formatted text supported and always required. + * For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * @type bool $content_multiline + * If the content should be multiline. + * @type string $bottom_label + * The text of the bottom label. Formatted text supported. For more + * information about formatting text, see [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click + * The `onclick` action. Only the top label, bottom label, and content + * region are clickable. + * @type \Google\Apps\Chat\V1\WidgetMarkup\Button $button + * A button that can be clicked to trigger an action. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * An enum value that's replaced by the Chat API with the + * corresponding icon image. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Icon icon = 1; + * @return int + */ + public function getIcon() + { + return $this->readOneof(1); + } + + public function hasIcon() + { + return $this->hasOneof(1); + } + + /** + * An enum value that's replaced by the Chat API with the + * corresponding icon image. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Icon icon = 1; + * @param int $var + * @return $this + */ + public function setIcon($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\WidgetMarkup\Icon::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * The icon specified by a URL. + * + * Generated from protobuf field string icon_url = 2; + * @return string + */ + public function getIconUrl() + { + return $this->readOneof(2); + } + + public function hasIconUrl() + { + return $this->hasOneof(2); + } + + /** + * The icon specified by a URL. + * + * Generated from protobuf field string icon_url = 2; + * @param string $var + * @return $this + */ + public function setIconUrl($var) + { + GPBUtil::checkString($var, True); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * The text of the top label. Formatted text supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string top_label = 3; + * @return string + */ + public function getTopLabel() + { + return $this->top_label; + } + + /** + * The text of the top label. Formatted text supported. For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string top_label = 3; + * @param string $var + * @return $this + */ + public function setTopLabel($var) + { + GPBUtil::checkString($var, True); + $this->top_label = $var; + + return $this; + } + + /** + * The text of the content. Formatted text supported and always required. + * For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string content = 4; + * @return string + */ + public function getContent() + { + return $this->content; + } + + /** + * The text of the content. Formatted text supported and always required. + * For more information + * about formatting text, see + * [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string content = 4; + * @param string $var + * @return $this + */ + public function setContent($var) + { + GPBUtil::checkString($var, True); + $this->content = $var; + + return $this; + } + + /** + * If the content should be multiline. + * + * Generated from protobuf field bool content_multiline = 9; + * @return bool + */ + public function getContentMultiline() + { + return $this->content_multiline; + } + + /** + * If the content should be multiline. + * + * Generated from protobuf field bool content_multiline = 9; + * @param bool $var + * @return $this + */ + public function setContentMultiline($var) + { + GPBUtil::checkBool($var); + $this->content_multiline = $var; + + return $this; + } + + /** + * The text of the bottom label. Formatted text supported. For more + * information about formatting text, see [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string bottom_label = 5; + * @return string + */ + public function getBottomLabel() + { + return $this->bottom_label; + } + + /** + * The text of the bottom label. Formatted text supported. For more + * information about formatting text, see [Formatting text in Google Chat + * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) + * and + * [Formatting + * text in Google Workspace + * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). + * + * Generated from protobuf field string bottom_label = 5; + * @param string $var + * @return $this + */ + public function setBottomLabel($var) + { + GPBUtil::checkString($var, True); + $this->bottom_label = $var; + + return $this; + } + + /** + * The `onclick` action. Only the top label, bottom label, and content + * region are clickable. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 6; + * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * The `onclick` action. Only the top label, bottom label, and content + * region are clickable. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 6; + * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); + $this->on_click = $var; + + return $this; + } + + /** + * A button that can be clicked to trigger an action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Button button = 7; + * @return \Google\Apps\Chat\V1\WidgetMarkup\Button|null + */ + public function getButton() + { + return $this->readOneof(7); + } + + public function hasButton() + { + return $this->hasOneof(7); + } + + /** + * A button that can be clicked to trigger an action. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.Button button = 7; + * @param \Google\Apps\Chat\V1\WidgetMarkup\Button $var + * @return $this + */ + public function setButton($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\Button::class); + $this->writeOneof(7, $var); + + return $this; + } + + /** + * @return string + */ + public function getIcons() + { + return $this->whichOneof("icons"); + } + + /** + * @return string + */ + public function getControl() + { + return $this->whichOneof("control"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(KeyValue::class, \Google\Apps\Chat\V1\WidgetMarkup_KeyValue::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OnClick.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OnClick.php new file mode 100644 index 000000000000..ec79f009d308 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OnClick.php @@ -0,0 +1,111 @@ +google.chat.v1.WidgetMarkup.OnClick + */ +class OnClick extends \Google\Protobuf\Internal\Message +{ + protected $data; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\WidgetMarkup\FormAction $action + * A form action is triggered by this `onclick` action if specified. + * @type \Google\Apps\Chat\V1\WidgetMarkup\OpenLink $open_link + * This `onclick` action triggers an open link action if specified. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * A form action is triggered by this `onclick` action if specified. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.FormAction action = 1; + * @return \Google\Apps\Chat\V1\WidgetMarkup\FormAction|null + */ + public function getAction() + { + return $this->readOneof(1); + } + + public function hasAction() + { + return $this->hasOneof(1); + } + + /** + * A form action is triggered by this `onclick` action if specified. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.FormAction action = 1; + * @param \Google\Apps\Chat\V1\WidgetMarkup\FormAction $var + * @return $this + */ + public function setAction($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\FormAction::class); + $this->writeOneof(1, $var); + + return $this; + } + + /** + * This `onclick` action triggers an open link action if specified. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OpenLink open_link = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\OpenLink|null + */ + public function getOpenLink() + { + return $this->readOneof(2); + } + + public function hasOpenLink() + { + return $this->hasOneof(2); + } + + /** + * This `onclick` action triggers an open link action if specified. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OpenLink open_link = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\OpenLink $var + * @return $this + */ + public function setOpenLink($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OpenLink::class); + $this->writeOneof(2, $var); + + return $this; + } + + /** + * @return string + */ + public function getData() + { + return $this->whichOneof("data"); + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OnClick::class, \Google\Apps\Chat\V1\WidgetMarkup_OnClick::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OpenLink.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OpenLink.php new file mode 100644 index 000000000000..a182dc013a6f --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OpenLink.php @@ -0,0 +1,70 @@ +google.chat.v1.WidgetMarkup.OpenLink + */ +class OpenLink extends \Google\Protobuf\Internal\Message +{ + /** + * The URL to open. + * + * Generated from protobuf field string url = 1; + */ + protected $url = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $url + * The URL to open. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * The URL to open. + * + * Generated from protobuf field string url = 1; + * @return string + */ + public function getUrl() + { + return $this->url; + } + + /** + * The URL to open. + * + * Generated from protobuf field string url = 1; + * @param string $var + * @return $this + */ + public function setUrl($var) + { + GPBUtil::checkString($var, True); + $this->url = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(OpenLink::class, \Google\Apps\Chat\V1\WidgetMarkup_OpenLink::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextButton.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextButton.php new file mode 100644 index 000000000000..91a4806ad5f7 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextButton.php @@ -0,0 +1,114 @@ +google.chat.v1.WidgetMarkup.TextButton + */ +class TextButton extends \Google\Protobuf\Internal\Message +{ + /** + * The text of the button. + * + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + /** + * The `onclick` action of the button. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + */ + protected $on_click = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * The text of the button. + * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click + * The `onclick` action of the button. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * The text of the button. + * + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * The text of the button. + * + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * The `onclick` action of the button. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null + */ + public function getOnClick() + { + return $this->on_click; + } + + public function hasOnClick() + { + return isset($this->on_click); + } + + public function clearOnClick() + { + unset($this->on_click); + } + + /** + * The `onclick` action of the button. + * + * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; + * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var + * @return $this + */ + public function setOnClick($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); + $this->on_click = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TextButton::class, \Google\Apps\Chat\V1\WidgetMarkup_TextButton::class); + diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextParagraph.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextParagraph.php new file mode 100644 index 000000000000..624c786b7b9d --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextParagraph.php @@ -0,0 +1,70 @@ +google.chat.v1.WidgetMarkup.TextParagraph + */ +class TextParagraph extends \Google\Protobuf\Internal\Message +{ + /** + * Generated from protobuf field string text = 1; + */ + protected $text = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $text + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); + parent::__construct($data); + } + + /** + * Generated from protobuf field string text = 1; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Generated from protobuf field string text = 1; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + +} + +// Adding a class alias for backwards compatibility with the previous class name. +class_alias(TextParagraph::class, \Google\Apps\Chat\V1\WidgetMarkup_TextParagraph::class); + diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/complete_import_space.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/complete_import_space.php new file mode 100644 index 000000000000..3a70907c0c48 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/complete_import_space.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var CompleteImportSpaceResponse $response */ + $response = $chatServiceClient->completeImportSpace($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 = ChatServiceClient::spaceName('[SPACE]'); + + complete_import_space_sample($formattedName); +} +// [END chat_v1_generated_ChatService_CompleteImportSpace_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_membership.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_membership.php new file mode 100644 index 000000000000..00c98fef72c7 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_membership.php @@ -0,0 +1,94 @@ +setParent($formattedParent) + ->setMembership($membership); + + // Call the API and handle any network failures. + try { + /** @var Membership $response */ + $response = $chatServiceClient->createMembership($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 = ChatServiceClient::spaceName('[SPACE]'); + + create_membership_sample($formattedParent); +} +// [END chat_v1_generated_ChatService_CreateMembership_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_message.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_message.php new file mode 100644 index 000000000000..d25de7b6334b --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_message.php @@ -0,0 +1,98 @@ +setParent($formattedParent) + ->setMessage($message); + + // Call the API and handle any network failures. + try { + /** @var Message $response */ + $response = $chatServiceClient->createMessage($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 = ChatServiceClient::spaceName('[SPACE]'); + + create_message_sample($formattedParent); +} +// [END chat_v1_generated_ChatService_CreateMessage_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_reaction.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_reaction.php new file mode 100644 index 000000000000..708a409cecff --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_reaction.php @@ -0,0 +1,80 @@ +setParent($formattedParent) + ->setReaction($reaction); + + // Call the API and handle any network failures. + try { + /** @var Reaction $response */ + $response = $chatServiceClient->createReaction($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 = ChatServiceClient::messageName('[SPACE]', '[MESSAGE]'); + + create_reaction_sample($formattedParent); +} +// [END chat_v1_generated_ChatService_CreateReaction_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_space.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_space.php new file mode 100644 index 000000000000..c331bbca54b9 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_space.php @@ -0,0 +1,73 @@ +setSpace($space); + + // Call the API and handle any network failures. + try { + /** @var Space $response */ + $response = $chatServiceClient->createSpace($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_CreateSpace_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_membership.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_membership.php new file mode 100644 index 000000000000..cb6d26d75502 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_membership.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Membership $response */ + $response = $chatServiceClient->deleteMembership($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 = ChatServiceClient::membershipName('[SPACE]', '[MEMBER]'); + + delete_membership_sample($formattedName); +} +// [END chat_v1_generated_ChatService_DeleteMembership_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_message.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_message.php new file mode 100644 index 000000000000..4cba6f6cda36 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_message.php @@ -0,0 +1,88 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $chatServiceClient->deleteMessage($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 = ChatServiceClient::messageName('[SPACE]', '[MESSAGE]'); + + delete_message_sample($formattedName); +} +// [END chat_v1_generated_ChatService_DeleteMessage_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_reaction.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_reaction.php new file mode 100644 index 000000000000..ff8e837d34a5 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_reaction.php @@ -0,0 +1,76 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $chatServiceClient->deleteReaction($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 = ChatServiceClient::reactionName('[SPACE]', '[MESSAGE]', '[REACTION]'); + + delete_reaction_sample($formattedName); +} +// [END chat_v1_generated_ChatService_DeleteReaction_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_space.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_space.php new file mode 100644 index 000000000000..d5cb8b8e282c --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_space.php @@ -0,0 +1,78 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $chatServiceClient->deleteSpace($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 = ChatServiceClient::spaceName('[SPACE]'); + + delete_space_sample($formattedName); +} +// [END chat_v1_generated_ChatService_DeleteSpace_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/find_direct_message.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/find_direct_message.php new file mode 100644 index 000000000000..db4dd111f3d3 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/find_direct_message.php @@ -0,0 +1,100 @@ +setName($name); + + // Call the API and handle any network failures. + try { + /** @var Space $response */ + $response = $chatServiceClient->findDirectMessage($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 +{ + $name = '[NAME]'; + + find_direct_message_sample($name); +} +// [END chat_v1_generated_ChatService_FindDirectMessage_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_attachment.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_attachment.php new file mode 100644 index 000000000000..737520a133b9 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_attachment.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Attachment $response */ + $response = $chatServiceClient->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 = ChatServiceClient::attachmentName('[SPACE]', '[MESSAGE]', '[ATTACHMENT]'); + + get_attachment_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetAttachment_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_membership.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_membership.php new file mode 100644 index 000000000000..2264921471c0 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_membership.php @@ -0,0 +1,93 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Membership $response */ + $response = $chatServiceClient->getMembership($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 = ChatServiceClient::membershipName('[SPACE]', '[MEMBER]'); + + get_membership_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetMembership_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_message.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_message.php new file mode 100644 index 000000000000..b37e14eb6ae3 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_message.php @@ -0,0 +1,90 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Message $response */ + $response = $chatServiceClient->getMessage($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 = ChatServiceClient::messageName('[SPACE]', '[MESSAGE]'); + + get_message_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetMessage_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space.php new file mode 100644 index 000000000000..58a222f3b3c2 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space.php @@ -0,0 +1,83 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Space $response */ + $response = $chatServiceClient->getSpace($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 = ChatServiceClient::spaceName('[SPACE]'); + + get_space_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetSpace_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_event.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_event.php new file mode 100644 index 000000000000..562dacb82ecc --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_event.php @@ -0,0 +1,89 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SpaceEvent $response */ + $response = $chatServiceClient->getSpaceEvent($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 = ChatServiceClient::spaceEventName('[SPACE]', '[SPACE_EVENT]'); + + get_space_event_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetSpaceEvent_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_read_state.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_read_state.php new file mode 100644 index 000000000000..cde139fdc673 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_read_state.php @@ -0,0 +1,91 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var SpaceReadState $response */ + $response = $chatServiceClient->getSpaceReadState($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 = ChatServiceClient::spaceReadStateName('[USER]', '[SPACE]'); + + get_space_read_state_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetSpaceReadState_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_thread_read_state.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_thread_read_state.php new file mode 100644 index 000000000000..c568ce84afa8 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_thread_read_state.php @@ -0,0 +1,92 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ThreadReadState $response */ + $response = $chatServiceClient->getThreadReadState($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 = ChatServiceClient::threadReadStateName('[USER]', '[SPACE]', '[THREAD]'); + + get_thread_read_state_sample($formattedName); +} +// [END chat_v1_generated_ChatService_GetThreadReadState_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_memberships.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_memberships.php new file mode 100644 index 000000000000..2b1320f8efb4 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_memberships.php @@ -0,0 +1,97 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $chatServiceClient->listMemberships($request); + + /** @var Membership $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 = ChatServiceClient::spaceName('[SPACE]'); + + list_memberships_sample($formattedParent); +} +// [END chat_v1_generated_ChatService_ListMemberships_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_messages.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_messages.php new file mode 100644 index 000000000000..5755838d98d7 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_messages.php @@ -0,0 +1,86 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $chatServiceClient->listMessages($request); + + /** @var Message $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 = ChatServiceClient::spaceName('[SPACE]'); + + list_messages_sample($formattedParent); +} +// [END chat_v1_generated_ChatService_ListMessages_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_reactions.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_reactions.php new file mode 100644 index 000000000000..316b53751c4d --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_reactions.php @@ -0,0 +1,82 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $chatServiceClient->listReactions($request); + + /** @var Reaction $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 = ChatServiceClient::messageName('[SPACE]', '[MESSAGE]'); + + list_reactions_sample($formattedParent); +} +// [END chat_v1_generated_ChatService_ListReactions_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_space_events.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_space_events.php new file mode 100644 index 000000000000..6998213ce1c4 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_space_events.php @@ -0,0 +1,147 @@ +setParent($formattedParent) + ->setFilter($filter); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $chatServiceClient->listSpaceEvents($request); + + /** @var SpaceEvent $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 = ChatServiceClient::spaceName('[SPACE]'); + $filter = '[FILTER]'; + + list_space_events_sample($formattedParent, $filter); +} +// [END chat_v1_generated_ChatService_ListSpaceEvents_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_spaces.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_spaces.php new file mode 100644 index 000000000000..b4ccd291b017 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_spaces.php @@ -0,0 +1,80 @@ +listSpaces($request); + + /** @var Space $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 chat_v1_generated_ChatService_ListSpaces_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/search_spaces.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/search_spaces.php new file mode 100644 index 000000000000..fd7b8279f999 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/search_spaces.php @@ -0,0 +1,146 @@ +`, `<=`, `>=`. + * + * `customer` is required and is used to indicate which customer + * to fetch spaces from. `customers/my_customer` is the only supported value. + * + * `display_name` only accepts the `HAS` (`:`) operator. The text to + * match is first tokenized into tokens and each token is prefix-matched + * case-insensitively and independently as a substring anywhere in the space's + * `display_name`. For example, `Fun Eve` matches `Fun event` or `The + * evening was fun`, but not `notFun event` or `even`. + * + * `external_user_allowed` accepts either `true` or `false`. + * + * `space_history_state` only accepts values from the [`historyState`] + * (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) + * field of a `space` resource. + * + * `space_type` is required and the only valid value is `SPACE`. + * + * Across different fields, only `AND` operators are supported. A valid + * example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid + * example is `space_type = "SPACE" OR display_name:"Hello"`. + * + * Among the same field, + * `space_type` doesn't support `AND` or `OR` operators. + * `display_name`, 'space_history_state', and 'external_user_allowed' only + * support `OR` operators. + * `last_active_time` and `create_time` support both `AND` and `OR` operators. + * `AND` can only be used to represent an interval, such as `last_active_time + * < "2022-01-01T00:00:00+00:00" AND last_active_time > + * "2023-01-01T00:00:00+00:00"`. + * + * The following example queries are valid: + * + * ``` + * customer = "customers/my_customer" AND space_type = "SPACE" + * + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * display_name:"Hello World" + * + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > + * "2022-01-01T00:00:00+00:00") + * + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (display_name:"Hello World" OR display_name:"Fun event") AND + * (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < + * "2022-01-01T00:00:00+00:00") + * + * customer = "customers/my_customer" AND space_type = "SPACE" AND + * (create_time > "2019-01-01T00:00:00+00:00" AND create_time < + * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND + * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") + * ``` + */ +function search_spaces_sample(string $query): void +{ + // Create a client. + $chatServiceClient = new ChatServiceClient(); + + // Prepare the request message. + $request = (new SearchSpacesRequest()) + ->setQuery($query); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $chatServiceClient->searchSpaces($request); + + /** @var Space $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 +{ + $query = '[QUERY]'; + + search_spaces_sample($query); +} +// [END chat_v1_generated_ChatService_SearchSpaces_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/set_up_space.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/set_up_space.php new file mode 100644 index 000000000000..8aa0bb6cec83 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/set_up_space.php @@ -0,0 +1,110 @@ +setSpace($space); + + // Call the API and handle any network failures. + try { + /** @var Space $response */ + $response = $chatServiceClient->setUpSpace($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_SetUpSpace_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_membership.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_membership.php new file mode 100644 index 000000000000..387555dc4ec3 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_membership.php @@ -0,0 +1,66 @@ +setMembership($membership) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var Membership $response */ + $response = $chatServiceClient->updateMembership($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_UpdateMembership_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_message.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_message.php new file mode 100644 index 000000000000..1f748c1d8a50 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_message.php @@ -0,0 +1,74 @@ +setMessage($message); + + // Call the API and handle any network failures. + try { + /** @var Message $response */ + $response = $chatServiceClient->updateMessage($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_UpdateMessage_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space.php new file mode 100644 index 000000000000..a50b3fcfbeff --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space.php @@ -0,0 +1,68 @@ +setSpace($space); + + // Call the API and handle any network failures. + try { + /** @var Space $response */ + $response = $chatServiceClient->updateSpace($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_UpdateSpace_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space_read_state.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space_read_state.php new file mode 100644 index 000000000000..3ce3bf8f55dd --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space_read_state.php @@ -0,0 +1,67 @@ +setSpaceReadState($spaceReadState) + ->setUpdateMask($updateMask); + + // Call the API and handle any network failures. + try { + /** @var SpaceReadState $response */ + $response = $chatServiceClient->updateSpaceReadState($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END chat_v1_generated_ChatService_UpdateSpaceReadState_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/upload_attachment.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/upload_attachment.php new file mode 100644 index 000000000000..5312833b0722 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/upload_attachment.php @@ -0,0 +1,83 @@ +setParent($formattedParent) + ->setFilename($filename); + + // Call the API and handle any network failures. + try { + /** @var UploadAttachmentResponse $response */ + $response = $chatServiceClient->uploadAttachment($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 = ChatServiceClient::spaceName('[SPACE]'); + $filename = '[FILENAME]'; + + upload_attachment_sample($formattedParent, $filename); +} +// [END chat_v1_generated_ChatService_UploadAttachment_sync] diff --git a/owl-bot-staging/AppsChat/v1/src/V1/Client/ChatServiceClient.php b/owl-bot-staging/AppsChat/v1/src/V1/Client/ChatServiceClient.php new file mode 100644 index 000000000000..2e3ca506bcbc --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/src/V1/Client/ChatServiceClient.php @@ -0,0 +1,1551 @@ + completeImportSpaceAsync(CompleteImportSpaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMembershipAsync(CreateMembershipRequest $request, array $optionalArgs = []) + * @method PromiseInterface createMessageAsync(CreateMessageRequest $request, array $optionalArgs = []) + * @method PromiseInterface createReactionAsync(CreateReactionRequest $request, array $optionalArgs = []) + * @method PromiseInterface createSpaceAsync(CreateSpaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMembershipAsync(DeleteMembershipRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteMessageAsync(DeleteMessageRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteReactionAsync(DeleteReactionRequest $request, array $optionalArgs = []) + * @method PromiseInterface deleteSpaceAsync(DeleteSpaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface findDirectMessageAsync(FindDirectMessageRequest $request, array $optionalArgs = []) + * @method PromiseInterface getAttachmentAsync(GetAttachmentRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMembershipAsync(GetMembershipRequest $request, array $optionalArgs = []) + * @method PromiseInterface getMessageAsync(GetMessageRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSpaceAsync(GetSpaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSpaceEventAsync(GetSpaceEventRequest $request, array $optionalArgs = []) + * @method PromiseInterface getSpaceReadStateAsync(GetSpaceReadStateRequest $request, array $optionalArgs = []) + * @method PromiseInterface getThreadReadStateAsync(GetThreadReadStateRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMembershipsAsync(ListMembershipsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listMessagesAsync(ListMessagesRequest $request, array $optionalArgs = []) + * @method PromiseInterface listReactionsAsync(ListReactionsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSpaceEventsAsync(ListSpaceEventsRequest $request, array $optionalArgs = []) + * @method PromiseInterface listSpacesAsync(ListSpacesRequest $request, array $optionalArgs = []) + * @method PromiseInterface searchSpacesAsync(SearchSpacesRequest $request, array $optionalArgs = []) + * @method PromiseInterface setUpSpaceAsync(SetUpSpaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMembershipAsync(UpdateMembershipRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateMessageAsync(UpdateMessageRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSpaceAsync(UpdateSpaceRequest $request, array $optionalArgs = []) + * @method PromiseInterface updateSpaceReadStateAsync(UpdateSpaceReadStateRequest $request, array $optionalArgs = []) + * @method PromiseInterface uploadAttachmentAsync(UploadAttachmentRequest $request, array $optionalArgs = []) + */ +final class ChatServiceClient +{ + use GapicClientTrait; + use ResourceHelperTrait; + + /** The name of the service. */ + private const SERVICE_NAME = 'google.chat.v1.ChatService'; + + /** + * The default address of the service. + * + * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. + */ + private const SERVICE_ADDRESS = 'chat.googleapis.com'; + + /** The address template of the service. */ + private const SERVICE_ADDRESS_TEMPLATE = 'chat.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/chat.admin.delete', + 'https://www.googleapis.com/auth/chat.admin.memberships', + 'https://www.googleapis.com/auth/chat.admin.memberships.readonly', + 'https://www.googleapis.com/auth/chat.admin.spaces', + 'https://www.googleapis.com/auth/chat.admin.spaces.readonly', + 'https://www.googleapis.com/auth/chat.bot', + 'https://www.googleapis.com/auth/chat.delete', + 'https://www.googleapis.com/auth/chat.import', + 'https://www.googleapis.com/auth/chat.memberships', + 'https://www.googleapis.com/auth/chat.memberships.app', + 'https://www.googleapis.com/auth/chat.memberships.readonly', + 'https://www.googleapis.com/auth/chat.messages', + 'https://www.googleapis.com/auth/chat.messages.create', + 'https://www.googleapis.com/auth/chat.messages.reactions', + 'https://www.googleapis.com/auth/chat.messages.reactions.create', + 'https://www.googleapis.com/auth/chat.messages.reactions.readonly', + 'https://www.googleapis.com/auth/chat.messages.readonly', + 'https://www.googleapis.com/auth/chat.spaces', + 'https://www.googleapis.com/auth/chat.spaces.create', + 'https://www.googleapis.com/auth/chat.spaces.readonly', + 'https://www.googleapis.com/auth/chat.users.readstate', + 'https://www.googleapis.com/auth/chat.users.readstate.readonly', + ]; + + private static function getClientDefaults() + { + return [ + 'serviceName' => self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/chat_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/chat_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/chat_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/chat_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a attachment + * resource. + * + * @param string $space + * @param string $message + * @param string $attachment + * + * @return string The formatted attachment resource. + */ + public static function attachmentName(string $space, string $message, string $attachment): string + { + return self::getPathTemplate('attachment')->render([ + 'space' => $space, + 'message' => $message, + 'attachment' => $attachment, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a membership + * resource. + * + * @param string $space + * @param string $member + * + * @return string The formatted membership resource. + */ + public static function membershipName(string $space, string $member): string + { + return self::getPathTemplate('membership')->render([ + 'space' => $space, + 'member' => $member, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a message + * resource. + * + * @param string $space + * @param string $message + * + * @return string The formatted message resource. + */ + public static function messageName(string $space, string $message): string + { + return self::getPathTemplate('message')->render([ + 'space' => $space, + 'message' => $message, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * quoted_message_metadata resource. + * + * @param string $space + * @param string $message + * @param string $quotedMessageMetadata + * + * @return string The formatted quoted_message_metadata resource. + */ + public static function quotedMessageMetadataName(string $space, string $message, string $quotedMessageMetadata): string + { + return self::getPathTemplate('quotedMessageMetadata')->render([ + 'space' => $space, + 'message' => $message, + 'quoted_message_metadata' => $quotedMessageMetadata, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a reaction + * resource. + * + * @param string $space + * @param string $message + * @param string $reaction + * + * @return string The formatted reaction resource. + */ + public static function reactionName(string $space, string $message, string $reaction): string + { + return self::getPathTemplate('reaction')->render([ + 'space' => $space, + 'message' => $message, + 'reaction' => $reaction, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a space + * resource. + * + * @param string $space + * + * @return string The formatted space resource. + */ + public static function spaceName(string $space): string + { + return self::getPathTemplate('space')->render([ + 'space' => $space, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a space_event + * resource. + * + * @param string $space + * @param string $spaceEvent + * + * @return string The formatted space_event resource. + */ + public static function spaceEventName(string $space, string $spaceEvent): string + { + return self::getPathTemplate('spaceEvent')->render([ + 'space' => $space, + 'space_event' => $spaceEvent, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * space_read_state resource. + * + * @param string $user + * @param string $space + * + * @return string The formatted space_read_state resource. + */ + public static function spaceReadStateName(string $user, string $space): string + { + return self::getPathTemplate('spaceReadState')->render([ + 'user' => $user, + 'space' => $space, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a thread + * resource. + * + * @param string $space + * @param string $thread + * + * @return string The formatted thread resource. + */ + public static function threadName(string $space, string $thread): string + { + return self::getPathTemplate('thread')->render([ + 'space' => $space, + 'thread' => $thread, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * thread_read_state resource. + * + * @param string $user + * @param string $space + * @param string $thread + * + * @return string The formatted thread_read_state resource. + */ + public static function threadReadStateName(string $user, string $space, string $thread): string + { + return self::getPathTemplate('threadReadState')->render([ + 'user' => $user, + 'space' => $space, + 'thread' => $thread, + ]); + } + + /** + * 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: spaces/{space}/messages/{message}/attachments/{attachment} + * - membership: spaces/{space}/members/{member} + * - message: spaces/{space}/messages/{message} + * - quotedMessageMetadata: spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata} + * - reaction: spaces/{space}/messages/{message}/reactions/{reaction} + * - space: spaces/{space} + * - spaceEvent: spaces/{space}/spaceEvents/{space_event} + * - spaceReadState: users/{user}/spaces/{space}/spaceReadState + * - thread: spaces/{space}/threads/{thread} + * - threadReadState: users/{user}/spaces/{space}/threads/{thread}/threadReadState + * + * 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 $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 'chat.googleapis.com:443'. + * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials + * The credentials to be used by the client to authorize API calls. This option + * accepts either a path to a credentials file, or a decoded credentials file as a + * PHP array. + * *Advanced usage*: In addition, this option can also accept a pre-constructed + * {@see \Google\Auth\FetchAuthTokenInterface} object or + * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these + * objects are provided, any settings in $credentialsConfig will be ignored. + * @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. + * } + * + * @throws ValidationException + */ + public function __construct(array $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); + } + + /** + * Completes the + * [import process](https://developers.google.com/workspace/chat/import-data) + * for the specified space and makes it visible to users. + * Requires app authentication and domain-wide delegation. For more + * information, see [Authorize Google Chat apps to import + * data](https://developers.google.com/workspace/chat/authorize-import). + * + * The async variant is {@see ChatServiceClient::completeImportSpaceAsync()} . + * + * @example samples/V1/ChatServiceClient/complete_import_space.php + * + * @param CompleteImportSpaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return CompleteImportSpaceResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function completeImportSpace(CompleteImportSpaceRequest $request, array $callOptions = []): CompleteImportSpaceResponse + { + return $this->startApiCall('CompleteImportSpace', $request, $callOptions)->wait(); + } + + /** + * Creates a membership for the calling Chat app, a user, or a Google Group. + * Creating memberships for other Chat apps isn't supported. + * When creating a membership, if the specified member has their auto-accept + * policy turned off, then they're invited, and must accept the space + * invitation before joining. Otherwise, creating a membership adds the member + * directly to the specified space. + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * For example usage, see: + * + * - [Invite or add a user to a + * space](https://developers.google.com/workspace/chat/create-members#create-user-membership). + * + * - [Invite or add a Google Group to a + * space](https://developers.google.com/workspace/chat/create-members#create-group-membership). + * + * - [Add the Chat app to a + * space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api). + * + * The async variant is {@see ChatServiceClient::createMembershipAsync()} . + * + * @example samples/V1/ChatServiceClient/create_membership.php + * + * @param CreateMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Membership + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMembership(CreateMembershipRequest $request, array $callOptions = []): Membership + { + return $this->startApiCall('CreateMembership', $request, $callOptions)->wait(); + } + + /** + * Creates a message in a Google Chat space. For an example, see [Send a + * message](https://developers.google.com/workspace/chat/create-messages). + * + * The `create()` method requires either user or app authentication. Chat + * attributes the message sender differently depending on the type of + * authentication that you use in your request. + * + * The following image shows how Chat attributes a message when you use app + * authentication. Chat displays the Chat app as the message + * sender. The content of the message can contain text (`text`), cards + * (`cardsV2`), and accessory widgets (`accessoryWidgets`). + * + * ![Message sent with app + * authentication](https://developers.google.com/workspace/chat/images/message-app-auth.svg) + * + * The following image shows how Chat attributes a message when you use user + * authentication. Chat displays the user as the message sender and attributes + * the Chat app to the message by displaying its name. The content of message + * can only contain text (`text`). + * + * ![Message sent with user + * authentication](https://developers.google.com/workspace/chat/images/message-user-auth.svg) + * + * The maximum message size, including the message contents, is 32,000 bytes. + * + * The async variant is {@see ChatServiceClient::createMessageAsync()} . + * + * @example samples/V1/ChatServiceClient/create_message.php + * + * @param CreateMessageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Message + * + * @throws ApiException Thrown if the API call fails. + */ + public function createMessage(CreateMessageRequest $request, array $callOptions = []): Message + { + return $this->startApiCall('CreateMessage', $request, $callOptions)->wait(); + } + + /** + * Creates a reaction and adds it to a message. Only unicode emojis are + * supported. For an example, see + * [Add a reaction to a + * message](https://developers.google.com/workspace/chat/create-reactions). + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::createReactionAsync()} . + * + * @example samples/V1/ChatServiceClient/create_reaction.php + * + * @param CreateReactionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Reaction + * + * @throws ApiException Thrown if the API call fails. + */ + public function createReaction(CreateReactionRequest $request, array $callOptions = []): Reaction + { + return $this->startApiCall('CreateReaction', $request, $callOptions)->wait(); + } + + /** + * Creates a space with no members. Can be used to create a named space. + * Spaces grouped by topics aren't supported. For an example, see + * [Create a + * space](https://developers.google.com/workspace/chat/create-spaces). + * + * If you receive the error message `ALREADY_EXISTS` when creating + * a space, try a different `displayName`. An existing space within + * the Google Workspace organization might already use this display name. + * + * If you're a member of the [Developer Preview + * program](https://developers.google.com/workspace/preview), you can create a + * group chat in import mode using `spaceType.GROUP_CHAT`. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::createSpaceAsync()} . + * + * @example samples/V1/ChatServiceClient/create_space.php + * + * @param CreateSpaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Space + * + * @throws ApiException Thrown if the API call fails. + */ + public function createSpace(CreateSpaceRequest $request, array $callOptions = []): Space + { + return $this->startApiCall('CreateSpace', $request, $callOptions)->wait(); + } + + /** + * Deletes a membership. For an example, see + * [Remove a user or a Google Chat app from a + * space](https://developers.google.com/workspace/chat/delete-members). + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::deleteMembershipAsync()} . + * + * @example samples/V1/ChatServiceClient/delete_membership.php + * + * @param DeleteMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Membership + * + * @throws ApiException Thrown if the API call fails. + */ + public function deleteMembership(DeleteMembershipRequest $request, array $callOptions = []): Membership + { + return $this->startApiCall('DeleteMembership', $request, $callOptions)->wait(); + } + + /** + * Deletes a message. + * For an example, see [Delete a + * message](https://developers.google.com/workspace/chat/delete-messages). + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * When using app authentication, requests can only delete messages + * created by the calling Chat app. + * + * The async variant is {@see ChatServiceClient::deleteMessageAsync()} . + * + * @example samples/V1/ChatServiceClient/delete_message.php + * + * @param DeleteMessageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteMessage(DeleteMessageRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteMessage', $request, $callOptions)->wait(); + } + + /** + * Deletes a reaction to a message. Only unicode emojis are supported. + * For an example, see + * [Delete a + * reaction](https://developers.google.com/workspace/chat/delete-reactions). + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::deleteReactionAsync()} . + * + * @example samples/V1/ChatServiceClient/delete_reaction.php + * + * @param DeleteReactionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteReaction(DeleteReactionRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteReaction', $request, $callOptions)->wait(); + } + + /** + * Deletes a named space. Always performs a cascading delete, which means + * that the space's child resources—like messages posted in the space and + * memberships in the space—are also deleted. For an example, see + * [Delete a + * space](https://developers.google.com/workspace/chat/delete-spaces). + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * from a user who has permission to delete the space. + * + * The async variant is {@see ChatServiceClient::deleteSpaceAsync()} . + * + * @example samples/V1/ChatServiceClient/delete_space.php + * + * @param DeleteSpaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 deleteSpace(DeleteSpaceRequest $request, array $callOptions = []): void + { + $this->startApiCall('DeleteSpace', $request, $callOptions)->wait(); + } + + /** + * Returns the existing direct message with the specified user. If no direct + * message space is found, returns a `404 NOT_FOUND` error. For an example, + * see + * [Find a direct message](/chat/api/guides/v1/spaces/find-direct-message). + * + * With [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), + * returns the direct message space between the specified user and the + * authenticated user. + * + * With [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app), + * returns the direct message space between the specified user and the calling + * Chat app. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * or [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * The async variant is {@see ChatServiceClient::findDirectMessageAsync()} . + * + * @example samples/V1/ChatServiceClient/find_direct_message.php + * + * @param FindDirectMessageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Space + * + * @throws ApiException Thrown if the API call fails. + */ + public function findDirectMessage(FindDirectMessageRequest $request, array $callOptions = []): Space + { + return $this->startApiCall('FindDirectMessage', $request, $callOptions)->wait(); + } + + /** + * Gets the metadata of a message attachment. The attachment data is fetched + * using the [media + * API](https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download). + * For an example, see + * [Get metadata about a message + * attachment](https://developers.google.com/workspace/chat/get-media-attachments). + * Requires [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). + * + * The async variant is {@see ChatServiceClient::getAttachmentAsync()} . + * + * @example samples/V1/ChatServiceClient/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(); + } + + /** + * Returns details about a membership. For an example, see + * [Get details about a user's or Google Chat app's + * membership](https://developers.google.com/workspace/chat/get-members). + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::getMembershipAsync()} . + * + * @example samples/V1/ChatServiceClient/get_membership.php + * + * @param GetMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Membership + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMembership(GetMembershipRequest $request, array $callOptions = []): Membership + { + return $this->startApiCall('GetMembership', $request, $callOptions)->wait(); + } + + /** + * Returns details about a message. + * For an example, see [Get details about a + * message](https://developers.google.com/workspace/chat/get-messages). + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * Note: Might return a message from a blocked member or space. + * + * The async variant is {@see ChatServiceClient::getMessageAsync()} . + * + * @example samples/V1/ChatServiceClient/get_message.php + * + * @param GetMessageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Message + * + * @throws ApiException Thrown if the API call fails. + */ + public function getMessage(GetMessageRequest $request, array $callOptions = []): Message + { + return $this->startApiCall('GetMessage', $request, $callOptions)->wait(); + } + + /** + * Returns details about a space. For an example, see + * [Get details about a + * space](https://developers.google.com/workspace/chat/get-spaces). + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::getSpaceAsync()} . + * + * @example samples/V1/ChatServiceClient/get_space.php + * + * @param GetSpaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Space + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSpace(GetSpaceRequest $request, array $callOptions = []): Space + { + return $this->startApiCall('GetSpace', $request, $callOptions)->wait(); + } + + /** + * Returns an event from a Google Chat space. The [event + * payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) + * contains the most recent version of the resource that changed. For example, + * if you request an event about a new message but the message was later + * updated, the server returns the updated `Message` resource in the event + * payload. + * + * Note: The `permissionSettings` field is not returned in the Space + * object of the Space event data for this request. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * To get an event, the authenticated user must be a member of the space. + * + * For an example, see [Get details about an + * event from a Google Chat + * space](https://developers.google.com/workspace/chat/get-space-event). + * + * The async variant is {@see ChatServiceClient::getSpaceEventAsync()} . + * + * @example samples/V1/ChatServiceClient/get_space_event.php + * + * @param GetSpaceEventRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SpaceEvent + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSpaceEvent(GetSpaceEventRequest $request, array $callOptions = []): SpaceEvent + { + return $this->startApiCall('GetSpaceEvent', $request, $callOptions)->wait(); + } + + /** + * Returns details about a user's read state within a space, used to identify + * read and unread messages. For an example, see [Get details about a user's + * space read + * state](https://developers.google.com/workspace/chat/get-space-read-state). + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::getSpaceReadStateAsync()} . + * + * @example samples/V1/ChatServiceClient/get_space_read_state.php + * + * @param GetSpaceReadStateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SpaceReadState + * + * @throws ApiException Thrown if the API call fails. + */ + public function getSpaceReadState(GetSpaceReadStateRequest $request, array $callOptions = []): SpaceReadState + { + return $this->startApiCall('GetSpaceReadState', $request, $callOptions)->wait(); + } + + /** + * Returns details about a user's read state within a thread, used to identify + * read and unread messages. For an example, see [Get details about a user's + * thread read + * state](https://developers.google.com/workspace/chat/get-thread-read-state). + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::getThreadReadStateAsync()} . + * + * @example samples/V1/ChatServiceClient/get_thread_read_state.php + * + * @param GetThreadReadStateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ThreadReadState + * + * @throws ApiException Thrown if the API call fails. + */ + public function getThreadReadState(GetThreadReadStateRequest $request, array $callOptions = []): ThreadReadState + { + return $this->startApiCall('GetThreadReadState', $request, $callOptions)->wait(); + } + + /** + * Lists memberships in a space. For an example, see [List users and Google + * Chat apps in a + * space](https://developers.google.com/workspace/chat/list-members). Listing + * memberships with [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * lists memberships in spaces that the Chat app has + * access to, but excludes Chat app memberships, + * including its own. Listing memberships with + * [User + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * lists memberships in spaces that the authenticated user has access to. + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::listMembershipsAsync()} . + * + * @example samples/V1/ChatServiceClient/list_memberships.php + * + * @param ListMembershipsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMemberships(ListMembershipsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMemberships', $request, $callOptions); + } + + /** + * Lists messages in a space that the caller is a member of, including + * messages from blocked members and spaces. If you list messages from a + * space with no messages, the response is an empty object. When using a + * REST/HTTP interface, the response contains an empty JSON object, `{}`. + * For an example, see + * [List + * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list). + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::listMessagesAsync()} . + * + * @example samples/V1/ChatServiceClient/list_messages.php + * + * @param ListMessagesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listMessages(ListMessagesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListMessages', $request, $callOptions); + } + + /** + * Lists reactions to a message. For an example, see + * [List reactions for a + * message](https://developers.google.com/workspace/chat/list-reactions). + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::listReactionsAsync()} . + * + * @example samples/V1/ChatServiceClient/list_reactions.php + * + * @param ListReactionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listReactions(ListReactionsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListReactions', $request, $callOptions); + } + + /** + * Lists events from a Google Chat space. For each event, the + * [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) + * contains the most recent version of the Chat resource. For example, if you + * list events about new space members, the server returns `Membership` + * resources that contain the latest membership details. If new members were + * removed during the requested period, the event payload contains an empty + * `Membership` resource. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * To list events, the authenticated user must be a member of the space. + * + * For an example, see [List events from a Google Chat + * space](https://developers.google.com/workspace/chat/list-space-events). + * + * The async variant is {@see ChatServiceClient::listSpaceEventsAsync()} . + * + * @example samples/V1/ChatServiceClient/list_space_events.php + * + * @param ListSpaceEventsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSpaceEvents(ListSpaceEventsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSpaceEvents', $request, $callOptions); + } + + /** + * Lists spaces the caller is a member of. Group chats and DMs aren't listed + * until the first message is sent. For an example, see + * [List + * spaces](https://developers.google.com/workspace/chat/list-spaces). + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * Lists spaces visible to the caller or authenticated user. Group chats + * and DMs aren't listed until the first message is sent. + * + * To list all named spaces by Google Workspace organization, use the + * [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search) + * method using Workspace administrator privileges instead. + * + * The async variant is {@see ChatServiceClient::listSpacesAsync()} . + * + * @example samples/V1/ChatServiceClient/list_spaces.php + * + * @param ListSpacesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listSpaces(ListSpacesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListSpaces', $request, $callOptions); + } + + /** + * Returns a list of spaces in a Google Workspace organization based on an + * administrator's search. Requires [user + * authentication with administrator + * privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges). + * In the request, set `use_admin_access` to `true`. + * + * The async variant is {@see ChatServiceClient::searchSpacesAsync()} . + * + * @example samples/V1/ChatServiceClient/search_spaces.php + * + * @param SearchSpacesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 searchSpaces(SearchSpacesRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('SearchSpaces', $request, $callOptions); + } + + /** + * Creates a space and adds specified users to it. The calling user is + * automatically added to the space, and shouldn't be specified as a + * membership in the request. For an example, see + * [Set up a space with initial + * members](https://developers.google.com/workspace/chat/set-up-spaces). + * + * To specify the human members to add, add memberships with the appropriate + * `membership.member.name`. To add a human user, use `users/{user}`, where + * `{user}` can be the email address for the user. For users in the same + * Workspace organization `{user}` can also be the `id` for the person from + * the People API, or the `id` for the user in the Directory API. For example, + * if the People API Person profile ID for `user@example.com` is `123456789`, + * you can add the user to the space by setting the `membership.member.name` + * to `users/user@example.com` or `users/123456789`. + * + * To specify the Google groups to add, add memberships with the + * appropriate `membership.group_member.name`. To add or invite a Google + * group, use `groups/{group}`, where `{group}` is the `id` for the group from + * the Cloud Identity Groups API. For example, you can use [Cloud Identity + * Groups lookup + * API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) + * to retrieve the ID `123456789` for group email `group@example.com`, then + * you can add the group to the space by setting the + * `membership.group_member.name` to `groups/123456789`. Group email is not + * supported, and Google groups can only be added as members in named spaces. + * + * For a named space or group chat, if the caller blocks, or is blocked + * by some members, or doesn't have permission to add some members, then + * those members aren't added to the created space. + * + * To create a direct message (DM) between the calling user and another human + * user, specify exactly one membership to represent the human user. If + * one user blocks the other, the request fails and the DM isn't created. + * + * To create a DM between the calling user and the calling app, set + * `Space.singleUserBotDm` to `true` and don't specify any memberships. You + * can only use this method to set up a DM with the calling app. To add the + * calling app as a member of a space or an existing DM between two human + * users, see + * [Invite or add a user or app to a + * space](https://developers.google.com/workspace/chat/create-members). + * + * If a DM already exists between two users, even when one user blocks the + * other at the time a request is made, then the existing DM is returned. + * + * Spaces with threaded replies aren't supported. If you receive the error + * message `ALREADY_EXISTS` when setting up a space, try a different + * `displayName`. An existing space within the Google Workspace organization + * might already use this display name. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::setUpSpaceAsync()} . + * + * @example samples/V1/ChatServiceClient/set_up_space.php + * + * @param SetUpSpaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Space + * + * @throws ApiException Thrown if the API call fails. + */ + public function setUpSpace(SetUpSpaceRequest $request, array $callOptions = []): Space + { + return $this->startApiCall('SetUpSpace', $request, $callOptions)->wait(); + } + + /** + * Updates a membership. For an example, see [Update a user's membership in + * a space](https://developers.google.com/workspace/chat/update-members). + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::updateMembershipAsync()} . + * + * @example samples/V1/ChatServiceClient/update_membership.php + * + * @param UpdateMembershipRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Membership + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMembership(UpdateMembershipRequest $request, array $callOptions = []): Membership + { + return $this->startApiCall('UpdateMembership', $request, $callOptions)->wait(); + } + + /** + * Updates a message. There's a difference between the `patch` and `update` + * methods. The `patch` + * method uses a `patch` request while the `update` method uses a `put` + * request. We recommend using the `patch` method. For an example, see + * [Update a + * message](https://developers.google.com/workspace/chat/update-messages). + * + * Requires + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). + * Supports + * [app + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) + * and [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * When using app authentication, requests can only update messages + * created by the calling Chat app. + * + * The async variant is {@see ChatServiceClient::updateMessageAsync()} . + * + * @example samples/V1/ChatServiceClient/update_message.php + * + * @param UpdateMessageRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Message + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateMessage(UpdateMessageRequest $request, array $callOptions = []): Message + { + return $this->startApiCall('UpdateMessage', $request, $callOptions)->wait(); + } + + /** + * Updates a space. For an example, see + * [Update a + * space](https://developers.google.com/workspace/chat/update-spaces). + * + * If you're updating the `displayName` field and receive the error message + * `ALREADY_EXISTS`, try a different display name.. An existing space within + * the Google Workspace organization might already use this display name. + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::updateSpaceAsync()} . + * + * @example samples/V1/ChatServiceClient/update_space.php + * + * @param UpdateSpaceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Space + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSpace(UpdateSpaceRequest $request, array $callOptions = []): Space + { + return $this->startApiCall('UpdateSpace', $request, $callOptions)->wait(); + } + + /** + * Updates a user's read state within a space, used to identify read and + * unread messages. For an example, see [Update a user's space read + * state](https://developers.google.com/workspace/chat/update-space-read-state). + * + * Requires [user + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * The async variant is {@see ChatServiceClient::updateSpaceReadStateAsync()} . + * + * @example samples/V1/ChatServiceClient/update_space_read_state.php + * + * @param UpdateSpaceReadStateRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return SpaceReadState + * + * @throws ApiException Thrown if the API call fails. + */ + public function updateSpaceReadState(UpdateSpaceReadStateRequest $request, array $callOptions = []): SpaceReadState + { + return $this->startApiCall('UpdateSpaceReadState', $request, $callOptions)->wait(); + } + + /** + * Uploads an attachment. For an example, see + * [Upload media as a file + * attachment](https://developers.google.com/workspace/chat/upload-media-attachments). + * Requires user + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). + * + * You can upload attachments up to 200 MB. Certain file types aren't + * supported. For details, see [File types blocked by Google + * Chat](https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat). + * + * The async variant is {@see ChatServiceClient::uploadAttachmentAsync()} . + * + * @example samples/V1/ChatServiceClient/upload_attachment.php + * + * @param UploadAttachmentRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return UploadAttachmentResponse + * + * @throws ApiException Thrown if the API call fails. + */ + public function uploadAttachment(UploadAttachmentRequest $request, array $callOptions = []): UploadAttachmentResponse + { + return $this->startApiCall('UploadAttachment', $request, $callOptions)->wait(); + } +} diff --git a/owl-bot-staging/AppsChat/v1/src/V1/gapic_metadata.json b/owl-bot-staging/AppsChat/v1/src/V1/gapic_metadata.json new file mode 100644 index 000000000000..7cb823611f39 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/src/V1/gapic_metadata.json @@ -0,0 +1,163 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.chat.v1", + "libraryPackage": "Google\\Apps\\Chat\\V1", + "services": { + "ChatService": { + "clients": { + "grpc": { + "libraryClient": "ChatServiceGapicClient", + "rpcs": { + "CompleteImportSpace": { + "methods": [ + "completeImportSpace" + ] + }, + "CreateMembership": { + "methods": [ + "createMembership" + ] + }, + "CreateMessage": { + "methods": [ + "createMessage" + ] + }, + "CreateReaction": { + "methods": [ + "createReaction" + ] + }, + "CreateSpace": { + "methods": [ + "createSpace" + ] + }, + "DeleteMembership": { + "methods": [ + "deleteMembership" + ] + }, + "DeleteMessage": { + "methods": [ + "deleteMessage" + ] + }, + "DeleteReaction": { + "methods": [ + "deleteReaction" + ] + }, + "DeleteSpace": { + "methods": [ + "deleteSpace" + ] + }, + "FindDirectMessage": { + "methods": [ + "findDirectMessage" + ] + }, + "GetAttachment": { + "methods": [ + "getAttachment" + ] + }, + "GetMembership": { + "methods": [ + "getMembership" + ] + }, + "GetMessage": { + "methods": [ + "getMessage" + ] + }, + "GetSpace": { + "methods": [ + "getSpace" + ] + }, + "GetSpaceEvent": { + "methods": [ + "getSpaceEvent" + ] + }, + "GetSpaceReadState": { + "methods": [ + "getSpaceReadState" + ] + }, + "GetThreadReadState": { + "methods": [ + "getThreadReadState" + ] + }, + "ListMemberships": { + "methods": [ + "listMemberships" + ] + }, + "ListMessages": { + "methods": [ + "listMessages" + ] + }, + "ListReactions": { + "methods": [ + "listReactions" + ] + }, + "ListSpaceEvents": { + "methods": [ + "listSpaceEvents" + ] + }, + "ListSpaces": { + "methods": [ + "listSpaces" + ] + }, + "SearchSpaces": { + "methods": [ + "searchSpaces" + ] + }, + "SetUpSpace": { + "methods": [ + "setUpSpace" + ] + }, + "UpdateMembership": { + "methods": [ + "updateMembership" + ] + }, + "UpdateMessage": { + "methods": [ + "updateMessage" + ] + }, + "UpdateSpace": { + "methods": [ + "updateSpace" + ] + }, + "UpdateSpaceReadState": { + "methods": [ + "updateSpaceReadState" + ] + }, + "UploadAttachment": { + "methods": [ + "uploadAttachment" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_client_config.json b/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_client_config.json new file mode 100644 index 000000000000..0d68bca79608 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_client_config.json @@ -0,0 +1,179 @@ +{ + "interfaces": { + "google.chat.v1.ChatService": { + "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": 30000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 30000, + "total_timeout_millis": 30000 + } + }, + "methods": { + "CompleteImportSpace": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateMembership": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateMessage": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateReaction": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "CreateSpace": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteMembership": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteMessage": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteReaction": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "DeleteSpace": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "FindDirectMessage": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetAttachment": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetMembership": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetMessage": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSpace": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSpaceEvent": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetSpaceReadState": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetThreadReadState": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListMemberships": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListMessages": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListReactions": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSpaceEvents": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListSpaces": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SearchSpaces": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "SetUpSpace": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateMembership": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateMessage": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateSpace": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateSpaceReadState": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UploadAttachment": { + "timeout_millis": 30000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_descriptor_config.php b/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_descriptor_config.php new file mode 100644 index 000000000000..2b4955688054 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_descriptor_config.php @@ -0,0 +1,400 @@ + [ + 'google.chat.v1.ChatService' => [ + 'CompleteImportSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\CompleteImportSpaceResponse', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'CreateMembership' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Membership', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMessage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Message', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReaction' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Reaction', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Space', + ], + 'DeleteMembership' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Membership', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMessage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReaction' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'FindDirectMessage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Space', + ], + 'GetAttachment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Attachment', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMembership' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Membership', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetMessage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Message', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Space', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSpaceEvent' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\SpaceEvent', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSpaceReadState' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\SpaceReadState', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetThreadReadState' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\ThreadReadState', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListMemberships' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMemberships', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Chat\V1\ListMembershipsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListMessages' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getMessages', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Chat\V1\ListMessagesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListReactions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getReactions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Chat\V1\ListReactionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSpaceEvents' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSpaceEvents', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Chat\V1\ListSpaceEventsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListSpaces' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSpaces', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Chat\V1\ListSpacesResponse', + ], + 'SearchSpaces' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getSpaces', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Chat\V1\SearchSpacesResponse', + ], + 'SetUpSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Space', + ], + 'UpdateMembership' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Membership', + 'headerParams' => [ + [ + 'keyName' => 'membership.name', + 'fieldAccessors' => [ + 'getMembership', + 'getName', + ], + ], + ], + ], + 'UpdateMessage' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Message', + 'headerParams' => [ + [ + 'keyName' => 'message.name', + 'fieldAccessors' => [ + 'getMessage', + 'getName', + ], + ], + ], + ], + 'UpdateSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\Space', + 'headerParams' => [ + [ + 'keyName' => 'space.name', + 'fieldAccessors' => [ + 'getSpace', + 'getName', + ], + ], + ], + ], + 'UpdateSpaceReadState' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\SpaceReadState', + 'headerParams' => [ + [ + 'keyName' => 'space_read_state.name', + 'fieldAccessors' => [ + 'getSpaceReadState', + 'getName', + ], + ], + ], + ], + 'UploadAttachment' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Chat\V1\UploadAttachmentResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'attachment' => 'spaces/{space}/messages/{message}/attachments/{attachment}', + 'membership' => 'spaces/{space}/members/{member}', + 'message' => 'spaces/{space}/messages/{message}', + 'quotedMessageMetadata' => 'spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}', + 'reaction' => 'spaces/{space}/messages/{message}/reactions/{reaction}', + 'space' => 'spaces/{space}', + 'spaceEvent' => 'spaces/{space}/spaceEvents/{space_event}', + 'spaceReadState' => 'users/{user}/spaces/{space}/spaceReadState', + 'thread' => 'spaces/{space}/threads/{thread}', + 'threadReadState' => 'users/{user}/spaces/{space}/threads/{thread}/threadReadState', + ], + ], + ], +]; diff --git a/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_rest_client_config.php b/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_rest_client_config.php new file mode 100644 index 000000000000..70a4a1080af3 --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_rest_client_config.php @@ -0,0 +1,344 @@ + [ + 'google.chat.v1.ChatService' => [ + 'CompleteImportSpace' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{name=spaces/*}:completeImport', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'CreateMembership' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=spaces/*}/members', + 'body' => 'membership', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateMessage' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=spaces/*}/messages', + 'body' => 'message', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateReaction' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=spaces/*/messages/*}/reactions', + 'body' => 'reaction', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'CreateSpace' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/spaces', + 'body' => 'space', + ], + 'DeleteMembership' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=spaces/*/members/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteMessage' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=spaces/*/messages/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteReaction' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=spaces/*/messages/*/reactions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'DeleteSpace' => [ + 'method' => 'delete', + 'uriTemplate' => '/v1/{name=spaces/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'FindDirectMessage' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/spaces:findDirectMessage', + ], + 'GetAttachment' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=spaces/*/messages/*/attachments/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMembership' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=spaces/*/members/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetMessage' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=spaces/*/messages/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSpace' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=spaces/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSpaceEvent' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=spaces/*/spaceEvents/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSpaceReadState' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=users/*/spaces/*/spaceReadState}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetThreadReadState' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{name=users/*/spaces/*/threads/*/threadReadState}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListMemberships' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=spaces/*}/members', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListMessages' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=spaces/*}/messages', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListReactions' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=spaces/*/messages/*}/reactions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListSpaceEvents' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/{parent=spaces/*}/spaceEvents', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + 'queryParams' => [ + 'filter', + ], + ], + 'ListSpaces' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/spaces', + ], + 'SearchSpaces' => [ + 'method' => 'get', + 'uriTemplate' => '/v1/spaces:search', + ], + 'SetUpSpace' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/spaces:setup', + 'body' => '*', + ], + 'UpdateMembership' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{membership.name=spaces/*/members/*}', + 'body' => 'membership', + 'placeholders' => [ + 'membership.name' => [ + 'getters' => [ + 'getMembership', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UpdateMessage' => [ + 'method' => 'put', + 'uriTemplate' => '/v1/{message.name=spaces/*/messages/*}', + 'body' => 'message', + 'additionalBindings' => [ + [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{message.name=spaces/*/messages/*}', + 'body' => 'message', + ], + ], + 'placeholders' => [ + 'message.name' => [ + 'getters' => [ + 'getMessage', + 'getName', + ], + ], + ], + ], + 'UpdateSpace' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{space.name=spaces/*}', + 'body' => 'space', + 'placeholders' => [ + 'space.name' => [ + 'getters' => [ + 'getSpace', + 'getName', + ], + ], + ], + ], + 'UpdateSpaceReadState' => [ + 'method' => 'patch', + 'uriTemplate' => '/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}', + 'body' => 'space_read_state', + 'placeholders' => [ + 'space_read_state.name' => [ + 'getters' => [ + 'getSpaceReadState', + 'getName', + ], + ], + ], + 'queryParams' => [ + 'update_mask', + ], + ], + 'UploadAttachment' => [ + 'method' => 'post', + 'uriTemplate' => '/v1/{parent=spaces/*}/attachments:upload', + 'body' => '*', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/owl-bot-staging/AppsChat/v1/tests/Unit/V1/Client/ChatServiceClientTest.php b/owl-bot-staging/AppsChat/v1/tests/Unit/V1/Client/ChatServiceClientTest.php new file mode 100644 index 000000000000..8895c578d1dd --- /dev/null +++ b/owl-bot-staging/AppsChat/v1/tests/Unit/V1/Client/ChatServiceClientTest.php @@ -0,0 +1,2177 @@ +getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); + } + + /** @return ChatServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ChatServiceClient($options); + } + + /** @test */ + public function completeImportSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CompleteImportSpaceResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spaceName('[SPACE]'); + $request = (new CompleteImportSpaceRequest()) + ->setName($formattedName); + $response = $gapicClient->completeImportSpace($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/CompleteImportSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function completeImportSpaceExceptionTest() + { + $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->spaceName('[SPACE]'); + $request = (new CompleteImportSpaceRequest()) + ->setName($formattedName); + try { + $gapicClient->completeImportSpace($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 createMembershipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $membership = new Membership(); + $request = (new CreateMembershipRequest()) + ->setParent($formattedParent) + ->setMembership($membership); + $response = $gapicClient->createMembership($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/CreateMembership', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getMembership(); + $this->assertProtobufEquals($membership, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createMembershipExceptionTest() + { + $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->spaceName('[SPACE]'); + $membership = new Membership(); + $request = (new CreateMembershipRequest()) + ->setParent($formattedParent) + ->setMembership($membership); + try { + $gapicClient->createMembership($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 createMessageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $text = 'text3556653'; + $formattedText = 'formattedText-1686936880'; + $fallbackText = 'fallbackText563106922'; + $argumentText = 'argumentText-39826065'; + $threadReply = false; + $clientAssignedMessageId = 'clientAssignedMessageId-1116632848'; + $expectedResponse = new Message(); + $expectedResponse->setName($name); + $expectedResponse->setText($text); + $expectedResponse->setFormattedText($formattedText); + $expectedResponse->setFallbackText($fallbackText); + $expectedResponse->setArgumentText($argumentText); + $expectedResponse->setThreadReply($threadReply); + $expectedResponse->setClientAssignedMessageId($clientAssignedMessageId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $message = new Message(); + $request = (new CreateMessageRequest()) + ->setParent($formattedParent) + ->setMessage($message); + $response = $gapicClient->createMessage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/CreateMessage', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getMessage(); + $this->assertProtobufEquals($message, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createMessageExceptionTest() + { + $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->spaceName('[SPACE]'); + $message = new Message(); + $request = (new CreateMessageRequest()) + ->setParent($formattedParent) + ->setMessage($message); + try { + $gapicClient->createMessage($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 createReactionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Reaction(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); + $reaction = new Reaction(); + $request = (new CreateReactionRequest()) + ->setParent($formattedParent) + ->setReaction($reaction); + $response = $gapicClient->createReaction($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/CreateReaction', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getReaction(); + $this->assertProtobufEquals($reaction, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createReactionExceptionTest() + { + $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->messageName('[SPACE]', '[MESSAGE]'); + $reaction = new Reaction(); + $request = (new CreateReactionRequest()) + ->setParent($formattedParent) + ->setReaction($reaction); + try { + $gapicClient->createReaction($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 createSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $singleUserBotDm = true; + $threaded = false; + $displayName = 'displayName1615086568'; + $externalUserAllowed = true; + $importMode = false; + $adminInstalled = true; + $spaceUri = 'spaceUri-953552205'; + $expectedResponse = new Space(); + $expectedResponse->setName($name); + $expectedResponse->setSingleUserBotDm($singleUserBotDm); + $expectedResponse->setThreaded($threaded); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalUserAllowed($externalUserAllowed); + $expectedResponse->setImportMode($importMode); + $expectedResponse->setAdminInstalled($adminInstalled); + $expectedResponse->setSpaceUri($spaceUri); + $transport->addResponse($expectedResponse); + // Mock request + $space = new Space(); + $request = (new CreateSpaceRequest()) + ->setSpace($space); + $response = $gapicClient->createSpace($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/CreateSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getSpace(); + $this->assertProtobufEquals($space, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function createSpaceExceptionTest() + { + $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 + $space = new Space(); + $request = (new CreateSpaceRequest()) + ->setSpace($space); + try { + $gapicClient->createSpace($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 deleteMembershipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipName('[SPACE]', '[MEMBER]'); + $request = (new DeleteMembershipRequest()) + ->setName($formattedName); + $response = $gapicClient->deleteMembership($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/DeleteMembership', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMembershipExceptionTest() + { + $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->membershipName('[SPACE]', '[MEMBER]'); + $request = (new DeleteMembershipRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteMembership($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 deleteMessageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); + $request = (new DeleteMessageRequest()) + ->setName($formattedName); + $gapicClient->deleteMessage($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/DeleteMessage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteMessageExceptionTest() + { + $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->messageName('[SPACE]', '[MESSAGE]'); + $request = (new DeleteMessageRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteMessage($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 deleteReactionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->reactionName('[SPACE]', '[MESSAGE]', '[REACTION]'); + $request = (new DeleteReactionRequest()) + ->setName($formattedName); + $gapicClient->deleteReaction($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/DeleteReaction', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteReactionExceptionTest() + { + $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->reactionName('[SPACE]', '[MESSAGE]', '[REACTION]'); + $request = (new DeleteReactionRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteReaction($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 deleteSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new GPBEmpty(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spaceName('[SPACE]'); + $request = (new DeleteSpaceRequest()) + ->setName($formattedName); + $gapicClient->deleteSpace($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/DeleteSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function deleteSpaceExceptionTest() + { + $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->spaceName('[SPACE]'); + $request = (new DeleteSpaceRequest()) + ->setName($formattedName); + try { + $gapicClient->deleteSpace($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 findDirectMessageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $singleUserBotDm = true; + $threaded = false; + $displayName = 'displayName1615086568'; + $externalUserAllowed = true; + $importMode = false; + $adminInstalled = true; + $spaceUri = 'spaceUri-953552205'; + $expectedResponse = new Space(); + $expectedResponse->setName($name2); + $expectedResponse->setSingleUserBotDm($singleUserBotDm); + $expectedResponse->setThreaded($threaded); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalUserAllowed($externalUserAllowed); + $expectedResponse->setImportMode($importMode); + $expectedResponse->setAdminInstalled($adminInstalled); + $expectedResponse->setSpaceUri($spaceUri); + $transport->addResponse($expectedResponse); + // Mock request + $name = 'name3373707'; + $request = (new FindDirectMessageRequest()) + ->setName($name); + $response = $gapicClient->findDirectMessage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/FindDirectMessage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($name, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function findDirectMessageExceptionTest() + { + $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 + $name = 'name3373707'; + $request = (new FindDirectMessageRequest()) + ->setName($name); + try { + $gapicClient->findDirectMessage($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 getAttachmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $contentName = 'contentName831644305'; + $contentType = 'contentType831846208'; + $thumbnailUri = 'thumbnailUri1825632153'; + $downloadUri = 'downloadUri1109408053'; + $expectedResponse = new Attachment(); + $expectedResponse->setName($name2); + $expectedResponse->setContentName($contentName); + $expectedResponse->setContentType($contentType); + $expectedResponse->setThumbnailUri($thumbnailUri); + $expectedResponse->setDownloadUri($downloadUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->attachmentName('[SPACE]', '[MESSAGE]', '[ATTACHMENT]'); + $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.chat.v1.ChatService/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('[SPACE]', '[MESSAGE]', '[ATTACHMENT]'); + $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 getMembershipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->membershipName('[SPACE]', '[MEMBER]'); + $request = (new GetMembershipRequest()) + ->setName($formattedName); + $response = $gapicClient->getMembership($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetMembership', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMembershipExceptionTest() + { + $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->membershipName('[SPACE]', '[MEMBER]'); + $request = (new GetMembershipRequest()) + ->setName($formattedName); + try { + $gapicClient->getMembership($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 getMessageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $text = 'text3556653'; + $formattedText = 'formattedText-1686936880'; + $fallbackText = 'fallbackText563106922'; + $argumentText = 'argumentText-39826065'; + $threadReply = false; + $clientAssignedMessageId = 'clientAssignedMessageId-1116632848'; + $expectedResponse = new Message(); + $expectedResponse->setName($name2); + $expectedResponse->setText($text); + $expectedResponse->setFormattedText($formattedText); + $expectedResponse->setFallbackText($fallbackText); + $expectedResponse->setArgumentText($argumentText); + $expectedResponse->setThreadReply($threadReply); + $expectedResponse->setClientAssignedMessageId($clientAssignedMessageId); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); + $request = (new GetMessageRequest()) + ->setName($formattedName); + $response = $gapicClient->getMessage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetMessage', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getMessageExceptionTest() + { + $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->messageName('[SPACE]', '[MESSAGE]'); + $request = (new GetMessageRequest()) + ->setName($formattedName); + try { + $gapicClient->getMessage($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 getSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $singleUserBotDm = true; + $threaded = false; + $displayName = 'displayName1615086568'; + $externalUserAllowed = true; + $importMode = false; + $adminInstalled = true; + $spaceUri = 'spaceUri-953552205'; + $expectedResponse = new Space(); + $expectedResponse->setName($name2); + $expectedResponse->setSingleUserBotDm($singleUserBotDm); + $expectedResponse->setThreaded($threaded); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalUserAllowed($externalUserAllowed); + $expectedResponse->setImportMode($importMode); + $expectedResponse->setAdminInstalled($adminInstalled); + $expectedResponse->setSpaceUri($spaceUri); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spaceName('[SPACE]'); + $request = (new GetSpaceRequest()) + ->setName($formattedName); + $response = $gapicClient->getSpace($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSpaceExceptionTest() + { + $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->spaceName('[SPACE]'); + $request = (new GetSpaceRequest()) + ->setName($formattedName); + try { + $gapicClient->getSpace($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 getSpaceEventTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $eventType = 'eventType984376767'; + $expectedResponse = new SpaceEvent(); + $expectedResponse->setName($name2); + $expectedResponse->setEventType($eventType); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spaceEventName('[SPACE]', '[SPACE_EVENT]'); + $request = (new GetSpaceEventRequest()) + ->setName($formattedName); + $response = $gapicClient->getSpaceEvent($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetSpaceEvent', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSpaceEventExceptionTest() + { + $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->spaceEventName('[SPACE]', '[SPACE_EVENT]'); + $request = (new GetSpaceEventRequest()) + ->setName($formattedName); + try { + $gapicClient->getSpaceEvent($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 getSpaceReadStateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new SpaceReadState(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spaceReadStateName('[USER]', '[SPACE]'); + $request = (new GetSpaceReadStateRequest()) + ->setName($formattedName); + $response = $gapicClient->getSpaceReadState($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetSpaceReadState', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getSpaceReadStateExceptionTest() + { + $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->spaceReadStateName('[USER]', '[SPACE]'); + $request = (new GetSpaceReadStateRequest()) + ->setName($formattedName); + try { + $gapicClient->getSpaceReadState($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 getThreadReadStateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new ThreadReadState(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->threadReadStateName('[USER]', '[SPACE]', '[THREAD]'); + $request = (new GetThreadReadStateRequest()) + ->setName($formattedName); + $response = $gapicClient->getThreadReadState($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/GetThreadReadState', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getThreadReadStateExceptionTest() + { + $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->threadReadStateName('[USER]', '[SPACE]', '[THREAD]'); + $request = (new GetThreadReadStateRequest()) + ->setName($formattedName); + try { + $gapicClient->getThreadReadState($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 listMembershipsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $membershipsElement = new Membership(); + $memberships = [ + $membershipsElement, + ]; + $expectedResponse = new ListMembershipsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMemberships($memberships); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $request = (new ListMembershipsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listMemberships($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMemberships()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/ListMemberships', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMembershipsExceptionTest() + { + $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->spaceName('[SPACE]'); + $request = (new ListMembershipsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listMemberships($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 listMessagesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $messagesElement = new Message(); + $messages = [ + $messagesElement, + ]; + $expectedResponse = new ListMessagesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setMessages($messages); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $request = (new ListMessagesRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listMessages($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getMessages()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/ListMessages', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listMessagesExceptionTest() + { + $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->spaceName('[SPACE]'); + $request = (new ListMessagesRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listMessages($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 listReactionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $reactionsElement = new Reaction(); + $reactions = [ + $reactionsElement, + ]; + $expectedResponse = new ListReactionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setReactions($reactions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); + $request = (new ListReactionsRequest()) + ->setParent($formattedParent); + $response = $gapicClient->listReactions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getReactions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/ListReactions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listReactionsExceptionTest() + { + $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->messageName('[SPACE]', '[MESSAGE]'); + $request = (new ListReactionsRequest()) + ->setParent($formattedParent); + try { + $gapicClient->listReactions($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 listSpaceEventsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $spaceEventsElement = new SpaceEvent(); + $spaceEvents = [ + $spaceEventsElement, + ]; + $expectedResponse = new ListSpaceEventsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSpaceEvents($spaceEvents); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $filter = 'filter-1274492040'; + $request = (new ListSpaceEventsRequest()) + ->setParent($formattedParent) + ->setFilter($filter); + $response = $gapicClient->listSpaceEvents($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSpaceEvents()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/ListSpaceEvents', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFilter(); + $this->assertProtobufEquals($filter, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSpaceEventsExceptionTest() + { + $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->spaceName('[SPACE]'); + $filter = 'filter-1274492040'; + $request = (new ListSpaceEventsRequest()) + ->setParent($formattedParent) + ->setFilter($filter); + try { + $gapicClient->listSpaceEvents($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 listSpacesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $spacesElement = new Space(); + $spaces = [ + $spacesElement, + ]; + $expectedResponse = new ListSpacesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setSpaces($spaces); + $transport->addResponse($expectedResponse); + $request = new ListSpacesRequest(); + $response = $gapicClient->listSpaces($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSpaces()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/ListSpaces', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listSpacesExceptionTest() + { + $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 ListSpacesRequest(); + try { + $gapicClient->listSpaces($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 searchSpacesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $spacesElement = new Space(); + $spaces = [ + $spacesElement, + ]; + $expectedResponse = new SearchSpacesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setSpaces($spaces); + $transport->addResponse($expectedResponse); + // Mock request + $query = 'query107944136'; + $request = (new SearchSpacesRequest()) + ->setQuery($query); + $response = $gapicClient->searchSpaces($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getSpaces()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/SearchSpaces', $actualFuncCall); + $actualValue = $actualRequestObject->getQuery(); + $this->assertProtobufEquals($query, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function searchSpacesExceptionTest() + { + $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 + $query = 'query107944136'; + $request = (new SearchSpacesRequest()) + ->setQuery($query); + try { + $gapicClient->searchSpaces($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 setUpSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $singleUserBotDm = true; + $threaded = false; + $displayName = 'displayName1615086568'; + $externalUserAllowed = true; + $importMode = false; + $adminInstalled = true; + $spaceUri = 'spaceUri-953552205'; + $expectedResponse = new Space(); + $expectedResponse->setName($name); + $expectedResponse->setSingleUserBotDm($singleUserBotDm); + $expectedResponse->setThreaded($threaded); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalUserAllowed($externalUserAllowed); + $expectedResponse->setImportMode($importMode); + $expectedResponse->setAdminInstalled($adminInstalled); + $expectedResponse->setSpaceUri($spaceUri); + $transport->addResponse($expectedResponse); + // Mock request + $space = new Space(); + $request = (new SetUpSpaceRequest()) + ->setSpace($space); + $response = $gapicClient->setUpSpace($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/SetUpSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getSpace(); + $this->assertProtobufEquals($space, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function setUpSpaceExceptionTest() + { + $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 + $space = new Space(); + $request = (new SetUpSpaceRequest()) + ->setSpace($space); + try { + $gapicClient->setUpSpace($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 updateMembershipTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new Membership(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $membership = new Membership(); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipRequest()) + ->setMembership($membership) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateMembership($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/UpdateMembership', $actualFuncCall); + $actualValue = $actualRequestObject->getMembership(); + $this->assertProtobufEquals($membership, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateMembershipExceptionTest() + { + $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 + $membership = new Membership(); + $updateMask = new FieldMask(); + $request = (new UpdateMembershipRequest()) + ->setMembership($membership) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateMembership($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 updateMessageTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $text = 'text3556653'; + $formattedText = 'formattedText-1686936880'; + $fallbackText = 'fallbackText563106922'; + $argumentText = 'argumentText-39826065'; + $threadReply = false; + $clientAssignedMessageId = 'clientAssignedMessageId-1116632848'; + $expectedResponse = new Message(); + $expectedResponse->setName($name); + $expectedResponse->setText($text); + $expectedResponse->setFormattedText($formattedText); + $expectedResponse->setFallbackText($fallbackText); + $expectedResponse->setArgumentText($argumentText); + $expectedResponse->setThreadReply($threadReply); + $expectedResponse->setClientAssignedMessageId($clientAssignedMessageId); + $transport->addResponse($expectedResponse); + // Mock request + $message = new Message(); + $request = (new UpdateMessageRequest()) + ->setMessage($message); + $response = $gapicClient->updateMessage($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/UpdateMessage', $actualFuncCall); + $actualValue = $actualRequestObject->getMessage(); + $this->assertProtobufEquals($message, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateMessageExceptionTest() + { + $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 + $message = new Message(); + $request = (new UpdateMessageRequest()) + ->setMessage($message); + try { + $gapicClient->updateMessage($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 updateSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $singleUserBotDm = true; + $threaded = false; + $displayName = 'displayName1615086568'; + $externalUserAllowed = true; + $importMode = false; + $adminInstalled = true; + $spaceUri = 'spaceUri-953552205'; + $expectedResponse = new Space(); + $expectedResponse->setName($name); + $expectedResponse->setSingleUserBotDm($singleUserBotDm); + $expectedResponse->setThreaded($threaded); + $expectedResponse->setDisplayName($displayName); + $expectedResponse->setExternalUserAllowed($externalUserAllowed); + $expectedResponse->setImportMode($importMode); + $expectedResponse->setAdminInstalled($adminInstalled); + $expectedResponse->setSpaceUri($spaceUri); + $transport->addResponse($expectedResponse); + // Mock request + $space = new Space(); + $request = (new UpdateSpaceRequest()) + ->setSpace($space); + $response = $gapicClient->updateSpace($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/UpdateSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getSpace(); + $this->assertProtobufEquals($space, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSpaceExceptionTest() + { + $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 + $space = new Space(); + $request = (new UpdateSpaceRequest()) + ->setSpace($space); + try { + $gapicClient->updateSpace($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 updateSpaceReadStateTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $expectedResponse = new SpaceReadState(); + $expectedResponse->setName($name); + $transport->addResponse($expectedResponse); + // Mock request + $spaceReadState = new SpaceReadState(); + $updateMask = new FieldMask(); + $request = (new UpdateSpaceReadStateRequest()) + ->setSpaceReadState($spaceReadState) + ->setUpdateMask($updateMask); + $response = $gapicClient->updateSpaceReadState($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/UpdateSpaceReadState', $actualFuncCall); + $actualValue = $actualRequestObject->getSpaceReadState(); + $this->assertProtobufEquals($spaceReadState, $actualValue); + $actualValue = $actualRequestObject->getUpdateMask(); + $this->assertProtobufEquals($updateMask, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function updateSpaceReadStateExceptionTest() + { + $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 + $spaceReadState = new SpaceReadState(); + $updateMask = new FieldMask(); + $request = (new UpdateSpaceReadStateRequest()) + ->setSpaceReadState($spaceReadState) + ->setUpdateMask($updateMask); + try { + $gapicClient->updateSpaceReadState($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 uploadAttachmentTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new UploadAttachmentResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->spaceName('[SPACE]'); + $filename = 'filename-734768633'; + $request = (new UploadAttachmentRequest()) + ->setParent($formattedParent) + ->setFilename($filename); + $response = $gapicClient->uploadAttachment($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.chat.v1.ChatService/UploadAttachment', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $actualValue = $actualRequestObject->getFilename(); + $this->assertProtobufEquals($filename, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function uploadAttachmentExceptionTest() + { + $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->spaceName('[SPACE]'); + $filename = 'filename-734768633'; + $request = (new UploadAttachmentRequest()) + ->setParent($formattedParent) + ->setFilename($filename); + try { + $gapicClient->uploadAttachment($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 completeImportSpaceAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $expectedResponse = new CompleteImportSpaceResponse(); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->spaceName('[SPACE]'); + $request = (new CompleteImportSpaceRequest()) + ->setName($formattedName); + $response = $gapicClient->completeImportSpaceAsync($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.chat.v1.ChatService/CompleteImportSpace', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} From a74264c880d4e8e6191a33ea6f48c42035b97c02 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 4 Dec 2024 01:05:44 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- AppsChat/metadata/Chat/V1/Space.php | Bin 4824 -> 4890 bytes AppsChat/src/Chat/V1/Space.php | 60 + .../GPBMetadata/Google/Apps/Card/V1/Card.php | Bin 8612 -> 0 bytes .../proto/src/Google/Apps/Card/V1/Action.php | 331 --- .../Apps/Card/V1/Action/ActionParameter.php | 111 - .../Apps/Card/V1/Action/Interaction.php | 74 - .../Apps/Card/V1/Action/LoadIndicator.php | 60 - .../src/Google/Apps/Card/V1/BorderStyle.php | 148 -- .../Apps/Card/V1/BorderStyle/BorderType.php | 66 - .../proto/src/Google/Apps/Card/V1/Button.php | 400 --- .../src/Google/Apps/Card/V1/ButtonList.php | 72 - .../v1/proto/src/Google/Apps/Card/V1/Card.php | 638 ----- .../Google/Apps/Card/V1/Card/CardAction.php | 118 - .../Apps/Card/V1/Card/CardFixedFooter.php | 146 -- .../Google/Apps/Card/V1/Card/CardHeader.php | 233 -- .../Google/Apps/Card/V1/Card/DisplayStyle.php | 71 - .../Google/Apps/Card/V1/Card/DividerStyle.php | 67 - .../src/Google/Apps/Card/V1/Card/Section.php | 255 -- .../proto/src/Google/Apps/Card/V1/Columns.php | 91 - .../Google/Apps/Card/V1/Columns/Column.php | 188 -- .../V1/Columns/Column/HorizontalSizeStyle.php | 73 - .../V1/Columns/Column/VerticalAlignment.php | 76 - .../Apps/Card/V1/Columns/Column/Widgets.php | 280 --- .../Google/Apps/Card/V1/DateTimePicker.php | 314 --- .../V1/DateTimePicker/DateTimePickerType.php | 67 - .../src/Google/Apps/Card/V1/DecoratedText.php | 480 ---- .../Card/V1/DecoratedText/SwitchControl.php | 247 -- .../SwitchControl/ControlType.php | 70 - .../proto/src/Google/Apps/Card/V1/Divider.php | 42 - .../v1/proto/src/Google/Apps/Card/V1/Grid.php | 281 --- .../src/Google/Apps/Card/V1/Grid/GridItem.php | 223 -- .../Card/V1/Grid/GridItem/GridItemLayout.php | 66 - .../v1/proto/src/Google/Apps/Card/V1/Icon.php | 318 --- .../proto/src/Google/Apps/Card/V1/Image.php | 165 -- .../Google/Apps/Card/V1/ImageComponent.php | 191 -- .../Google/Apps/Card/V1/ImageCropStyle.php | 138 -- .../Card/V1/ImageCropStyle/ImageCropType.php | 81 - .../src/Google/Apps/Card/V1/MaterialIcon.php | 250 -- .../proto/src/Google/Apps/Card/V1/OnClick.php | 198 -- .../src/Google/Apps/Card/V1/OpenLink.php | 157 -- .../Google/Apps/Card/V1/OpenLink/OnClose.php | 67 - .../Google/Apps/Card/V1/OpenLink/OpenAs.php | 64 - .../Google/Apps/Card/V1/SelectionInput.php | 439 ---- .../V1/SelectionInput/PlatformDataSource.php | 85 - .../PlatformDataSource/CommonDataSource.php | 61 - .../Card/V1/SelectionInput/SelectionItem.php | 245 -- .../Card/V1/SelectionInput/SelectionType.php | 106 - .../src/Google/Apps/Card/V1/Suggestions.php | 84 - .../Card/V1/Suggestions/SuggestionItem.php | 83 - .../src/Google/Apps/Card/V1/TextInput.php | 532 ---- .../Google/Apps/Card/V1/TextInput/Type.php | 62 - .../src/Google/Apps/Card/V1/TextParagraph.php | 79 - .../proto/src/Google/Apps/Card/V1/Widget.php | 1062 -------- .../Card/V1/Widget/HorizontalAlignment.php | 76 - .../Google/Apps/Card/V1/Widget/ImageType.php | 61 - .../Google/Chat/V1/ActionStatus.php | 31 - .../GPBMetadata/Google/Chat/V1/Annotation.php | Bin 2391 -> 0 bytes .../GPBMetadata/Google/Chat/V1/Attachment.php | Bin 1793 -> 0 bytes .../Google/Chat/V1/ChatService.php | Bin 7235 -> 0 bytes .../Google/Chat/V1/ContextualAddon.php | Bin 1493 -> 0 bytes .../Google/Chat/V1/DeletionMetadata.php | Bin 1037 -> 0 bytes .../Google/Chat/V1/EventPayload.php | 71 - .../src/GPBMetadata/Google/Chat/V1/Group.php | 30 - .../Google/Chat/V1/HistoryState.php | Bin 851 -> 0 bytes .../GPBMetadata/Google/Chat/V1/MatchedUrl.php | 31 - .../GPBMetadata/Google/Chat/V1/Membership.php | Bin 2784 -> 0 bytes .../GPBMetadata/Google/Chat/V1/Message.php | Bin 5788 -> 0 bytes .../GPBMetadata/Google/Chat/V1/Reaction.php | Bin 1861 -> 0 bytes .../Google/Chat/V1/SlashCommand.php | 30 - .../src/GPBMetadata/Google/Chat/V1/Space.php | Bin 4890 -> 0 bytes .../GPBMetadata/Google/Chat/V1/SpaceEvent.php | Bin 3151 -> 0 bytes .../Google/Chat/V1/SpaceReadState.php | 41 - .../GPBMetadata/Google/Chat/V1/SpaceSetup.php | 35 - .../Google/Chat/V1/ThreadReadState.php | 37 - .../src/GPBMetadata/Google/Chat/V1/User.php | Bin 1065 -> 0 bytes .../GPBMetadata/Google/Chat/V1/Widgets.php | Bin 2663 -> 0 bytes .../Google/Apps/Chat/V1/AccessoryWidget.php | 77 - .../Google/Apps/Chat/V1/ActionResponse.php | 201 -- .../Chat/V1/ActionResponse/ResponseType.php | 96 - .../Chat/V1/ActionResponse/SelectionItems.php | 70 - .../Chat/V1/ActionResponse/UpdatedWidget.php | 117 - .../src/Google/Apps/Chat/V1/ActionStatus.php | 106 - .../src/Google/Apps/Chat/V1/Annotation.php | 285 --- .../Google/Apps/Chat/V1/AnnotationType.php | 68 - .../src/Google/Apps/Chat/V1/AttachedGif.php | 67 - .../src/Google/Apps/Chat/V1/Attachment.php | 338 --- .../Google/Apps/Chat/V1/Attachment/Source.php | 64 - .../Google/Apps/Chat/V1/AttachmentDataRef.php | 113 - .../src/Google/Apps/Chat/V1/CardWithId.php | 121 - .../Google/Apps/Chat/V1/ChatSpaceLinkData.php | 147 -- .../Chat/V1/CompleteImportSpaceRequest.php | 71 - .../Chat/V1/CompleteImportSpaceResponse.php | 77 - .../Apps/Chat/V1/ContextualAddOnMarkup.php | 33 - .../Chat/V1/ContextualAddOnMarkup/Card.php | 183 -- .../ContextualAddOnMarkup/Card/CardAction.php | 118 - .../ContextualAddOnMarkup/Card/CardHeader.php | 178 -- .../Card/CardHeader/ImageStyle.php | 60 - .../V1/ContextualAddOnMarkup/Card/Section.php | 139 -- .../Apps/Chat/V1/CreateMembershipRequest.php | 283 --- .../Apps/Chat/V1/CreateMessageRequest.php | 370 --- .../MessageReplyOption.php | 74 - .../Apps/Chat/V1/CreateReactionRequest.php | 133 - .../Apps/Chat/V1/CreateSpaceRequest.php | 192 -- .../src/Google/Apps/Chat/V1/CustomEmoji.php | 67 - .../Apps/Chat/V1/DeleteMembershipRequest.php | 196 -- .../Apps/Chat/V1/DeleteMessageRequest.php | 162 -- .../Apps/Chat/V1/DeleteReactionRequest.php | 87 - .../Apps/Chat/V1/DeleteSpaceRequest.php | 145 -- .../Google/Apps/Chat/V1/DeletionMetadata.php | 68 - .../Chat/V1/DeletionMetadata/DeletionType.php | 92 - .../proto/src/Google/Apps/Chat/V1/Dialog.php | 85 - .../src/Google/Apps/Chat/V1/DialogAction.php | 139 -- .../src/Google/Apps/Chat/V1/DriveDataRef.php | 67 - .../src/Google/Apps/Chat/V1/DriveLinkData.php | 119 - .../proto/src/Google/Apps/Chat/V1/Emoji.php | 108 - .../Apps/Chat/V1/EmojiReactionSummary.php | 121 - .../Apps/Chat/V1/FindDirectMessageRequest.php | 111 - .../Apps/Chat/V1/GetAttachmentRequest.php | 86 - .../Apps/Chat/V1/GetMembershipRequest.php | 195 -- .../Google/Apps/Chat/V1/GetMessageRequest.php | 108 - .../Apps/Chat/V1/GetSpaceEventRequest.php | 87 - .../Apps/Chat/V1/GetSpaceReadStateRequest.php | 127 - .../Google/Apps/Chat/V1/GetSpaceRequest.php | 145 -- .../Chat/V1/GetThreadReadStateRequest.php | 132 - .../proto/src/Google/Apps/Chat/V1/Group.php | 83 - .../src/Google/Apps/Chat/V1/HistoryState.php | 65 - .../Apps/Chat/V1/ListMembershipsRequest.php | 512 ---- .../Apps/Chat/V1/ListMembershipsResponse.php | 105 - .../Apps/Chat/V1/ListMessagesRequest.php | 421 ---- .../Apps/Chat/V1/ListMessagesResponse.php | 105 - .../Apps/Chat/V1/ListReactionsRequest.php | 349 --- .../Apps/Chat/V1/ListReactionsResponse.php | 105 - .../Apps/Chat/V1/ListSpaceEventsRequest.php | 444 ---- .../Apps/Chat/V1/ListSpaceEventsResponse.php | 113 - .../Google/Apps/Chat/V1/ListSpacesRequest.php | 219 -- .../Apps/Chat/V1/ListSpacesResponse.php | 113 - .../src/Google/Apps/Chat/V1/MatchedUrl.php | 69 - .../src/Google/Apps/Chat/V1/Membership.php | 342 --- .../Chat/V1/Membership/MembershipRole.php | 73 - .../Chat/V1/Membership/MembershipState.php | 73 - .../V1/MembershipBatchCreatedEventData.php | 68 - .../V1/MembershipBatchDeletedEventData.php | 68 - .../V1/MembershipBatchUpdatedEventData.php | 68 - .../Chat/V1/MembershipCreatedEventData.php | 78 - .../Chat/V1/MembershipDeletedEventData.php | 78 - .../Chat/V1/MembershipUpdatedEventData.php | 78 - .../proto/src/Google/Apps/Chat/V1/Message.php | 1426 ----------- .../Chat/V1/MessageBatchCreatedEventData.php | 68 - .../Chat/V1/MessageBatchDeletedEventData.php | 68 - .../Chat/V1/MessageBatchUpdatedEventData.php | 68 - .../Apps/Chat/V1/MessageCreatedEventData.php | 78 - .../Apps/Chat/V1/MessageDeletedEventData.php | 82 - .../Apps/Chat/V1/MessageUpdatedEventData.php | 78 - .../Apps/Chat/V1/QuotedMessageMetadata.php | 119 - .../src/Google/Apps/Chat/V1/Reaction.php | 159 -- .../Chat/V1/ReactionBatchCreatedEventData.php | 68 - .../Chat/V1/ReactionBatchDeletedEventData.php | 68 - .../Apps/Chat/V1/ReactionCreatedEventData.php | 78 - .../Apps/Chat/V1/ReactionDeletedEventData.php | 78 - .../Google/Apps/Chat/V1/RichLinkMetadata.php | 176 -- .../Chat/V1/RichLinkMetadata/RichLinkType.php | 64 - .../Apps/Chat/V1/SearchSpacesRequest.php | 539 ---- .../Apps/Chat/V1/SearchSpacesResponse.php | 143 -- .../Google/Apps/Chat/V1/SetUpSpaceRequest.php | 317 --- .../src/Google/Apps/Chat/V1/SlashCommand.php | 69 - .../Apps/Chat/V1/SlashCommandMetadata.php | 213 -- .../Chat/V1/SlashCommandMetadata/Type.php | 62 - .../proto/src/Google/Apps/Chat/V1/Space.php | 978 -------- .../Apps/Chat/V1/Space/AccessSettings.php | 149 -- .../V1/Space/AccessSettings/AccessState.php | 74 - .../Apps/Chat/V1/Space/MembershipCount.php | 108 - .../Apps/Chat/V1/Space/PermissionSetting.php | 104 - .../Apps/Chat/V1/Space/PermissionSettings.php | 391 --- .../V1/Space/PredefinedPermissionSettings.php | 69 - .../Apps/Chat/V1/Space/SpaceDetails.php | 116 - .../Chat/V1/Space/SpaceThreadingState.php | 75 - .../Google/Apps/Chat/V1/Space/SpaceType.php | 74 - .../src/Google/Apps/Chat/V1/Space/Type.php | 65 - .../Chat/V1/SpaceBatchUpdatedEventData.php | 68 - .../src/Google/Apps/Chat/V1/SpaceEvent.php | 956 -------- .../Google/Apps/Chat/V1/SpaceReadState.php | 124 - .../Apps/Chat/V1/SpaceUpdatedEventData.php | 78 - .../proto/src/Google/Apps/Chat/V1/Thread.php | 134 - .../Google/Apps/Chat/V1/ThreadReadState.php | 120 - .../Apps/Chat/V1/UpdateMembershipRequest.php | 216 -- .../Apps/Chat/V1/UpdateMessageRequest.php | 238 -- .../Chat/V1/UpdateSpaceReadStateRequest.php | 230 -- .../Apps/Chat/V1/UpdateSpaceRequest.php | 480 ---- .../Apps/Chat/V1/UploadAttachmentRequest.php | 105 - .../Apps/Chat/V1/UploadAttachmentResponse.php | 77 - .../v1/proto/src/Google/Apps/Chat/V1/User.php | 275 --- .../src/Google/Apps/Chat/V1/User/Type.php | 62 - .../Apps/Chat/V1/UserMentionMetadata.php | 111 - .../Apps/Chat/V1/UserMentionMetadata/Type.php | 62 - .../src/Google/Apps/Chat/V1/WidgetMarkup.php | 179 -- .../Apps/Chat/V1/WidgetMarkup/Button.php | 111 - .../Apps/Chat/V1/WidgetMarkup/FormAction.php | 117 - .../FormAction/ActionParameter.php | 107 - .../Google/Apps/Chat/V1/WidgetMarkup/Icon.php | 198 -- .../Apps/Chat/V1/WidgetMarkup/Image.php | 160 -- .../Apps/Chat/V1/WidgetMarkup/ImageButton.php | 196 -- .../Apps/Chat/V1/WidgetMarkup/KeyValue.php | 425 ---- .../Apps/Chat/V1/WidgetMarkup/OnClick.php | 111 - .../Apps/Chat/V1/WidgetMarkup/OpenLink.php | 70 - .../Apps/Chat/V1/WidgetMarkup/TextButton.php | 114 - .../Chat/V1/WidgetMarkup/TextParagraph.php | 70 - .../complete_import_space.php | 78 - .../ChatServiceClient/create_membership.php | 94 - .../V1/ChatServiceClient/create_message.php | 98 - .../V1/ChatServiceClient/create_reaction.php | 80 - .../V1/ChatServiceClient/create_space.php | 73 - .../ChatServiceClient/delete_membership.php | 89 - .../V1/ChatServiceClient/delete_message.php | 88 - .../V1/ChatServiceClient/delete_reaction.php | 76 - .../V1/ChatServiceClient/delete_space.php | 78 - .../ChatServiceClient/find_direct_message.php | 100 - .../V1/ChatServiceClient/get_attachment.php | 79 - .../V1/ChatServiceClient/get_membership.php | 93 - .../V1/ChatServiceClient/get_message.php | 90 - .../V1/ChatServiceClient/get_space.php | 83 - .../V1/ChatServiceClient/get_space_event.php | 89 - .../get_space_read_state.php | 91 - .../get_thread_read_state.php | 92 - .../V1/ChatServiceClient/list_memberships.php | 97 - .../V1/ChatServiceClient/list_messages.php | 86 - .../V1/ChatServiceClient/list_reactions.php | 82 - .../ChatServiceClient/list_space_events.php | 147 -- .../V1/ChatServiceClient/list_spaces.php | 80 - .../V1/ChatServiceClient/search_spaces.php | 146 -- .../V1/ChatServiceClient/set_up_space.php | 110 - .../ChatServiceClient/update_membership.php | 66 - .../V1/ChatServiceClient/update_message.php | 74 - .../V1/ChatServiceClient/update_space.php | 68 - .../update_space_read_state.php | 67 - .../ChatServiceClient/upload_attachment.php | 83 - .../v1/src/V1/Client/ChatServiceClient.php | 1551 ------------ .../AppsChat/v1/src/V1/gapic_metadata.json | 163 -- .../resources/chat_service_client_config.json | 179 -- .../chat_service_descriptor_config.php | 400 --- .../chat_service_rest_client_config.php | 344 --- .../Unit/V1/Client/ChatServiceClientTest.php | 2177 ----------------- 241 files changed, 60 insertions(+), 38864 deletions(-) delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/GPBMetadata/Google/Apps/Card/V1/Card.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/ActionParameter.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/Interaction.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/LoadIndicator.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle/BorderType.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Button.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ButtonList.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardAction.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardFixedFooter.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardHeader.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DisplayStyle.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DividerStyle.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/Section.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/HorizontalSizeStyle.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/VerticalAlignment.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/Widgets.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker/DateTimePickerType.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl/ControlType.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Divider.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem/GridItemLayout.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Icon.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Image.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageComponent.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle/ImageCropType.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/MaterialIcon.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OnClick.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OnClose.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OpenAs.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource/CommonDataSource.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionItem.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionType.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions/SuggestionItem.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput/Type.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextParagraph.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/HorizontalAlignment.php delete mode 100644 owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/ImageType.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ActionStatus.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Annotation.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Attachment.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ChatService.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ContextualAddon.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/DeletionMetadata.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/EventPayload.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Group.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/HistoryState.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/MatchedUrl.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Membership.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Message.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Reaction.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SlashCommand.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Space.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceEvent.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceReadState.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceSetup.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ThreadReadState.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/User.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Widgets.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AccessoryWidget.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/ResponseType.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/SelectionItems.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/UpdatedWidget.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionStatus.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Annotation.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AnnotationType.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachedGif.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment/Source.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachmentDataRef.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CardWithId.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ChatSpaceLinkData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceResponse.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardAction.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader/ImageStyle.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/Section.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMembershipRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest/MessageReplyOption.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateReactionRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateSpaceRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CustomEmoji.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMembershipRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMessageRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteReactionRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteSpaceRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata/DeletionType.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Dialog.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DialogAction.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveDataRef.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveLinkData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Emoji.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/EmojiReactionSummary.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/FindDirectMessageRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetAttachmentRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMembershipRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMessageRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceEventRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceReadStateRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetThreadReadStateRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Group.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/HistoryState.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsResponse.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesResponse.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsResponse.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsResponse.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesResponse.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MatchedUrl.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipRole.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipState.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchCreatedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchDeletedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchUpdatedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipCreatedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipDeletedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipUpdatedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Message.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchCreatedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchDeletedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchUpdatedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageCreatedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageDeletedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageUpdatedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/QuotedMessageMetadata.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Reaction.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchCreatedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchDeletedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionCreatedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionDeletedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata/RichLinkType.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesResponse.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SetUpSpaceRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommand.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata/Type.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings/AccessState.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/MembershipCount.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSetting.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSettings.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PredefinedPermissionSettings.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceDetails.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceThreadingState.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceType.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/Type.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceBatchUpdatedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceEvent.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceReadState.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceUpdatedEventData.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Thread.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ThreadReadState.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMembershipRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMessageRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceReadStateRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentRequest.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentResponse.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User/Type.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata/Type.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Button.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction/ActionParameter.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Icon.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Image.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/ImageButton.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/KeyValue.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OnClick.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OpenLink.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextButton.php delete mode 100644 owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextParagraph.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/complete_import_space.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_membership.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_message.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_reaction.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_space.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_membership.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_message.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_reaction.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_space.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/find_direct_message.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_attachment.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_membership.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_message.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_event.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_read_state.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_thread_read_state.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_memberships.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_messages.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_reactions.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_space_events.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_spaces.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/search_spaces.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/set_up_space.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_membership.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_message.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space_read_state.php delete mode 100644 owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/upload_attachment.php delete mode 100644 owl-bot-staging/AppsChat/v1/src/V1/Client/ChatServiceClient.php delete mode 100644 owl-bot-staging/AppsChat/v1/src/V1/gapic_metadata.json delete mode 100644 owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_client_config.json delete mode 100644 owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_descriptor_config.php delete mode 100644 owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_rest_client_config.php delete mode 100644 owl-bot-staging/AppsChat/v1/tests/Unit/V1/Client/ChatServiceClientTest.php diff --git a/AppsChat/metadata/Chat/V1/Space.php b/AppsChat/metadata/Chat/V1/Space.php index d677ec095933d709abd04fe77a26373767f8dc90..5504f5780ffdd9120a567312053453a8169b86e8 100644 GIT binary patch delta 64 zcmV-G0Kfm(C7LF%=mG)Xlj#Dm0rs<+1GfVm5D+Ca&%v9Z)9a(Wq5FDa%Eq1 WX>DZ~9FuwlAp`^9K?Ac<2Zswwco)9_ delta 25 hcmbQGc0+Z;3ns?7lV37zVBE5K7V~!I&6C;NxdD{53c>&Y diff --git a/AppsChat/src/Chat/V1/Space.php b/AppsChat/src/Chat/V1/Space.php index 5ec5b13d3147..9fe556109f1e 100644 --- a/AppsChat/src/Chat/V1/Space.php +++ b/AppsChat/src/Chat/V1/Space.php @@ -159,6 +159,16 @@ class Space extends \Google\Protobuf\Internal\Message * Generated from protobuf field string space_uri = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; */ protected $space_uri = ''; + /** + * Output only. The time when the space will be automatically deleted by the + * system if it remains in import mode. + * Each space created in import mode must exit this mode before this expire + * time using `spaces.completeImport`. + * This field is only populated for spaces that were created with import mode. + * + * Generated from protobuf field .google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $import_mode_expire_time = null; protected $space_permission_settings; /** @@ -249,6 +259,12 @@ class Space extends \Google\Protobuf\Internal\Message * Optional. Space permission settings for existing spaces. Input for * updating exact space permission settings, where existing permission * settings are replaced. Output lists current permission settings. + * @type \Google\Protobuf\Timestamp $import_mode_expire_time + * Output only. The time when the space will be automatically deleted by the + * system if it remains in import mode. + * Each space created in import mode must exit this mode before this expire + * time using `spaces.completeImport`. + * This field is only populated for spaces that were created with import mode. * } */ public function __construct($data = NULL) { @@ -906,6 +922,50 @@ public function setPermissionSettings($var) return $this; } + /** + * Output only. The time when the space will be automatically deleted by the + * system if it remains in import mode. + * Each space created in import mode must exit this mode before this expire + * time using `spaces.completeImport`. + * This field is only populated for spaces that were created with import mode. + * + * Generated from protobuf field .google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getImportModeExpireTime() + { + return $this->import_mode_expire_time; + } + + public function hasImportModeExpireTime() + { + return isset($this->import_mode_expire_time); + } + + public function clearImportModeExpireTime() + { + unset($this->import_mode_expire_time); + } + + /** + * Output only. The time when the space will be automatically deleted by the + * system if it remains in import mode. + * Each space created in import mode must exit this mode before this expire + * time using `spaces.completeImport`. + * This field is only populated for spaces that were created with import mode. + * + * Generated from protobuf field .google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setImportModeExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->import_mode_expire_time = $var; + + return $this; + } + /** * @return string */ diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/GPBMetadata/Google/Apps/Card/V1/Card.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/GPBMetadata/Google/Apps/Card/V1/Card.php deleted file mode 100644 index 2b741a7e434713f65e36108693fe4b643097aeab..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8612 zcmeHNJ98V?6&AoJ4oHYz(Kbz4Hnfs0DYl>xvaK;>Nx@6xMj!wKAZ0n6*;x`xa!0@} zyt|MrXH+;vCVl!;nPiea{sCz+lN6bBnN+EhHf?6|oqI1{)Dp7Oq=^a2k?vT?A|3_5A}omp<~mqmF&U>h*#f2bSNy@nl2%&4{IlT&rsbJ?p?uZ`KRjc4)P& z(AwJ+Tzh$N?G?ebx4Uth=%8Z-L7KnQk136Rz5ag3IY%3U|+qKmTNNY<(`K#-boMSsPnOLae)2*hRlfP%! zsu{Lw=E;WsheeuY+h`xq{IPAdZGSD6j$KV=FJ~giGfXP}+Y+?eO{_w2k0d?lZ@I!Jyrt<+c;_I@U9FlKGdP zM3Bpq+@+PCZ9g`}ag-GngbXh^jkLo0&tpU^k}}FN&4o?~eX=DJ+6rvc-pKE zPS-lJ%@9twHX~$xC-Srpoi>6bV=y&)to8~eBx~RADDAyQDf!6igl1@e84CR+*1wL? z!ocLI3GYg1@6*ClvGl-g&QIB1J4Z>tSI6oF&OVOC=2_G((RskZ=&`95G!MMK8?Lbh z=GGfhG0N(zv?QIy>{$DDN9iX+i=Jy90FxfWhuQbvj1;Ek7MW)KIh{Re|C^NR`A~xY z%-rvXq35a~iau3AkZ2#$3c|p1+hc5U|7mP`ot7rT-~zo-GIotpxnVY2k1Azzr`oKS zi^hGUTv|B;gDp2}6{BP-qLrAIBC6Jg-{X3TR~&Okv0}4c$v=u*5r|PQmmgrEBrP<` zpevSF;`&eLXX?;Msbw+!S=7c{fW2{Fq8SIfD z##U`8QRF-6eC*E2Z1h&80V(eZ?vE%b?PYeHAQb+b%)TADp)^_rWZ?UNNF2~{dwuEd z$?RK^Y`l@dRN%TxX9K$nIz{~oO%&mwA_u5I?atU64Y68?>MRS3vD)j;`Db4A*G($amUnB*c6pQp`;d$h8rS{jM9VC8q=tG9J@_ zVVhQuJ>U7tb3?0RBKse?T^oVB2<}w&M&w=!j<$w;`2m}Li4wvm1WFOjH$UCUH_8YA zd@dS|Vx_zi(|<(gB6zjSl-{Z}jL&P;R=#59E5>GZyIgIZh@=F~HCy>c3y#lgf}q@3 ziE9fqQ?8a)W(xB(%Vm&$ftDv+nv)HCi-a3}Z;$4Lq?1@GvHCk=5o7xhb=mO~dV&^| z{q$eV(ei}HBeZ56AdU*hXnPtUD8$!d+I1q-KYnNmmZd2!z$|>4(CaB=6|xKuF0(8M zo&pR;DPmCrAn$v?%dTSMa7bw5N|63N6_6q5yh2^}on&?ze8Ta5NU7kd6CNBRQ@Ek; zbyP5XKhotU6qsoW#-ilITGwgOcH2@z((O-I>eiX{uj4@D@g;_Zh%`Sk_Y8`Zi_6v$T@>^)v@Iwd&^v=P%HY-D)BW?DoL4T%I6H4%6{@)51dg4=NQw0onv1) zB$^M6R&fg(z;BB25 zm>lS?=ZHp`l*>RFxr5E4^)5N|f6im4iKIB)XYMJFkOl5Wv|%RJ%M6zn%KX7VGqXZ7 z-)#lfO=P^v?jri6%FcUN=X4scPE&+T}x&^`Zjv4D}IzD zR#OZafQF9&hC}tUwk8tgD83~Ea2qoThG;xS3CisIj%rBIE~u;`0)+LQSpQv&v=^n& zY|;>iU4ZJiS{RK}+0Fm%WI#z?aQvwHHCj3Ol&j~R>VsrsS9? zTrP~XB)oD0PtTwPSZd@;M$Ihjv|6>QtWFdZ#~F%Cjat3LyUZ}H00XmGu9S<~07n6kp@| zH!+%*Aa%lr5y-OQl8xQz#esH_=1@O-zDV@RtTyny5IGGVgBF=fI)$giN<>C-i z2@5TATlLK2<)Wyy^xwy5R+Mk6M2}tXsVi$4QH~(=HCp8A55d)uH3^>OXt@i;`ltGKymZP9K{ckZ!iR!%Qdp$Xw8Ke;j3eibml10u-cm?6nJa!0r==)5x zsg5TU8PmU@bL1(lC#j*0Cp^)`bskBvtkicPy+y#VX@4y678Io&Kj8 zn&nQJ{cU_Ww=pO&ZiS6UwW@2Q+)=OnS{5CS~D(>On1{1vDC|H)+(KvMC zta1_*tp8?)7S!kej~$2CI+?Ehyiv&)(9SmNJb8|3uaPEx**2=i_Rh9?9@jskS6*~Co!;6lH(Ew<%A{{J-iz^g zuT`sK&WDGE8Y*n$R{ig|+89(>m_Dfnosc0yY zOJw99zPS)Q$W^J1XQ4fJ+rUR$GK)$lm5shfREt!=VGJ1H$*CT8$0dU)dZ0j9Y!S$o z6c@pkxV=;(uDvUfexnvP_~Ka7uV1IL^65xeSoE>|OdWkVNfX79{w^&~iUox>>qfPT z{#10T)fz@iG5t0r$9Bgoogle.apps.card.v1.Action - */ -class Action extends \Google\Protobuf\Internal\Message -{ - /** - * A custom function to invoke when the containing element is - * clicked or othrwise activated. - * For example usage, see [Read form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string function = 1; - */ - protected $function = ''; - /** - * List of action parameters. - * - * Generated from protobuf field repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - */ - private $parameters; - /** - * Specifies the loading indicator that the action displays while - * making the call to the action. - * - * Generated from protobuf field .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; - */ - protected $load_indicator = 0; - /** - * Indicates whether form values persist after the action. The default value - * is `false`. - * If `true`, form values remain after the action is triggered. To let the - * user make changes while the action is being processed, set - * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) - * to `NONE`. For [card - * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) - * in Chat apps, you must also set the action's - * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) - * to `UPDATE_MESSAGE` and use the same - * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) - * from the card that contained the action. - * If `false`, the form values are cleared when the action is triggered. - * To prevent the user from making changes while the action is being - * processed, set - * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) - * to `SPINNER`. - * - * Generated from protobuf field bool persist_values = 4; - */ - protected $persist_values = false; - /** - * Optional. Required when opening a - * [dialog](https://developers.google.com/workspace/chat/dialogs). - * What to do in response to an interaction with a user, such as a user - * clicking a button in a card message. - * If unspecified, the app responds by executing an `action`—like opening a - * link or running a function—as normal. - * By specifying an `interaction`, the app can respond in special interactive - * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can - * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When - * specified, a loading indicator isn't shown. If specified for - * an add-on, the entire card is stripped and nothing is shown in the client. - * [Google Chat apps](https://developers.google.com/workspace/chat): - * - * Generated from protobuf field .google.apps.card.v1.Action.Interaction interaction = 5; - */ - protected $interaction = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $function - * A custom function to invoke when the containing element is - * clicked or othrwise activated. - * For example usage, see [Read form - * data](https://developers.google.com/workspace/chat/read-form-data). - * @type array<\Google\Apps\Card\V1\Action\ActionParameter>|\Google\Protobuf\Internal\RepeatedField $parameters - * List of action parameters. - * @type int $load_indicator - * Specifies the loading indicator that the action displays while - * making the call to the action. - * @type bool $persist_values - * Indicates whether form values persist after the action. The default value - * is `false`. - * If `true`, form values remain after the action is triggered. To let the - * user make changes while the action is being processed, set - * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) - * to `NONE`. For [card - * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) - * in Chat apps, you must also set the action's - * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) - * to `UPDATE_MESSAGE` and use the same - * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) - * from the card that contained the action. - * If `false`, the form values are cleared when the action is triggered. - * To prevent the user from making changes while the action is being - * processed, set - * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) - * to `SPINNER`. - * @type int $interaction - * Optional. Required when opening a - * [dialog](https://developers.google.com/workspace/chat/dialogs). - * What to do in response to an interaction with a user, such as a user - * clicking a button in a card message. - * If unspecified, the app responds by executing an `action`—like opening a - * link or running a function—as normal. - * By specifying an `interaction`, the app can respond in special interactive - * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can - * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When - * specified, a loading indicator isn't shown. If specified for - * an add-on, the entire card is stripped and nothing is shown in the client. - * [Google Chat apps](https://developers.google.com/workspace/chat): - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * A custom function to invoke when the containing element is - * clicked or othrwise activated. - * For example usage, see [Read form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string function = 1; - * @return string - */ - public function getFunction() - { - return $this->function; - } - - /** - * A custom function to invoke when the containing element is - * clicked or othrwise activated. - * For example usage, see [Read form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string function = 1; - * @param string $var - * @return $this - */ - public function setFunction($var) - { - GPBUtil::checkString($var, True); - $this->function = $var; - - return $this; - } - - /** - * List of action parameters. - * - * Generated from protobuf field repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * List of action parameters. - * - * Generated from protobuf field repeated .google.apps.card.v1.Action.ActionParameter parameters = 2; - * @param array<\Google\Apps\Card\V1\Action\ActionParameter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Action\ActionParameter::class); - $this->parameters = $arr; - - return $this; - } - - /** - * Specifies the loading indicator that the action displays while - * making the call to the action. - * - * Generated from protobuf field .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; - * @return int - */ - public function getLoadIndicator() - { - return $this->load_indicator; - } - - /** - * Specifies the loading indicator that the action displays while - * making the call to the action. - * - * Generated from protobuf field .google.apps.card.v1.Action.LoadIndicator load_indicator = 3; - * @param int $var - * @return $this - */ - public function setLoadIndicator($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Action\LoadIndicator::class); - $this->load_indicator = $var; - - return $this; - } - - /** - * Indicates whether form values persist after the action. The default value - * is `false`. - * If `true`, form values remain after the action is triggered. To let the - * user make changes while the action is being processed, set - * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) - * to `NONE`. For [card - * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) - * in Chat apps, you must also set the action's - * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) - * to `UPDATE_MESSAGE` and use the same - * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) - * from the card that contained the action. - * If `false`, the form values are cleared when the action is triggered. - * To prevent the user from making changes while the action is being - * processed, set - * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) - * to `SPINNER`. - * - * Generated from protobuf field bool persist_values = 4; - * @return bool - */ - public function getPersistValues() - { - return $this->persist_values; - } - - /** - * Indicates whether form values persist after the action. The default value - * is `false`. - * If `true`, form values remain after the action is triggered. To let the - * user make changes while the action is being processed, set - * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) - * to `NONE`. For [card - * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/create#create) - * in Chat apps, you must also set the action's - * [`ResponseType`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#responsetype) - * to `UPDATE_MESSAGE` and use the same - * [`card_id`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#CardWithId) - * from the card that contained the action. - * If `false`, the form values are cleared when the action is triggered. - * To prevent the user from making changes while the action is being - * processed, set - * [`LoadIndicator`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#loadindicator) - * to `SPINNER`. - * - * Generated from protobuf field bool persist_values = 4; - * @param bool $var - * @return $this - */ - public function setPersistValues($var) - { - GPBUtil::checkBool($var); - $this->persist_values = $var; - - return $this; - } - - /** - * Optional. Required when opening a - * [dialog](https://developers.google.com/workspace/chat/dialogs). - * What to do in response to an interaction with a user, such as a user - * clicking a button in a card message. - * If unspecified, the app responds by executing an `action`—like opening a - * link or running a function—as normal. - * By specifying an `interaction`, the app can respond in special interactive - * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can - * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When - * specified, a loading indicator isn't shown. If specified for - * an add-on, the entire card is stripped and nothing is shown in the client. - * [Google Chat apps](https://developers.google.com/workspace/chat): - * - * Generated from protobuf field .google.apps.card.v1.Action.Interaction interaction = 5; - * @return int - */ - public function getInteraction() - { - return $this->interaction; - } - - /** - * Optional. Required when opening a - * [dialog](https://developers.google.com/workspace/chat/dialogs). - * What to do in response to an interaction with a user, such as a user - * clicking a button in a card message. - * If unspecified, the app responds by executing an `action`—like opening a - * link or running a function—as normal. - * By specifying an `interaction`, the app can respond in special interactive - * ways. For example, by setting `interaction` to `OPEN_DIALOG`, the app can - * open a [dialog](https://developers.google.com/workspace/chat/dialogs). When - * specified, a loading indicator isn't shown. If specified for - * an add-on, the entire card is stripped and nothing is shown in the client. - * [Google Chat apps](https://developers.google.com/workspace/chat): - * - * Generated from protobuf field .google.apps.card.v1.Action.Interaction interaction = 5; - * @param int $var - * @return $this - */ - public function setInteraction($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Action\Interaction::class); - $this->interaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/ActionParameter.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/ActionParameter.php deleted file mode 100644 index 97c1de9eec28..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/ActionParameter.php +++ /dev/null @@ -1,111 +0,0 @@ -google.apps.card.v1.Action.ActionParameter - */ -class ActionParameter extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the parameter for the action script. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The value of the parameter. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The name of the parameter for the action script. - * @type string $value - * The value of the parameter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The name of the parameter for the action script. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The name of the parameter for the action script. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The value of the parameter. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value of the parameter. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ActionParameter::class, \Google\Apps\Card\V1\Action_ActionParameter::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/Interaction.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/Interaction.php deleted file mode 100644 index 8a61e46ee077..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/Interaction.php +++ /dev/null @@ -1,74 +0,0 @@ -google.apps.card.v1.Action.Interaction - */ -class Interaction -{ - /** - * Default value. The `action` executes as normal. - * - * Generated from protobuf enum INTERACTION_UNSPECIFIED = 0; - */ - const INTERACTION_UNSPECIFIED = 0; - /** - * Opens a [dialog](https://developers.google.com/workspace/chat/dialogs), a - * windowed, card-based interface that Chat apps use to interact with users. - * Only supported by Chat apps in response to button-clicks on card - * messages. If specified for - * an add-on, the entire card is stripped and nothing is shown in the - * client. - * [Google Chat apps](https://developers.google.com/workspace/chat): - * - * Generated from protobuf enum OPEN_DIALOG = 1; - */ - const OPEN_DIALOG = 1; - - private static $valueToName = [ - self::INTERACTION_UNSPECIFIED => 'INTERACTION_UNSPECIFIED', - self::OPEN_DIALOG => 'OPEN_DIALOG', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Interaction::class, \Google\Apps\Card\V1\Action_Interaction::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/LoadIndicator.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/LoadIndicator.php deleted file mode 100644 index 89fe775ce3c4..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Action/LoadIndicator.php +++ /dev/null @@ -1,60 +0,0 @@ -google.apps.card.v1.Action.LoadIndicator - */ -class LoadIndicator -{ - /** - * Displays a spinner to indicate that content is loading. - * - * Generated from protobuf enum SPINNER = 0; - */ - const SPINNER = 0; - /** - * Nothing is displayed. - * - * Generated from protobuf enum NONE = 1; - */ - const NONE = 1; - - private static $valueToName = [ - self::SPINNER => 'SPINNER', - self::NONE => 'NONE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(LoadIndicator::class, \Google\Apps\Card\V1\Action_LoadIndicator::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle.php deleted file mode 100644 index 4cf88c737048..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle.php +++ /dev/null @@ -1,148 +0,0 @@ -google.apps.card.v1.BorderStyle - */ -class BorderStyle extends \Google\Protobuf\Internal\Message -{ - /** - * The border type. - * - * Generated from protobuf field .google.apps.card.v1.BorderStyle.BorderType type = 1; - */ - protected $type = 0; - /** - * The colors to use when the type is `BORDER_TYPE_STROKE`. - * - * Generated from protobuf field .google.type.Color stroke_color = 2; - */ - protected $stroke_color = null; - /** - * The corner radius for the border. - * - * Generated from protobuf field int32 corner_radius = 3; - */ - protected $corner_radius = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The border type. - * @type \Google\Type\Color $stroke_color - * The colors to use when the type is `BORDER_TYPE_STROKE`. - * @type int $corner_radius - * The corner radius for the border. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The border type. - * - * Generated from protobuf field .google.apps.card.v1.BorderStyle.BorderType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The border type. - * - * Generated from protobuf field .google.apps.card.v1.BorderStyle.BorderType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\BorderStyle\BorderType::class); - $this->type = $var; - - return $this; - } - - /** - * The colors to use when the type is `BORDER_TYPE_STROKE`. - * - * Generated from protobuf field .google.type.Color stroke_color = 2; - * @return \Google\Type\Color|null - */ - public function getStrokeColor() - { - return $this->stroke_color; - } - - public function hasStrokeColor() - { - return isset($this->stroke_color); - } - - public function clearStrokeColor() - { - unset($this->stroke_color); - } - - /** - * The colors to use when the type is `BORDER_TYPE_STROKE`. - * - * Generated from protobuf field .google.type.Color stroke_color = 2; - * @param \Google\Type\Color $var - * @return $this - */ - public function setStrokeColor($var) - { - GPBUtil::checkMessage($var, \Google\Type\Color::class); - $this->stroke_color = $var; - - return $this; - } - - /** - * The corner radius for the border. - * - * Generated from protobuf field int32 corner_radius = 3; - * @return int - */ - public function getCornerRadius() - { - return $this->corner_radius; - } - - /** - * The corner radius for the border. - * - * Generated from protobuf field int32 corner_radius = 3; - * @param int $var - * @return $this - */ - public function setCornerRadius($var) - { - GPBUtil::checkInt32($var); - $this->corner_radius = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle/BorderType.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle/BorderType.php deleted file mode 100644 index 4278b12efd3b..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/BorderStyle/BorderType.php +++ /dev/null @@ -1,66 +0,0 @@ -google.apps.card.v1.BorderStyle.BorderType - */ -class BorderType -{ - /** - * Don't use. Unspecified. - * - * Generated from protobuf enum BORDER_TYPE_UNSPECIFIED = 0; - */ - const BORDER_TYPE_UNSPECIFIED = 0; - /** - * Default value. No border. - * - * Generated from protobuf enum NO_BORDER = 1; - */ - const NO_BORDER = 1; - /** - * Outline. - * - * Generated from protobuf enum STROKE = 2; - */ - const STROKE = 2; - - private static $valueToName = [ - self::BORDER_TYPE_UNSPECIFIED => 'BORDER_TYPE_UNSPECIFIED', - self::NO_BORDER => 'NO_BORDER', - self::STROKE => 'STROKE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(BorderType::class, \Google\Apps\Card\V1\BorderStyle_BorderType::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Button.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Button.php deleted file mode 100644 index 8e966b18cf47..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Button.php +++ /dev/null @@ -1,400 +0,0 @@ -google.apps.card.v1.Button - */ -class Button extends \Google\Protobuf\Internal\Message -{ - /** - * The text displayed inside the button. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - /** - * The icon image. If both `icon` and `text` are set, then the icon appears - * before the text. - * - * Generated from protobuf field .google.apps.card.v1.Icon icon = 2; - */ - protected $icon = null; - /** - * If set, the button is filled with a solid background color and the font - * color changes to maintain contrast with the background color. For example, - * setting a blue background likely results in white text. - * If unset, the image background is white and the font color is blue. - * For red, green, and blue, the value of each field is a `float` number that - * you can express in either of two ways: as a number between 0 and 255 - * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents - * the absence of a color and 1 or 255/255 represent the full presence of that - * color on the RGB scale. - * Optionally set `alpha`, which sets a level of transparency using this - * equation: - * ``` - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) - * ``` - * For `alpha`, a value of `1` corresponds with a solid color, and a value of - * `0` corresponds with a completely transparent color. - * For example, the following color represents a half transparent red: - * ``` - * "color": { - * "red": 1, - * "green": 0, - * "blue": 0, - * "alpha": 0.5 - * } - * ``` - * - * Generated from protobuf field .google.type.Color color = 3; - */ - protected $color = null; - /** - * Required. The action to perform when a user clicks the button, such as - * opening a hyperlink or running a custom function. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 4; - */ - protected $on_click = null; - /** - * If `true`, the button is displayed in an inactive state and doesn't respond - * to user actions. - * - * Generated from protobuf field bool disabled = 5; - */ - protected $disabled = false; - /** - * The alternative text that's used for accessibility. - * Set descriptive text that lets users know what the button does. For - * example, if a button opens a hyperlink, you might write: "Opens a new - * browser tab and navigates to the Google Chat developer documentation at - * https://developers.google.com/workspace/chat". - * - * Generated from protobuf field string alt_text = 6; - */ - protected $alt_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * The text displayed inside the button. - * @type \Google\Apps\Card\V1\Icon $icon - * The icon image. If both `icon` and `text` are set, then the icon appears - * before the text. - * @type \Google\Type\Color $color - * If set, the button is filled with a solid background color and the font - * color changes to maintain contrast with the background color. For example, - * setting a blue background likely results in white text. - * If unset, the image background is white and the font color is blue. - * For red, green, and blue, the value of each field is a `float` number that - * you can express in either of two ways: as a number between 0 and 255 - * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents - * the absence of a color and 1 or 255/255 represent the full presence of that - * color on the RGB scale. - * Optionally set `alpha`, which sets a level of transparency using this - * equation: - * ``` - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) - * ``` - * For `alpha`, a value of `1` corresponds with a solid color, and a value of - * `0` corresponds with a completely transparent color. - * For example, the following color represents a half transparent red: - * ``` - * "color": { - * "red": 1, - * "green": 0, - * "blue": 0, - * "alpha": 0.5 - * } - * ``` - * @type \Google\Apps\Card\V1\OnClick $on_click - * Required. The action to perform when a user clicks the button, such as - * opening a hyperlink or running a custom function. - * @type bool $disabled - * If `true`, the button is displayed in an inactive state and doesn't respond - * to user actions. - * @type string $alt_text - * The alternative text that's used for accessibility. - * Set descriptive text that lets users know what the button does. For - * example, if a button opens a hyperlink, you might write: "Opens a new - * browser tab and navigates to the Google Chat developer documentation at - * https://developers.google.com/workspace/chat". - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The text displayed inside the button. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * The text displayed inside the button. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * The icon image. If both `icon` and `text` are set, then the icon appears - * before the text. - * - * Generated from protobuf field .google.apps.card.v1.Icon icon = 2; - * @return \Google\Apps\Card\V1\Icon|null - */ - public function getIcon() - { - return $this->icon; - } - - public function hasIcon() - { - return isset($this->icon); - } - - public function clearIcon() - { - unset($this->icon); - } - - /** - * The icon image. If both `icon` and `text` are set, then the icon appears - * before the text. - * - * Generated from protobuf field .google.apps.card.v1.Icon icon = 2; - * @param \Google\Apps\Card\V1\Icon $var - * @return $this - */ - public function setIcon($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Icon::class); - $this->icon = $var; - - return $this; - } - - /** - * If set, the button is filled with a solid background color and the font - * color changes to maintain contrast with the background color. For example, - * setting a blue background likely results in white text. - * If unset, the image background is white and the font color is blue. - * For red, green, and blue, the value of each field is a `float` number that - * you can express in either of two ways: as a number between 0 and 255 - * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents - * the absence of a color and 1 or 255/255 represent the full presence of that - * color on the RGB scale. - * Optionally set `alpha`, which sets a level of transparency using this - * equation: - * ``` - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) - * ``` - * For `alpha`, a value of `1` corresponds with a solid color, and a value of - * `0` corresponds with a completely transparent color. - * For example, the following color represents a half transparent red: - * ``` - * "color": { - * "red": 1, - * "green": 0, - * "blue": 0, - * "alpha": 0.5 - * } - * ``` - * - * Generated from protobuf field .google.type.Color color = 3; - * @return \Google\Type\Color|null - */ - public function getColor() - { - return $this->color; - } - - public function hasColor() - { - return isset($this->color); - } - - public function clearColor() - { - unset($this->color); - } - - /** - * If set, the button is filled with a solid background color and the font - * color changes to maintain contrast with the background color. For example, - * setting a blue background likely results in white text. - * If unset, the image background is white and the font color is blue. - * For red, green, and blue, the value of each field is a `float` number that - * you can express in either of two ways: as a number between 0 and 255 - * divided by 255 (153/255), or as a value between 0 and 1 (0.6). 0 represents - * the absence of a color and 1 or 255/255 represent the full presence of that - * color on the RGB scale. - * Optionally set `alpha`, which sets a level of transparency using this - * equation: - * ``` - * pixel color = alpha * (this color) + (1.0 - alpha) * (background color) - * ``` - * For `alpha`, a value of `1` corresponds with a solid color, and a value of - * `0` corresponds with a completely transparent color. - * For example, the following color represents a half transparent red: - * ``` - * "color": { - * "red": 1, - * "green": 0, - * "blue": 0, - * "alpha": 0.5 - * } - * ``` - * - * Generated from protobuf field .google.type.Color color = 3; - * @param \Google\Type\Color $var - * @return $this - */ - public function setColor($var) - { - GPBUtil::checkMessage($var, \Google\Type\Color::class); - $this->color = $var; - - return $this; - } - - /** - * Required. The action to perform when a user clicks the button, such as - * opening a hyperlink or running a custom function. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 4; - * @return \Google\Apps\Card\V1\OnClick|null - */ - public function getOnClick() - { - return $this->on_click; - } - - public function hasOnClick() - { - return isset($this->on_click); - } - - public function clearOnClick() - { - unset($this->on_click); - } - - /** - * Required. The action to perform when a user clicks the button, such as - * opening a hyperlink or running a custom function. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 4; - * @param \Google\Apps\Card\V1\OnClick $var - * @return $this - */ - public function setOnClick($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); - $this->on_click = $var; - - return $this; - } - - /** - * If `true`, the button is displayed in an inactive state and doesn't respond - * to user actions. - * - * Generated from protobuf field bool disabled = 5; - * @return bool - */ - public function getDisabled() - { - return $this->disabled; - } - - /** - * If `true`, the button is displayed in an inactive state and doesn't respond - * to user actions. - * - * Generated from protobuf field bool disabled = 5; - * @param bool $var - * @return $this - */ - public function setDisabled($var) - { - GPBUtil::checkBool($var); - $this->disabled = $var; - - return $this; - } - - /** - * The alternative text that's used for accessibility. - * Set descriptive text that lets users know what the button does. For - * example, if a button opens a hyperlink, you might write: "Opens a new - * browser tab and navigates to the Google Chat developer documentation at - * https://developers.google.com/workspace/chat". - * - * Generated from protobuf field string alt_text = 6; - * @return string - */ - public function getAltText() - { - return $this->alt_text; - } - - /** - * The alternative text that's used for accessibility. - * Set descriptive text that lets users know what the button does. For - * example, if a button opens a hyperlink, you might write: "Opens a new - * browser tab and navigates to the Google Chat developer documentation at - * https://developers.google.com/workspace/chat". - * - * Generated from protobuf field string alt_text = 6; - * @param string $var - * @return $this - */ - public function setAltText($var) - { - GPBUtil::checkString($var, True); - $this->alt_text = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ButtonList.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ButtonList.php deleted file mode 100644 index 10b74b56debe..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ButtonList.php +++ /dev/null @@ -1,72 +0,0 @@ -google.apps.card.v1.ButtonList - */ -class ButtonList extends \Google\Protobuf\Internal\Message -{ - /** - * An array of buttons. - * - * Generated from protobuf field repeated .google.apps.card.v1.Button buttons = 1; - */ - private $buttons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Card\V1\Button>|\Google\Protobuf\Internal\RepeatedField $buttons - * An array of buttons. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * An array of buttons. - * - * Generated from protobuf field repeated .google.apps.card.v1.Button buttons = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getButtons() - { - return $this->buttons; - } - - /** - * An array of buttons. - * - * Generated from protobuf field repeated .google.apps.card.v1.Button buttons = 1; - * @param array<\Google\Apps\Card\V1\Button>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setButtons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Button::class); - $this->buttons = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card.php deleted file mode 100644 index 75ffe057a2b8..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card.php +++ /dev/null @@ -1,638 +0,0 @@ -Online" - * } - * }, - * { - * "decoratedText": { - * "startIcon": { - * "knownIcon": "PHONE" - * }, - * "text": "+1 (555) 555-1234" - * } - * }, - * { - * "buttonList": { - * "buttons": [ - * { - * "text": "Share", - * "onClick": { - * "openLink": { - * "url": "https://example.com/share" - * } - * } - * }, - * { - * "text": "Edit", - * "onClick": { - * "action": { - * "function": "goToView", - * "parameters": [ - * { - * "key": "viewType", - * "value": "EDIT" - * } - * ] - * } - * } - * } - * ] - * } - * } - * ] - * } - * ] - * } - * } - * ] - * } - * ``` - * - * Generated from protobuf message google.apps.card.v1.Card - */ -class Card extends \Google\Protobuf\Internal\Message -{ - /** - * The header of the card. A header usually contains a leading image and a - * title. Headers always appear at the top of a card. - * - * Generated from protobuf field .google.apps.card.v1.Card.CardHeader header = 1; - */ - protected $header = null; - /** - * Contains a collection of widgets. Each section has its own, optional - * header. Sections are visually separated by a line divider. For an example - * in Google Chat apps, see [Define a section of a - * card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). - * - * Generated from protobuf field repeated .google.apps.card.v1.Card.Section sections = 2; - */ - private $sections; - /** - * The divider style between sections. - * - * Generated from protobuf field .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; - */ - protected $section_divider_style = 0; - /** - * The card's actions. Actions are added to the card's toolbar menu. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * For example, the following JSON constructs a card action menu with - * `Settings` and `Send Feedback` options: - * ``` - * "card_actions": [ - * { - * "actionLabel": "Settings", - * "onClick": { - * "action": { - * "functionName": "goToView", - * "parameters": [ - * { - * "key": "viewType", - * "value": "SETTING" - * } - * ], - * "loadIndicator": "LoadIndicator.SPINNER" - * } - * } - * }, - * { - * "actionLabel": "Send Feedback", - * "onClick": { - * "openLink": { - * "url": "https://example.com/feedback" - * } - * } - * } - * ] - * ``` - * - * Generated from protobuf field repeated .google.apps.card.v1.Card.CardAction card_actions = 3; - */ - private $card_actions; - /** - * Name of the card. Used as a card identifier in card navigation. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field string name = 4; - */ - protected $name = ''; - /** - * The fixed footer shown at the bottom of this card. - * Setting `fixedFooter` without specifying a `primaryButton` or a - * `secondaryButton` causes an error. For Chat apps, you can use fixed footers - * in - * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not - * [card - * messages](https://developers.google.com/workspace/chat/create-messages#create). - * [Google Workspace Add-ons and Chat - * apps](https://developers.google.com/workspace/extend): - * - * Generated from protobuf field .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5; - */ - protected $fixed_footer = null; - /** - * In Google Workspace Add-ons, sets the display properties of the - * `peekCardHeader`. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Card.DisplayStyle display_style = 6; - */ - protected $display_style = 0; - /** - * When displaying contextual content, the peek card header acts as a - * placeholder so that the user can navigate forward between the homepage - * cards and the contextual cards. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Card.CardHeader peek_card_header = 7; - */ - protected $peek_card_header = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Card\V1\Card\CardHeader $header - * The header of the card. A header usually contains a leading image and a - * title. Headers always appear at the top of a card. - * @type array<\Google\Apps\Card\V1\Card\Section>|\Google\Protobuf\Internal\RepeatedField $sections - * Contains a collection of widgets. Each section has its own, optional - * header. Sections are visually separated by a line divider. For an example - * in Google Chat apps, see [Define a section of a - * card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). - * @type int $section_divider_style - * The divider style between sections. - * @type array<\Google\Apps\Card\V1\Card\CardAction>|\Google\Protobuf\Internal\RepeatedField $card_actions - * The card's actions. Actions are added to the card's toolbar menu. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * For example, the following JSON constructs a card action menu with - * `Settings` and `Send Feedback` options: - * ``` - * "card_actions": [ - * { - * "actionLabel": "Settings", - * "onClick": { - * "action": { - * "functionName": "goToView", - * "parameters": [ - * { - * "key": "viewType", - * "value": "SETTING" - * } - * ], - * "loadIndicator": "LoadIndicator.SPINNER" - * } - * } - * }, - * { - * "actionLabel": "Send Feedback", - * "onClick": { - * "openLink": { - * "url": "https://example.com/feedback" - * } - * } - * } - * ] - * ``` - * @type string $name - * Name of the card. Used as a card identifier in card navigation. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * @type \Google\Apps\Card\V1\Card\CardFixedFooter $fixed_footer - * The fixed footer shown at the bottom of this card. - * Setting `fixedFooter` without specifying a `primaryButton` or a - * `secondaryButton` causes an error. For Chat apps, you can use fixed footers - * in - * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not - * [card - * messages](https://developers.google.com/workspace/chat/create-messages#create). - * [Google Workspace Add-ons and Chat - * apps](https://developers.google.com/workspace/extend): - * @type int $display_style - * In Google Workspace Add-ons, sets the display properties of the - * `peekCardHeader`. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * @type \Google\Apps\Card\V1\Card\CardHeader $peek_card_header - * When displaying contextual content, the peek card header acts as a - * placeholder so that the user can navigate forward between the homepage - * cards and the contextual cards. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The header of the card. A header usually contains a leading image and a - * title. Headers always appear at the top of a card. - * - * Generated from protobuf field .google.apps.card.v1.Card.CardHeader header = 1; - * @return \Google\Apps\Card\V1\Card\CardHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * The header of the card. A header usually contains a leading image and a - * title. Headers always appear at the top of a card. - * - * Generated from protobuf field .google.apps.card.v1.Card.CardHeader header = 1; - * @param \Google\Apps\Card\V1\Card\CardHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card\CardHeader::class); - $this->header = $var; - - return $this; - } - - /** - * Contains a collection of widgets. Each section has its own, optional - * header. Sections are visually separated by a line divider. For an example - * in Google Chat apps, see [Define a section of a - * card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). - * - * Generated from protobuf field repeated .google.apps.card.v1.Card.Section sections = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSections() - { - return $this->sections; - } - - /** - * Contains a collection of widgets. Each section has its own, optional - * header. Sections are visually separated by a line divider. For an example - * in Google Chat apps, see [Define a section of a - * card](https://developers.google.com/workspace/chat/design-components-card-dialog#define_a_section_of_a_card). - * - * Generated from protobuf field repeated .google.apps.card.v1.Card.Section sections = 2; - * @param array<\Google\Apps\Card\V1\Card\Section>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Card\Section::class); - $this->sections = $arr; - - return $this; - } - - /** - * The divider style between sections. - * - * Generated from protobuf field .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; - * @return int - */ - public function getSectionDividerStyle() - { - return $this->section_divider_style; - } - - /** - * The divider style between sections. - * - * Generated from protobuf field .google.apps.card.v1.Card.DividerStyle section_divider_style = 9; - * @param int $var - * @return $this - */ - public function setSectionDividerStyle($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Card\DividerStyle::class); - $this->section_divider_style = $var; - - return $this; - } - - /** - * The card's actions. Actions are added to the card's toolbar menu. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * For example, the following JSON constructs a card action menu with - * `Settings` and `Send Feedback` options: - * ``` - * "card_actions": [ - * { - * "actionLabel": "Settings", - * "onClick": { - * "action": { - * "functionName": "goToView", - * "parameters": [ - * { - * "key": "viewType", - * "value": "SETTING" - * } - * ], - * "loadIndicator": "LoadIndicator.SPINNER" - * } - * } - * }, - * { - * "actionLabel": "Send Feedback", - * "onClick": { - * "openLink": { - * "url": "https://example.com/feedback" - * } - * } - * } - * ] - * ``` - * - * Generated from protobuf field repeated .google.apps.card.v1.Card.CardAction card_actions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCardActions() - { - return $this->card_actions; - } - - /** - * The card's actions. Actions are added to the card's toolbar menu. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * For example, the following JSON constructs a card action menu with - * `Settings` and `Send Feedback` options: - * ``` - * "card_actions": [ - * { - * "actionLabel": "Settings", - * "onClick": { - * "action": { - * "functionName": "goToView", - * "parameters": [ - * { - * "key": "viewType", - * "value": "SETTING" - * } - * ], - * "loadIndicator": "LoadIndicator.SPINNER" - * } - * } - * }, - * { - * "actionLabel": "Send Feedback", - * "onClick": { - * "openLink": { - * "url": "https://example.com/feedback" - * } - * } - * } - * ] - * ``` - * - * Generated from protobuf field repeated .google.apps.card.v1.Card.CardAction card_actions = 3; - * @param array<\Google\Apps\Card\V1\Card\CardAction>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCardActions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Card\CardAction::class); - $this->card_actions = $arr; - - return $this; - } - - /** - * Name of the card. Used as a card identifier in card navigation. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field string name = 4; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the card. Used as a card identifier in card navigation. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field string name = 4; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The fixed footer shown at the bottom of this card. - * Setting `fixedFooter` without specifying a `primaryButton` or a - * `secondaryButton` causes an error. For Chat apps, you can use fixed footers - * in - * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not - * [card - * messages](https://developers.google.com/workspace/chat/create-messages#create). - * [Google Workspace Add-ons and Chat - * apps](https://developers.google.com/workspace/extend): - * - * Generated from protobuf field .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5; - * @return \Google\Apps\Card\V1\Card\CardFixedFooter|null - */ - public function getFixedFooter() - { - return $this->fixed_footer; - } - - public function hasFixedFooter() - { - return isset($this->fixed_footer); - } - - public function clearFixedFooter() - { - unset($this->fixed_footer); - } - - /** - * The fixed footer shown at the bottom of this card. - * Setting `fixedFooter` without specifying a `primaryButton` or a - * `secondaryButton` causes an error. For Chat apps, you can use fixed footers - * in - * [dialogs](https://developers.google.com/workspace/chat/dialogs), but not - * [card - * messages](https://developers.google.com/workspace/chat/create-messages#create). - * [Google Workspace Add-ons and Chat - * apps](https://developers.google.com/workspace/extend): - * - * Generated from protobuf field .google.apps.card.v1.Card.CardFixedFooter fixed_footer = 5; - * @param \Google\Apps\Card\V1\Card\CardFixedFooter $var - * @return $this - */ - public function setFixedFooter($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card\CardFixedFooter::class); - $this->fixed_footer = $var; - - return $this; - } - - /** - * In Google Workspace Add-ons, sets the display properties of the - * `peekCardHeader`. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Card.DisplayStyle display_style = 6; - * @return int - */ - public function getDisplayStyle() - { - return $this->display_style; - } - - /** - * In Google Workspace Add-ons, sets the display properties of the - * `peekCardHeader`. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Card.DisplayStyle display_style = 6; - * @param int $var - * @return $this - */ - public function setDisplayStyle($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Card\DisplayStyle::class); - $this->display_style = $var; - - return $this; - } - - /** - * When displaying contextual content, the peek card header acts as a - * placeholder so that the user can navigate forward between the homepage - * cards and the contextual cards. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Card.CardHeader peek_card_header = 7; - * @return \Google\Apps\Card\V1\Card\CardHeader|null - */ - public function getPeekCardHeader() - { - return $this->peek_card_header; - } - - public function hasPeekCardHeader() - { - return isset($this->peek_card_header); - } - - public function clearPeekCardHeader() - { - unset($this->peek_card_header); - } - - /** - * When displaying contextual content, the peek card header acts as a - * placeholder so that the user can navigate forward between the homepage - * cards and the contextual cards. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Card.CardHeader peek_card_header = 7; - * @param \Google\Apps\Card\V1\Card\CardHeader $var - * @return $this - */ - public function setPeekCardHeader($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card\CardHeader::class); - $this->peek_card_header = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardAction.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardAction.php deleted file mode 100644 index f5aa428beae4..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardAction.php +++ /dev/null @@ -1,118 +0,0 @@ -google.apps.card.v1.Card.CardAction - */ -class CardAction extends \Google\Protobuf\Internal\Message -{ - /** - * The label that displays as the action menu item. - * - * Generated from protobuf field string action_label = 1; - */ - protected $action_label = ''; - /** - * The `onClick` action for this action item. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; - */ - protected $on_click = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $action_label - * The label that displays as the action menu item. - * @type \Google\Apps\Card\V1\OnClick $on_click - * The `onClick` action for this action item. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The label that displays as the action menu item. - * - * Generated from protobuf field string action_label = 1; - * @return string - */ - public function getActionLabel() - { - return $this->action_label; - } - - /** - * The label that displays as the action menu item. - * - * Generated from protobuf field string action_label = 1; - * @param string $var - * @return $this - */ - public function setActionLabel($var) - { - GPBUtil::checkString($var, True); - $this->action_label = $var; - - return $this; - } - - /** - * The `onClick` action for this action item. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; - * @return \Google\Apps\Card\V1\OnClick|null - */ - public function getOnClick() - { - return $this->on_click; - } - - public function hasOnClick() - { - return isset($this->on_click); - } - - public function clearOnClick() - { - unset($this->on_click); - } - - /** - * The `onClick` action for this action item. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; - * @param \Google\Apps\Card\V1\OnClick $var - * @return $this - */ - public function setOnClick($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); - $this->on_click = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CardAction::class, \Google\Apps\Card\V1\Card_CardAction::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardFixedFooter.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardFixedFooter.php deleted file mode 100644 index 533e532eec85..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardFixedFooter.php +++ /dev/null @@ -1,146 +0,0 @@ -google.apps.card.v1.Card.CardFixedFooter - */ -class CardFixedFooter extends \Google\Protobuf\Internal\Message -{ - /** - * The primary button of the fixed footer. The button must be a text button - * with text and color set. - * - * Generated from protobuf field .google.apps.card.v1.Button primary_button = 1; - */ - protected $primary_button = null; - /** - * The secondary button of the fixed footer. The button must be a text - * button with text and color set. - * If `secondaryButton` is set, you must also set `primaryButton`. - * - * Generated from protobuf field .google.apps.card.v1.Button secondary_button = 2; - */ - protected $secondary_button = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Card\V1\Button $primary_button - * The primary button of the fixed footer. The button must be a text button - * with text and color set. - * @type \Google\Apps\Card\V1\Button $secondary_button - * The secondary button of the fixed footer. The button must be a text - * button with text and color set. - * If `secondaryButton` is set, you must also set `primaryButton`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The primary button of the fixed footer. The button must be a text button - * with text and color set. - * - * Generated from protobuf field .google.apps.card.v1.Button primary_button = 1; - * @return \Google\Apps\Card\V1\Button|null - */ - public function getPrimaryButton() - { - return $this->primary_button; - } - - public function hasPrimaryButton() - { - return isset($this->primary_button); - } - - public function clearPrimaryButton() - { - unset($this->primary_button); - } - - /** - * The primary button of the fixed footer. The button must be a text button - * with text and color set. - * - * Generated from protobuf field .google.apps.card.v1.Button primary_button = 1; - * @param \Google\Apps\Card\V1\Button $var - * @return $this - */ - public function setPrimaryButton($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Button::class); - $this->primary_button = $var; - - return $this; - } - - /** - * The secondary button of the fixed footer. The button must be a text - * button with text and color set. - * If `secondaryButton` is set, you must also set `primaryButton`. - * - * Generated from protobuf field .google.apps.card.v1.Button secondary_button = 2; - * @return \Google\Apps\Card\V1\Button|null - */ - public function getSecondaryButton() - { - return $this->secondary_button; - } - - public function hasSecondaryButton() - { - return isset($this->secondary_button); - } - - public function clearSecondaryButton() - { - unset($this->secondary_button); - } - - /** - * The secondary button of the fixed footer. The button must be a text - * button with text and color set. - * If `secondaryButton` is set, you must also set `primaryButton`. - * - * Generated from protobuf field .google.apps.card.v1.Button secondary_button = 2; - * @param \Google\Apps\Card\V1\Button $var - * @return $this - */ - public function setSecondaryButton($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Button::class); - $this->secondary_button = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CardFixedFooter::class, \Google\Apps\Card\V1\Card_CardFixedFooter::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardHeader.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardHeader.php deleted file mode 100644 index 9ebae5225130..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/CardHeader.php +++ /dev/null @@ -1,233 +0,0 @@ -google.apps.card.v1.Card.CardHeader - */ -class CardHeader extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The title of the card header. - * The header has a fixed height: if both a - * title and subtitle are specified, each takes up one line. If only the - * title is specified, it takes up both lines. - * - * Generated from protobuf field string title = 1; - */ - protected $title = ''; - /** - * The subtitle of the card header. If specified, appears on its own line - * below the `title`. - * - * Generated from protobuf field string subtitle = 2; - */ - protected $subtitle = ''; - /** - * The shape used to crop the image. - * [Google Workspace Add-ons and Chat - * apps](https://developers.google.com/workspace/extend): - * - * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 3; - */ - protected $image_type = 0; - /** - * The HTTPS URL of the image in the card header. - * - * Generated from protobuf field string image_url = 4; - */ - protected $image_url = ''; - /** - * The alternative text of this image that's used for accessibility. - * - * Generated from protobuf field string image_alt_text = 5; - */ - protected $image_alt_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * Required. The title of the card header. - * The header has a fixed height: if both a - * title and subtitle are specified, each takes up one line. If only the - * title is specified, it takes up both lines. - * @type string $subtitle - * The subtitle of the card header. If specified, appears on its own line - * below the `title`. - * @type int $image_type - * The shape used to crop the image. - * [Google Workspace Add-ons and Chat - * apps](https://developers.google.com/workspace/extend): - * @type string $image_url - * The HTTPS URL of the image in the card header. - * @type string $image_alt_text - * The alternative text of this image that's used for accessibility. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * Required. The title of the card header. - * The header has a fixed height: if both a - * title and subtitle are specified, each takes up one line. If only the - * title is specified, it takes up both lines. - * - * Generated from protobuf field string title = 1; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * Required. The title of the card header. - * The header has a fixed height: if both a - * title and subtitle are specified, each takes up one line. If only the - * title is specified, it takes up both lines. - * - * Generated from protobuf field string title = 1; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * The subtitle of the card header. If specified, appears on its own line - * below the `title`. - * - * Generated from protobuf field string subtitle = 2; - * @return string - */ - public function getSubtitle() - { - return $this->subtitle; - } - - /** - * The subtitle of the card header. If specified, appears on its own line - * below the `title`. - * - * Generated from protobuf field string subtitle = 2; - * @param string $var - * @return $this - */ - public function setSubtitle($var) - { - GPBUtil::checkString($var, True); - $this->subtitle = $var; - - return $this; - } - - /** - * The shape used to crop the image. - * [Google Workspace Add-ons and Chat - * apps](https://developers.google.com/workspace/extend): - * - * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 3; - * @return int - */ - public function getImageType() - { - return $this->image_type; - } - - /** - * The shape used to crop the image. - * [Google Workspace Add-ons and Chat - * apps](https://developers.google.com/workspace/extend): - * - * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 3; - * @param int $var - * @return $this - */ - public function setImageType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\ImageType::class); - $this->image_type = $var; - - return $this; - } - - /** - * The HTTPS URL of the image in the card header. - * - * Generated from protobuf field string image_url = 4; - * @return string - */ - public function getImageUrl() - { - return $this->image_url; - } - - /** - * The HTTPS URL of the image in the card header. - * - * Generated from protobuf field string image_url = 4; - * @param string $var - * @return $this - */ - public function setImageUrl($var) - { - GPBUtil::checkString($var, True); - $this->image_url = $var; - - return $this; - } - - /** - * The alternative text of this image that's used for accessibility. - * - * Generated from protobuf field string image_alt_text = 5; - * @return string - */ - public function getImageAltText() - { - return $this->image_alt_text; - } - - /** - * The alternative text of this image that's used for accessibility. - * - * Generated from protobuf field string image_alt_text = 5; - * @param string $var - * @return $this - */ - public function setImageAltText($var) - { - GPBUtil::checkString($var, True); - $this->image_alt_text = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CardHeader::class, \Google\Apps\Card\V1\Card_CardHeader::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DisplayStyle.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DisplayStyle.php deleted file mode 100644 index 6b00f8d7bf7f..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DisplayStyle.php +++ /dev/null @@ -1,71 +0,0 @@ -google.apps.card.v1.Card.DisplayStyle - */ -class DisplayStyle -{ - /** - * Don't use. Unspecified. - * - * Generated from protobuf enum DISPLAY_STYLE_UNSPECIFIED = 0; - */ - const DISPLAY_STYLE_UNSPECIFIED = 0; - /** - * The header of the card appears at the bottom of the - * sidebar, partially covering the current top card of the stack. Clicking - * the header pops the card into the card stack. If the card has no header, - * a generated header is used instead. - * - * Generated from protobuf enum PEEK = 1; - */ - const PEEK = 1; - /** - * Default value. The card is shown by replacing the view of the top card in - * the card stack. - * - * Generated from protobuf enum REPLACE = 2; - */ - const REPLACE = 2; - - private static $valueToName = [ - self::DISPLAY_STYLE_UNSPECIFIED => 'DISPLAY_STYLE_UNSPECIFIED', - self::PEEK => 'PEEK', - self::REPLACE => 'REPLACE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DisplayStyle::class, \Google\Apps\Card\V1\Card_DisplayStyle::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DividerStyle.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DividerStyle.php deleted file mode 100644 index b2ff24d3caf4..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/DividerStyle.php +++ /dev/null @@ -1,67 +0,0 @@ -google.apps.card.v1.Card.DividerStyle - */ -class DividerStyle -{ - /** - * Don't use. Unspecified. - * - * Generated from protobuf enum DIVIDER_STYLE_UNSPECIFIED = 0; - */ - const DIVIDER_STYLE_UNSPECIFIED = 0; - /** - * Default option. Render a solid divider between sections. - * - * Generated from protobuf enum SOLID_DIVIDER = 1; - */ - const SOLID_DIVIDER = 1; - /** - * If set, no divider is rendered between sections. - * - * Generated from protobuf enum NO_DIVIDER = 2; - */ - const NO_DIVIDER = 2; - - private static $valueToName = [ - self::DIVIDER_STYLE_UNSPECIFIED => 'DIVIDER_STYLE_UNSPECIFIED', - self::SOLID_DIVIDER => 'SOLID_DIVIDER', - self::NO_DIVIDER => 'NO_DIVIDER', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DividerStyle::class, \Google\Apps\Card\V1\Card_DividerStyle::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/Section.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/Section.php deleted file mode 100644 index 4a737f780527..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Card/Section.php +++ /dev/null @@ -1,255 +0,0 @@ -google.apps.card.v1.Card.Section - */ -class Section extends \Google\Protobuf\Internal\Message -{ - /** - * Text that appears at the top of a section. - * Supports simple HTML formatted text. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string header = 1; - */ - protected $header = ''; - /** - * All the widgets in the section. - * Must contain at least one widget. - * - * Generated from protobuf field repeated .google.apps.card.v1.Widget widgets = 2; - */ - private $widgets; - /** - * Indicates whether this section is collapsible. - * Collapsible sections hide some or all widgets, but users can expand the - * section to reveal the hidden widgets by clicking **Show more**. Users - * can hide the widgets again by clicking **Show less**. - * To determine which widgets are hidden, specify - * `uncollapsibleWidgetsCount`. - * - * Generated from protobuf field bool collapsible = 5; - */ - protected $collapsible = false; - /** - * The number of uncollapsible widgets which remain visible even when a - * section is collapsed. - * For example, when a section - * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, - * the first two widgets are always shown and the last three are collapsed - * by default. The `uncollapsibleWidgetsCount` is taken into account only - * when `collapsible` is `true`. - * - * Generated from protobuf field int32 uncollapsible_widgets_count = 6; - */ - protected $uncollapsible_widgets_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $header - * Text that appears at the top of a section. - * Supports simple HTML formatted text. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * @type array<\Google\Apps\Card\V1\Widget>|\Google\Protobuf\Internal\RepeatedField $widgets - * All the widgets in the section. - * Must contain at least one widget. - * @type bool $collapsible - * Indicates whether this section is collapsible. - * Collapsible sections hide some or all widgets, but users can expand the - * section to reveal the hidden widgets by clicking **Show more**. Users - * can hide the widgets again by clicking **Show less**. - * To determine which widgets are hidden, specify - * `uncollapsibleWidgetsCount`. - * @type int $uncollapsible_widgets_count - * The number of uncollapsible widgets which remain visible even when a - * section is collapsed. - * For example, when a section - * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, - * the first two widgets are always shown and the last three are collapsed - * by default. The `uncollapsibleWidgetsCount` is taken into account only - * when `collapsible` is `true`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * Text that appears at the top of a section. - * Supports simple HTML formatted text. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string header = 1; - * @return string - */ - public function getHeader() - { - return $this->header; - } - - /** - * Text that appears at the top of a section. - * Supports simple HTML formatted text. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string header = 1; - * @param string $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkString($var, True); - $this->header = $var; - - return $this; - } - - /** - * All the widgets in the section. - * Must contain at least one widget. - * - * Generated from protobuf field repeated .google.apps.card.v1.Widget widgets = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWidgets() - { - return $this->widgets; - } - - /** - * All the widgets in the section. - * Must contain at least one widget. - * - * Generated from protobuf field repeated .google.apps.card.v1.Widget widgets = 2; - * @param array<\Google\Apps\Card\V1\Widget>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWidgets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Widget::class); - $this->widgets = $arr; - - return $this; - } - - /** - * Indicates whether this section is collapsible. - * Collapsible sections hide some or all widgets, but users can expand the - * section to reveal the hidden widgets by clicking **Show more**. Users - * can hide the widgets again by clicking **Show less**. - * To determine which widgets are hidden, specify - * `uncollapsibleWidgetsCount`. - * - * Generated from protobuf field bool collapsible = 5; - * @return bool - */ - public function getCollapsible() - { - return $this->collapsible; - } - - /** - * Indicates whether this section is collapsible. - * Collapsible sections hide some or all widgets, but users can expand the - * section to reveal the hidden widgets by clicking **Show more**. Users - * can hide the widgets again by clicking **Show less**. - * To determine which widgets are hidden, specify - * `uncollapsibleWidgetsCount`. - * - * Generated from protobuf field bool collapsible = 5; - * @param bool $var - * @return $this - */ - public function setCollapsible($var) - { - GPBUtil::checkBool($var); - $this->collapsible = $var; - - return $this; - } - - /** - * The number of uncollapsible widgets which remain visible even when a - * section is collapsed. - * For example, when a section - * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, - * the first two widgets are always shown and the last three are collapsed - * by default. The `uncollapsibleWidgetsCount` is taken into account only - * when `collapsible` is `true`. - * - * Generated from protobuf field int32 uncollapsible_widgets_count = 6; - * @return int - */ - public function getUncollapsibleWidgetsCount() - { - return $this->uncollapsible_widgets_count; - } - - /** - * The number of uncollapsible widgets which remain visible even when a - * section is collapsed. - * For example, when a section - * contains five widgets and the `uncollapsibleWidgetsCount` is set to `2`, - * the first two widgets are always shown and the last three are collapsed - * by default. The `uncollapsibleWidgetsCount` is taken into account only - * when `collapsible` is `true`. - * - * Generated from protobuf field int32 uncollapsible_widgets_count = 6; - * @param int $var - * @return $this - */ - public function setUncollapsibleWidgetsCount($var) - { - GPBUtil::checkInt32($var); - $this->uncollapsible_widgets_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Section::class, \Google\Apps\Card\V1\Card_Section::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns.php deleted file mode 100644 index f2e8cff1b175..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns.php +++ /dev/null @@ -1,91 +0,0 @@ -google.apps.card.v1.Columns - */ -class Columns extends \Google\Protobuf\Internal\Message -{ - /** - * An array of columns. You can include up to 2 columns in a card or dialog. - * - * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column column_items = 2; - */ - private $column_items; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Card\V1\Columns\Column>|\Google\Protobuf\Internal\RepeatedField $column_items - * An array of columns. You can include up to 2 columns in a card or dialog. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * An array of columns. You can include up to 2 columns in a card or dialog. - * - * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column column_items = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getColumnItems() - { - return $this->column_items; - } - - /** - * An array of columns. You can include up to 2 columns in a card or dialog. - * - * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column column_items = 2; - * @param array<\Google\Apps\Card\V1\Columns\Column>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setColumnItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Columns\Column::class); - $this->column_items = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column.php deleted file mode 100644 index 3b58fdef7751..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column.php +++ /dev/null @@ -1,188 +0,0 @@ -google.apps.card.v1.Columns.Column - */ -class Column extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies how a column fills the width of the card. - * - * Generated from protobuf field .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1; - */ - protected $horizontal_size_style = 0; - /** - * Specifies whether widgets align to the left, right, or center of a - * column. - * - * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2; - */ - protected $horizontal_alignment = 0; - /** - * Specifies whether widgets align to the top, bottom, or center of a - * column. - * - * Generated from protobuf field .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3; - */ - protected $vertical_alignment = 0; - /** - * An array of widgets included in a column. Widgets appear in the order - * that they are specified. - * - * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4; - */ - private $widgets; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $horizontal_size_style - * Specifies how a column fills the width of the card. - * @type int $horizontal_alignment - * Specifies whether widgets align to the left, right, or center of a - * column. - * @type int $vertical_alignment - * Specifies whether widgets align to the top, bottom, or center of a - * column. - * @type array<\Google\Apps\Card\V1\Columns\Column\Widgets>|\Google\Protobuf\Internal\RepeatedField $widgets - * An array of widgets included in a column. Widgets appear in the order - * that they are specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * Specifies how a column fills the width of the card. - * - * Generated from protobuf field .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1; - * @return int - */ - public function getHorizontalSizeStyle() - { - return $this->horizontal_size_style; - } - - /** - * Specifies how a column fills the width of the card. - * - * Generated from protobuf field .google.apps.card.v1.Columns.Column.HorizontalSizeStyle horizontal_size_style = 1; - * @param int $var - * @return $this - */ - public function setHorizontalSizeStyle($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Columns\Column\HorizontalSizeStyle::class); - $this->horizontal_size_style = $var; - - return $this; - } - - /** - * Specifies whether widgets align to the left, right, or center of a - * column. - * - * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2; - * @return int - */ - public function getHorizontalAlignment() - { - return $this->horizontal_alignment; - } - - /** - * Specifies whether widgets align to the left, right, or center of a - * column. - * - * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 2; - * @param int $var - * @return $this - */ - public function setHorizontalAlignment($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\HorizontalAlignment::class); - $this->horizontal_alignment = $var; - - return $this; - } - - /** - * Specifies whether widgets align to the top, bottom, or center of a - * column. - * - * Generated from protobuf field .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3; - * @return int - */ - public function getVerticalAlignment() - { - return $this->vertical_alignment; - } - - /** - * Specifies whether widgets align to the top, bottom, or center of a - * column. - * - * Generated from protobuf field .google.apps.card.v1.Columns.Column.VerticalAlignment vertical_alignment = 3; - * @param int $var - * @return $this - */ - public function setVerticalAlignment($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Columns\Column\VerticalAlignment::class); - $this->vertical_alignment = $var; - - return $this; - } - - /** - * An array of widgets included in a column. Widgets appear in the order - * that they are specified. - * - * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWidgets() - { - return $this->widgets; - } - - /** - * An array of widgets included in a column. Widgets appear in the order - * that they are specified. - * - * Generated from protobuf field repeated .google.apps.card.v1.Columns.Column.Widgets widgets = 4; - * @param array<\Google\Apps\Card\V1\Columns\Column\Widgets>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWidgets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Columns\Column\Widgets::class); - $this->widgets = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Column::class, \Google\Apps\Card\V1\Columns_Column::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/HorizontalSizeStyle.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/HorizontalSizeStyle.php deleted file mode 100644 index f6e8683abc05..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/HorizontalSizeStyle.php +++ /dev/null @@ -1,73 +0,0 @@ -google.apps.card.v1.Columns.Column.HorizontalSizeStyle - */ -class HorizontalSizeStyle -{ - /** - * Don't use. Unspecified. - * - * Generated from protobuf enum HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0; - */ - const HORIZONTAL_SIZE_STYLE_UNSPECIFIED = 0; - /** - * Default value. Column fills the available space, up to 70% of the - * card's width. If both columns are set to `FILL_AVAILABLE_SPACE`, each - * column fills 50% of the space. - * - * Generated from protobuf enum FILL_AVAILABLE_SPACE = 1; - */ - const FILL_AVAILABLE_SPACE = 1; - /** - * Column fills the least amount of space possible and no more than 30% of - * the card's width. - * - * Generated from protobuf enum FILL_MINIMUM_SPACE = 2; - */ - const FILL_MINIMUM_SPACE = 2; - - private static $valueToName = [ - self::HORIZONTAL_SIZE_STYLE_UNSPECIFIED => 'HORIZONTAL_SIZE_STYLE_UNSPECIFIED', - self::FILL_AVAILABLE_SPACE => 'FILL_AVAILABLE_SPACE', - self::FILL_MINIMUM_SPACE => 'FILL_MINIMUM_SPACE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HorizontalSizeStyle::class, \Google\Apps\Card\V1\Columns_Column_HorizontalSizeStyle::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/VerticalAlignment.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/VerticalAlignment.php deleted file mode 100644 index 10e16d17fb44..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/VerticalAlignment.php +++ /dev/null @@ -1,76 +0,0 @@ -google.apps.card.v1.Columns.Column.VerticalAlignment - */ -class VerticalAlignment -{ - /** - * Don't use. Unspecified. - * - * Generated from protobuf enum VERTICAL_ALIGNMENT_UNSPECIFIED = 0; - */ - const VERTICAL_ALIGNMENT_UNSPECIFIED = 0; - /** - * Default value. Aligns widgets to the center of a column. - * - * Generated from protobuf enum CENTER = 1; - */ - const CENTER = 1; - /** - * Aligns widgets to the top of a column. - * - * Generated from protobuf enum TOP = 2; - */ - const TOP = 2; - /** - * Aligns widgets to the bottom of a column. - * - * Generated from protobuf enum BOTTOM = 3; - */ - const BOTTOM = 3; - - private static $valueToName = [ - self::VERTICAL_ALIGNMENT_UNSPECIFIED => 'VERTICAL_ALIGNMENT_UNSPECIFIED', - self::CENTER => 'CENTER', - self::TOP => 'TOP', - self::BOTTOM => 'BOTTOM', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(VerticalAlignment::class, \Google\Apps\Card\V1\Columns_Column_VerticalAlignment::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/Widgets.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/Widgets.php deleted file mode 100644 index 5e2cecc1f34d..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Columns/Column/Widgets.php +++ /dev/null @@ -1,280 +0,0 @@ -google.apps.card.v1.Columns.Column.Widgets - */ -class Widgets extends \Google\Protobuf\Internal\Message -{ - protected $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Card\V1\TextParagraph $text_paragraph - * [TextParagraph][google.apps.card.v1.TextParagraph] widget. - * @type \Google\Apps\Card\V1\Image $image - * [Image][google.apps.card.v1.Image] widget. - * @type \Google\Apps\Card\V1\DecoratedText $decorated_text - * [DecoratedText][google.apps.card.v1.DecoratedText] widget. - * @type \Google\Apps\Card\V1\ButtonList $button_list - * [ButtonList][google.apps.card.v1.ButtonList] widget. - * @type \Google\Apps\Card\V1\TextInput $text_input - * [TextInput][google.apps.card.v1.TextInput] widget. - * @type \Google\Apps\Card\V1\SelectionInput $selection_input - * [SelectionInput][google.apps.card.v1.SelectionInput] widget. - * @type \Google\Apps\Card\V1\DateTimePicker $date_time_picker - * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * [TextParagraph][google.apps.card.v1.TextParagraph] widget. - * - * Generated from protobuf field .google.apps.card.v1.TextParagraph text_paragraph = 1; - * @return \Google\Apps\Card\V1\TextParagraph|null - */ - public function getTextParagraph() - { - return $this->readOneof(1); - } - - public function hasTextParagraph() - { - return $this->hasOneof(1); - } - - /** - * [TextParagraph][google.apps.card.v1.TextParagraph] widget. - * - * Generated from protobuf field .google.apps.card.v1.TextParagraph text_paragraph = 1; - * @param \Google\Apps\Card\V1\TextParagraph $var - * @return $this - */ - public function setTextParagraph($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\TextParagraph::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * [Image][google.apps.card.v1.Image] widget. - * - * Generated from protobuf field .google.apps.card.v1.Image image = 2; - * @return \Google\Apps\Card\V1\Image|null - */ - public function getImage() - { - return $this->readOneof(2); - } - - public function hasImage() - { - return $this->hasOneof(2); - } - - /** - * [Image][google.apps.card.v1.Image] widget. - * - * Generated from protobuf field .google.apps.card.v1.Image image = 2; - * @param \Google\Apps\Card\V1\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Image::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * [DecoratedText][google.apps.card.v1.DecoratedText] widget. - * - * Generated from protobuf field .google.apps.card.v1.DecoratedText decorated_text = 3; - * @return \Google\Apps\Card\V1\DecoratedText|null - */ - public function getDecoratedText() - { - return $this->readOneof(3); - } - - public function hasDecoratedText() - { - return $this->hasOneof(3); - } - - /** - * [DecoratedText][google.apps.card.v1.DecoratedText] widget. - * - * Generated from protobuf field .google.apps.card.v1.DecoratedText decorated_text = 3; - * @param \Google\Apps\Card\V1\DecoratedText $var - * @return $this - */ - public function setDecoratedText($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DecoratedText::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * [ButtonList][google.apps.card.v1.ButtonList] widget. - * - * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 4; - * @return \Google\Apps\Card\V1\ButtonList|null - */ - public function getButtonList() - { - return $this->readOneof(4); - } - - public function hasButtonList() - { - return $this->hasOneof(4); - } - - /** - * [ButtonList][google.apps.card.v1.ButtonList] widget. - * - * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 4; - * @param \Google\Apps\Card\V1\ButtonList $var - * @return $this - */ - public function setButtonList($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ButtonList::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * [TextInput][google.apps.card.v1.TextInput] widget. - * - * Generated from protobuf field .google.apps.card.v1.TextInput text_input = 5; - * @return \Google\Apps\Card\V1\TextInput|null - */ - public function getTextInput() - { - return $this->readOneof(5); - } - - public function hasTextInput() - { - return $this->hasOneof(5); - } - - /** - * [TextInput][google.apps.card.v1.TextInput] widget. - * - * Generated from protobuf field .google.apps.card.v1.TextInput text_input = 5; - * @param \Google\Apps\Card\V1\TextInput $var - * @return $this - */ - public function setTextInput($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\TextInput::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * [SelectionInput][google.apps.card.v1.SelectionInput] widget. - * - * Generated from protobuf field .google.apps.card.v1.SelectionInput selection_input = 6; - * @return \Google\Apps\Card\V1\SelectionInput|null - */ - public function getSelectionInput() - { - return $this->readOneof(6); - } - - public function hasSelectionInput() - { - return $this->hasOneof(6); - } - - /** - * [SelectionInput][google.apps.card.v1.SelectionInput] widget. - * - * Generated from protobuf field .google.apps.card.v1.SelectionInput selection_input = 6; - * @param \Google\Apps\Card\V1\SelectionInput $var - * @return $this - */ - public function setSelectionInput($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\SelectionInput::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget. - * - * Generated from protobuf field .google.apps.card.v1.DateTimePicker date_time_picker = 7; - * @return \Google\Apps\Card\V1\DateTimePicker|null - */ - public function getDateTimePicker() - { - return $this->readOneof(7); - } - - public function hasDateTimePicker() - { - return $this->hasOneof(7); - } - - /** - * [DateTimePicker][google.apps.card.v1.DateTimePicker] widget. - * - * Generated from protobuf field .google.apps.card.v1.DateTimePicker date_time_picker = 7; - * @param \Google\Apps\Card\V1\DateTimePicker $var - * @return $this - */ - public function setDateTimePicker($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DateTimePicker::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Widgets::class, \Google\Apps\Card\V1\Columns_Column_Widgets::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker.php deleted file mode 100644 index 324bcac7ae7c..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker.php +++ /dev/null @@ -1,314 +0,0 @@ -google.apps.card.v1.DateTimePicker - */ -class DateTimePicker extends \Google\Protobuf\Internal\Message -{ - /** - * The name by which the `DateTimePicker` is identified in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The text that prompts users to input a date, a time, or a date and time. - * For example, if users are scheduling an appointment, use a label such as - * `Appointment date` or `Appointment date and time`. - * - * Generated from protobuf field string label = 2; - */ - protected $label = ''; - /** - * Whether the widget supports inputting a date, a time, or the date and time. - * - * Generated from protobuf field .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3; - */ - protected $type = 0; - /** - * The default value displayed in the widget, in milliseconds since [Unix - * epoch time](https://en.wikipedia.org/wiki/Unix_time). - * Specify the value based on the type of picker (`DateTimePickerType`): - * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to - * represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. - * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent - * January 1, 2023, use `1672531200000`. - * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use - * `43200000` (or `12 * 60 * 60 * 1000`). - * - * Generated from protobuf field int64 value_ms_epoch = 4; - */ - protected $value_ms_epoch = 0; - /** - * The number representing the time zone offset from UTC, in minutes. - * If set, the `value_ms_epoch` is displayed in the specified time zone. - * If unset, the value defaults to the user's time zone setting. - * - * Generated from protobuf field int32 timezone_offset_date = 5; - */ - protected $timezone_offset_date = 0; - /** - * Triggered when the user clicks **Save** or **Clear** from the - * `DateTimePicker` interface. - * - * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; - */ - protected $on_change_action = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name by which the `DateTimePicker` is identified in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * @type string $label - * The text that prompts users to input a date, a time, or a date and time. - * For example, if users are scheduling an appointment, use a label such as - * `Appointment date` or `Appointment date and time`. - * @type int $type - * Whether the widget supports inputting a date, a time, or the date and time. - * @type int|string $value_ms_epoch - * The default value displayed in the widget, in milliseconds since [Unix - * epoch time](https://en.wikipedia.org/wiki/Unix_time). - * Specify the value based on the type of picker (`DateTimePickerType`): - * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to - * represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. - * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent - * January 1, 2023, use `1672531200000`. - * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use - * `43200000` (or `12 * 60 * 60 * 1000`). - * @type int $timezone_offset_date - * The number representing the time zone offset from UTC, in minutes. - * If set, the `value_ms_epoch` is displayed in the specified time zone. - * If unset, the value defaults to the user's time zone setting. - * @type \Google\Apps\Card\V1\Action $on_change_action - * Triggered when the user clicks **Save** or **Clear** from the - * `DateTimePicker` interface. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The name by which the `DateTimePicker` is identified in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name by which the `DateTimePicker` is identified in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The text that prompts users to input a date, a time, or a date and time. - * For example, if users are scheduling an appointment, use a label such as - * `Appointment date` or `Appointment date and time`. - * - * Generated from protobuf field string label = 2; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * The text that prompts users to input a date, a time, or a date and time. - * For example, if users are scheduling an appointment, use a label such as - * `Appointment date` or `Appointment date and time`. - * - * Generated from protobuf field string label = 2; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * Whether the widget supports inputting a date, a time, or the date and time. - * - * Generated from protobuf field .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Whether the widget supports inputting a date, a time, or the date and time. - * - * Generated from protobuf field .google.apps.card.v1.DateTimePicker.DateTimePickerType type = 3; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\DateTimePicker\DateTimePickerType::class); - $this->type = $var; - - return $this; - } - - /** - * The default value displayed in the widget, in milliseconds since [Unix - * epoch time](https://en.wikipedia.org/wiki/Unix_time). - * Specify the value based on the type of picker (`DateTimePickerType`): - * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to - * represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. - * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent - * January 1, 2023, use `1672531200000`. - * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use - * `43200000` (or `12 * 60 * 60 * 1000`). - * - * Generated from protobuf field int64 value_ms_epoch = 4; - * @return int|string - */ - public function getValueMsEpoch() - { - return $this->value_ms_epoch; - } - - /** - * The default value displayed in the widget, in milliseconds since [Unix - * epoch time](https://en.wikipedia.org/wiki/Unix_time). - * Specify the value based on the type of picker (`DateTimePickerType`): - * * `DATE_AND_TIME`: a calendar date and time in UTC. For example, to - * represent January 1, 2023 at 12:00 PM UTC, use `1672574400000`. - * * `DATE_ONLY`: a calendar date at 00:00:00 UTC. For example, to represent - * January 1, 2023, use `1672531200000`. - * * `TIME_ONLY`: a time in UTC. For example, to represent 12:00 PM, use - * `43200000` (or `12 * 60 * 60 * 1000`). - * - * Generated from protobuf field int64 value_ms_epoch = 4; - * @param int|string $var - * @return $this - */ - public function setValueMsEpoch($var) - { - GPBUtil::checkInt64($var); - $this->value_ms_epoch = $var; - - return $this; - } - - /** - * The number representing the time zone offset from UTC, in minutes. - * If set, the `value_ms_epoch` is displayed in the specified time zone. - * If unset, the value defaults to the user's time zone setting. - * - * Generated from protobuf field int32 timezone_offset_date = 5; - * @return int - */ - public function getTimezoneOffsetDate() - { - return $this->timezone_offset_date; - } - - /** - * The number representing the time zone offset from UTC, in minutes. - * If set, the `value_ms_epoch` is displayed in the specified time zone. - * If unset, the value defaults to the user's time zone setting. - * - * Generated from protobuf field int32 timezone_offset_date = 5; - * @param int $var - * @return $this - */ - public function setTimezoneOffsetDate($var) - { - GPBUtil::checkInt32($var); - $this->timezone_offset_date = $var; - - return $this; - } - - /** - * Triggered when the user clicks **Save** or **Clear** from the - * `DateTimePicker` interface. - * - * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; - * @return \Google\Apps\Card\V1\Action|null - */ - public function getOnChangeAction() - { - return $this->on_change_action; - } - - public function hasOnChangeAction() - { - return isset($this->on_change_action); - } - - public function clearOnChangeAction() - { - unset($this->on_change_action); - } - - /** - * Triggered when the user clicks **Save** or **Clear** from the - * `DateTimePicker` interface. - * - * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; - * @param \Google\Apps\Card\V1\Action $var - * @return $this - */ - public function setOnChangeAction($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); - $this->on_change_action = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker/DateTimePickerType.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker/DateTimePickerType.php deleted file mode 100644 index e4866cc072b0..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DateTimePicker/DateTimePickerType.php +++ /dev/null @@ -1,67 +0,0 @@ -google.apps.card.v1.DateTimePicker.DateTimePickerType - */ -class DateTimePickerType -{ - /** - * Users input a date and time. - * - * Generated from protobuf enum DATE_AND_TIME = 0; - */ - const DATE_AND_TIME = 0; - /** - * Users input a date. - * - * Generated from protobuf enum DATE_ONLY = 1; - */ - const DATE_ONLY = 1; - /** - * Users input a time. - * - * Generated from protobuf enum TIME_ONLY = 2; - */ - const TIME_ONLY = 2; - - private static $valueToName = [ - self::DATE_AND_TIME => 'DATE_AND_TIME', - self::DATE_ONLY => 'DATE_ONLY', - self::TIME_ONLY => 'TIME_ONLY', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DateTimePickerType::class, \Google\Apps\Card\V1\DateTimePicker_DateTimePickerType::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText.php deleted file mode 100644 index b8526ef893b8..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText.php +++ /dev/null @@ -1,480 +0,0 @@ -google.apps.card.v1.DecoratedText - */ -class DecoratedText extends \Google\Protobuf\Internal\Message -{ - /** - * Deprecated in favor of `startIcon`. - * - * Generated from protobuf field .google.apps.card.v1.Icon icon = 1 [deprecated = true]; - * @deprecated - */ - protected $icon = null; - /** - * The icon displayed in front of the text. - * - * Generated from protobuf field .google.apps.card.v1.Icon start_icon = 12; - */ - protected $start_icon = null; - /** - * The text that appears above `text`. Always truncates. - * - * Generated from protobuf field string top_label = 3; - */ - protected $top_label = ''; - /** - * Required. The primary text. - * Supports simple formatting. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string text = 4; - */ - protected $text = ''; - /** - * The wrap text setting. If `true`, the text wraps and displays on - * multiple lines. Otherwise, the text is truncated. - * Only applies to `text`, not `topLabel` and `bottomLabel`. - * - * Generated from protobuf field bool wrap_text = 5; - */ - protected $wrap_text = false; - /** - * The text that appears below `text`. Always wraps. - * - * Generated from protobuf field string bottom_label = 6; - */ - protected $bottom_label = ''; - /** - * This action is triggered when users click `topLabel` or `bottomLabel`. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 7; - */ - protected $on_click = null; - protected $control; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Card\V1\Icon $icon - * Deprecated in favor of `startIcon`. - * @type \Google\Apps\Card\V1\Icon $start_icon - * The icon displayed in front of the text. - * @type string $top_label - * The text that appears above `text`. Always truncates. - * @type string $text - * Required. The primary text. - * Supports simple formatting. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * @type bool $wrap_text - * The wrap text setting. If `true`, the text wraps and displays on - * multiple lines. Otherwise, the text is truncated. - * Only applies to `text`, not `topLabel` and `bottomLabel`. - * @type string $bottom_label - * The text that appears below `text`. Always wraps. - * @type \Google\Apps\Card\V1\OnClick $on_click - * This action is triggered when users click `topLabel` or `bottomLabel`. - * @type \Google\Apps\Card\V1\Button $button - * A button that a user can click to trigger an action. - * @type \Google\Apps\Card\V1\DecoratedText\SwitchControl $switch_control - * A switch widget that a user can click to change its state and trigger an - * action. - * @type \Google\Apps\Card\V1\Icon $end_icon - * An icon displayed after the text. - * Supports - * [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) - * and - * [custom](https://developers.google.com/workspace/chat/format-messages#customicons) - * icons. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * Deprecated in favor of `startIcon`. - * - * Generated from protobuf field .google.apps.card.v1.Icon icon = 1 [deprecated = true]; - * @return \Google\Apps\Card\V1\Icon|null - * @deprecated - */ - public function getIcon() - { - @trigger_error('icon is deprecated.', E_USER_DEPRECATED); - return $this->icon; - } - - public function hasIcon() - { - @trigger_error('icon is deprecated.', E_USER_DEPRECATED); - return isset($this->icon); - } - - public function clearIcon() - { - @trigger_error('icon is deprecated.', E_USER_DEPRECATED); - unset($this->icon); - } - - /** - * Deprecated in favor of `startIcon`. - * - * Generated from protobuf field .google.apps.card.v1.Icon icon = 1 [deprecated = true]; - * @param \Google\Apps\Card\V1\Icon $var - * @return $this - * @deprecated - */ - public function setIcon($var) - { - @trigger_error('icon is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Icon::class); - $this->icon = $var; - - return $this; - } - - /** - * The icon displayed in front of the text. - * - * Generated from protobuf field .google.apps.card.v1.Icon start_icon = 12; - * @return \Google\Apps\Card\V1\Icon|null - */ - public function getStartIcon() - { - return $this->start_icon; - } - - public function hasStartIcon() - { - return isset($this->start_icon); - } - - public function clearStartIcon() - { - unset($this->start_icon); - } - - /** - * The icon displayed in front of the text. - * - * Generated from protobuf field .google.apps.card.v1.Icon start_icon = 12; - * @param \Google\Apps\Card\V1\Icon $var - * @return $this - */ - public function setStartIcon($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Icon::class); - $this->start_icon = $var; - - return $this; - } - - /** - * The text that appears above `text`. Always truncates. - * - * Generated from protobuf field string top_label = 3; - * @return string - */ - public function getTopLabel() - { - return $this->top_label; - } - - /** - * The text that appears above `text`. Always truncates. - * - * Generated from protobuf field string top_label = 3; - * @param string $var - * @return $this - */ - public function setTopLabel($var) - { - GPBUtil::checkString($var, True); - $this->top_label = $var; - - return $this; - } - - /** - * Required. The primary text. - * Supports simple formatting. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string text = 4; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Required. The primary text. - * Supports simple formatting. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string text = 4; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * The wrap text setting. If `true`, the text wraps and displays on - * multiple lines. Otherwise, the text is truncated. - * Only applies to `text`, not `topLabel` and `bottomLabel`. - * - * Generated from protobuf field bool wrap_text = 5; - * @return bool - */ - public function getWrapText() - { - return $this->wrap_text; - } - - /** - * The wrap text setting. If `true`, the text wraps and displays on - * multiple lines. Otherwise, the text is truncated. - * Only applies to `text`, not `topLabel` and `bottomLabel`. - * - * Generated from protobuf field bool wrap_text = 5; - * @param bool $var - * @return $this - */ - public function setWrapText($var) - { - GPBUtil::checkBool($var); - $this->wrap_text = $var; - - return $this; - } - - /** - * The text that appears below `text`. Always wraps. - * - * Generated from protobuf field string bottom_label = 6; - * @return string - */ - public function getBottomLabel() - { - return $this->bottom_label; - } - - /** - * The text that appears below `text`. Always wraps. - * - * Generated from protobuf field string bottom_label = 6; - * @param string $var - * @return $this - */ - public function setBottomLabel($var) - { - GPBUtil::checkString($var, True); - $this->bottom_label = $var; - - return $this; - } - - /** - * This action is triggered when users click `topLabel` or `bottomLabel`. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 7; - * @return \Google\Apps\Card\V1\OnClick|null - */ - public function getOnClick() - { - return $this->on_click; - } - - public function hasOnClick() - { - return isset($this->on_click); - } - - public function clearOnClick() - { - unset($this->on_click); - } - - /** - * This action is triggered when users click `topLabel` or `bottomLabel`. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 7; - * @param \Google\Apps\Card\V1\OnClick $var - * @return $this - */ - public function setOnClick($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); - $this->on_click = $var; - - return $this; - } - - /** - * A button that a user can click to trigger an action. - * - * Generated from protobuf field .google.apps.card.v1.Button button = 8; - * @return \Google\Apps\Card\V1\Button|null - */ - public function getButton() - { - return $this->readOneof(8); - } - - public function hasButton() - { - return $this->hasOneof(8); - } - - /** - * A button that a user can click to trigger an action. - * - * Generated from protobuf field .google.apps.card.v1.Button button = 8; - * @param \Google\Apps\Card\V1\Button $var - * @return $this - */ - public function setButton($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Button::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * A switch widget that a user can click to change its state and trigger an - * action. - * - * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9; - * @return \Google\Apps\Card\V1\DecoratedText\SwitchControl|null - */ - public function getSwitchControl() - { - return $this->readOneof(9); - } - - public function hasSwitchControl() - { - return $this->hasOneof(9); - } - - /** - * A switch widget that a user can click to change its state and trigger an - * action. - * - * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl switch_control = 9; - * @param \Google\Apps\Card\V1\DecoratedText\SwitchControl $var - * @return $this - */ - public function setSwitchControl($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DecoratedText\SwitchControl::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * An icon displayed after the text. - * Supports - * [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) - * and - * [custom](https://developers.google.com/workspace/chat/format-messages#customicons) - * icons. - * - * Generated from protobuf field .google.apps.card.v1.Icon end_icon = 11; - * @return \Google\Apps\Card\V1\Icon|null - */ - public function getEndIcon() - { - return $this->readOneof(11); - } - - public function hasEndIcon() - { - return $this->hasOneof(11); - } - - /** - * An icon displayed after the text. - * Supports - * [built-in](https://developers.google.com/workspace/chat/format-messages#builtinicons) - * and - * [custom](https://developers.google.com/workspace/chat/format-messages#customicons) - * icons. - * - * Generated from protobuf field .google.apps.card.v1.Icon end_icon = 11; - * @param \Google\Apps\Card\V1\Icon $var - * @return $this - */ - public function setEndIcon($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Icon::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * @return string - */ - public function getControl() - { - return $this->whichOneof("control"); - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl.php deleted file mode 100644 index 9949152ee710..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl.php +++ /dev/null @@ -1,247 +0,0 @@ -google.apps.card.v1.DecoratedText.SwitchControl - */ -class SwitchControl extends \Google\Protobuf\Internal\Message -{ - /** - * The name by which the switch widget is identified in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The value entered by a user, returned as part of a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - /** - * When `true`, the switch is selected. - * - * Generated from protobuf field bool selected = 3; - */ - protected $selected = false; - /** - * The action to perform when the switch state is changed, such as what - * function to run. - * - * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 4; - */ - protected $on_change_action = null; - /** - * How the switch appears in the user interface. - * [Google Workspace Add-ons - * and Chat apps](https://developers.google.com/workspace/extend): - * - * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5; - */ - protected $control_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name by which the switch widget is identified in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * @type string $value - * The value entered by a user, returned as part of a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * @type bool $selected - * When `true`, the switch is selected. - * @type \Google\Apps\Card\V1\Action $on_change_action - * The action to perform when the switch state is changed, such as what - * function to run. - * @type int $control_type - * How the switch appears in the user interface. - * [Google Workspace Add-ons - * and Chat apps](https://developers.google.com/workspace/extend): - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The name by which the switch widget is identified in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name by which the switch widget is identified in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The value entered by a user, returned as part of a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value entered by a user, returned as part of a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * When `true`, the switch is selected. - * - * Generated from protobuf field bool selected = 3; - * @return bool - */ - public function getSelected() - { - return $this->selected; - } - - /** - * When `true`, the switch is selected. - * - * Generated from protobuf field bool selected = 3; - * @param bool $var - * @return $this - */ - public function setSelected($var) - { - GPBUtil::checkBool($var); - $this->selected = $var; - - return $this; - } - - /** - * The action to perform when the switch state is changed, such as what - * function to run. - * - * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 4; - * @return \Google\Apps\Card\V1\Action|null - */ - public function getOnChangeAction() - { - return $this->on_change_action; - } - - public function hasOnChangeAction() - { - return isset($this->on_change_action); - } - - public function clearOnChangeAction() - { - unset($this->on_change_action); - } - - /** - * The action to perform when the switch state is changed, such as what - * function to run. - * - * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 4; - * @param \Google\Apps\Card\V1\Action $var - * @return $this - */ - public function setOnChangeAction($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); - $this->on_change_action = $var; - - return $this; - } - - /** - * How the switch appears in the user interface. - * [Google Workspace Add-ons - * and Chat apps](https://developers.google.com/workspace/extend): - * - * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5; - * @return int - */ - public function getControlType() - { - return $this->control_type; - } - - /** - * How the switch appears in the user interface. - * [Google Workspace Add-ons - * and Chat apps](https://developers.google.com/workspace/extend): - * - * Generated from protobuf field .google.apps.card.v1.DecoratedText.SwitchControl.ControlType control_type = 5; - * @param int $var - * @return $this - */ - public function setControlType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\DecoratedText\SwitchControl\ControlType::class); - $this->control_type = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SwitchControl::class, \Google\Apps\Card\V1\DecoratedText_SwitchControl::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl/ControlType.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl/ControlType.php deleted file mode 100644 index 1dee8d9b7f50..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/DecoratedText/SwitchControl/ControlType.php +++ /dev/null @@ -1,70 +0,0 @@ -google.apps.card.v1.DecoratedText.SwitchControl.ControlType - */ -class ControlType -{ - /** - * A toggle-style switch. - * - * Generated from protobuf enum SWITCH = 0; - */ - const PBSWITCH = 0; - /** - * Deprecated in favor of `CHECK_BOX`. - * - * Generated from protobuf enum CHECKBOX = 1; - */ - const CHECKBOX = 1; - /** - * A checkbox. - * - * Generated from protobuf enum CHECK_BOX = 2; - */ - const CHECK_BOX = 2; - - private static $valueToName = [ - self::PBSWITCH => 'SWITCH', - self::CHECKBOX => 'CHECKBOX', - self::CHECK_BOX => 'CHECK_BOX', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ControlType::class, \Google\Apps\Card\V1\DecoratedText_SwitchControl_ControlType::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Divider.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Divider.php deleted file mode 100644 index 302c3a2b4e4f..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Divider.php +++ /dev/null @@ -1,42 +0,0 @@ -google.apps.card.v1.Divider - */ -class Divider extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid.php deleted file mode 100644 index daf8a87f9278..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid.php +++ /dev/null @@ -1,281 +0,0 @@ -google.apps.card.v1.Grid - */ -class Grid extends \Google\Protobuf\Internal\Message -{ - /** - * The text that displays in the grid header. - * - * Generated from protobuf field string title = 1; - */ - protected $title = ''; - /** - * The items to display in the grid. - * - * Generated from protobuf field repeated .google.apps.card.v1.Grid.GridItem items = 2; - */ - private $items; - /** - * The border style to apply to each grid item. - * - * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 3; - */ - protected $border_style = null; - /** - * The number of columns to display in the grid. A default value - * is used if this field isn't specified, and that default value is - * different depending on where the grid is shown (dialog versus companion). - * - * Generated from protobuf field int32 column_count = 4; - */ - protected $column_count = 0; - /** - * This callback is reused by each individual grid item, but with the - * item's identifier and index in the items list added to the callback's - * parameters. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 5; - */ - protected $on_click = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * The text that displays in the grid header. - * @type array<\Google\Apps\Card\V1\Grid\GridItem>|\Google\Protobuf\Internal\RepeatedField $items - * The items to display in the grid. - * @type \Google\Apps\Card\V1\BorderStyle $border_style - * The border style to apply to each grid item. - * @type int $column_count - * The number of columns to display in the grid. A default value - * is used if this field isn't specified, and that default value is - * different depending on where the grid is shown (dialog versus companion). - * @type \Google\Apps\Card\V1\OnClick $on_click - * This callback is reused by each individual grid item, but with the - * item's identifier and index in the items list added to the callback's - * parameters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The text that displays in the grid header. - * - * Generated from protobuf field string title = 1; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * The text that displays in the grid header. - * - * Generated from protobuf field string title = 1; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * The items to display in the grid. - * - * Generated from protobuf field repeated .google.apps.card.v1.Grid.GridItem items = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * The items to display in the grid. - * - * Generated from protobuf field repeated .google.apps.card.v1.Grid.GridItem items = 2; - * @param array<\Google\Apps\Card\V1\Grid\GridItem>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Grid\GridItem::class); - $this->items = $arr; - - return $this; - } - - /** - * The border style to apply to each grid item. - * - * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 3; - * @return \Google\Apps\Card\V1\BorderStyle|null - */ - public function getBorderStyle() - { - return $this->border_style; - } - - public function hasBorderStyle() - { - return isset($this->border_style); - } - - public function clearBorderStyle() - { - unset($this->border_style); - } - - /** - * The border style to apply to each grid item. - * - * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 3; - * @param \Google\Apps\Card\V1\BorderStyle $var - * @return $this - */ - public function setBorderStyle($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\BorderStyle::class); - $this->border_style = $var; - - return $this; - } - - /** - * The number of columns to display in the grid. A default value - * is used if this field isn't specified, and that default value is - * different depending on where the grid is shown (dialog versus companion). - * - * Generated from protobuf field int32 column_count = 4; - * @return int - */ - public function getColumnCount() - { - return $this->column_count; - } - - /** - * The number of columns to display in the grid. A default value - * is used if this field isn't specified, and that default value is - * different depending on where the grid is shown (dialog versus companion). - * - * Generated from protobuf field int32 column_count = 4; - * @param int $var - * @return $this - */ - public function setColumnCount($var) - { - GPBUtil::checkInt32($var); - $this->column_count = $var; - - return $this; - } - - /** - * This callback is reused by each individual grid item, but with the - * item's identifier and index in the items list added to the callback's - * parameters. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 5; - * @return \Google\Apps\Card\V1\OnClick|null - */ - public function getOnClick() - { - return $this->on_click; - } - - public function hasOnClick() - { - return isset($this->on_click); - } - - public function clearOnClick() - { - unset($this->on_click); - } - - /** - * This callback is reused by each individual grid item, but with the - * item's identifier and index in the items list added to the callback's - * parameters. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 5; - * @param \Google\Apps\Card\V1\OnClick $var - * @return $this - */ - public function setOnClick($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); - $this->on_click = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem.php deleted file mode 100644 index d795142ccd5d..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem.php +++ /dev/null @@ -1,223 +0,0 @@ -google.apps.card.v1.Grid.GridItem - */ -class GridItem extends \Google\Protobuf\Internal\Message -{ - /** - * A user-specified identifier for this grid item. This identifier is - * returned in the parent grid's `onClick` callback parameters. - * - * Generated from protobuf field string id = 1; - */ - protected $id = ''; - /** - * The image that displays in the grid item. - * - * Generated from protobuf field .google.apps.card.v1.ImageComponent image = 2; - */ - protected $image = null; - /** - * The grid item's title. - * - * Generated from protobuf field string title = 3; - */ - protected $title = ''; - /** - * The grid item's subtitle. - * - * Generated from protobuf field string subtitle = 4; - */ - protected $subtitle = ''; - /** - * The layout to use for the grid item. - * - * Generated from protobuf field .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9; - */ - protected $layout = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $id - * A user-specified identifier for this grid item. This identifier is - * returned in the parent grid's `onClick` callback parameters. - * @type \Google\Apps\Card\V1\ImageComponent $image - * The image that displays in the grid item. - * @type string $title - * The grid item's title. - * @type string $subtitle - * The grid item's subtitle. - * @type int $layout - * The layout to use for the grid item. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * A user-specified identifier for this grid item. This identifier is - * returned in the parent grid's `onClick` callback parameters. - * - * Generated from protobuf field string id = 1; - * @return string - */ - public function getId() - { - return $this->id; - } - - /** - * A user-specified identifier for this grid item. This identifier is - * returned in the parent grid's `onClick` callback parameters. - * - * Generated from protobuf field string id = 1; - * @param string $var - * @return $this - */ - public function setId($var) - { - GPBUtil::checkString($var, True); - $this->id = $var; - - return $this; - } - - /** - * The image that displays in the grid item. - * - * Generated from protobuf field .google.apps.card.v1.ImageComponent image = 2; - * @return \Google\Apps\Card\V1\ImageComponent|null - */ - public function getImage() - { - return $this->image; - } - - public function hasImage() - { - return isset($this->image); - } - - public function clearImage() - { - unset($this->image); - } - - /** - * The image that displays in the grid item. - * - * Generated from protobuf field .google.apps.card.v1.ImageComponent image = 2; - * @param \Google\Apps\Card\V1\ImageComponent $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ImageComponent::class); - $this->image = $var; - - return $this; - } - - /** - * The grid item's title. - * - * Generated from protobuf field string title = 3; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * The grid item's title. - * - * Generated from protobuf field string title = 3; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * The grid item's subtitle. - * - * Generated from protobuf field string subtitle = 4; - * @return string - */ - public function getSubtitle() - { - return $this->subtitle; - } - - /** - * The grid item's subtitle. - * - * Generated from protobuf field string subtitle = 4; - * @param string $var - * @return $this - */ - public function setSubtitle($var) - { - GPBUtil::checkString($var, True); - $this->subtitle = $var; - - return $this; - } - - /** - * The layout to use for the grid item. - * - * Generated from protobuf field .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9; - * @return int - */ - public function getLayout() - { - return $this->layout; - } - - /** - * The layout to use for the grid item. - * - * Generated from protobuf field .google.apps.card.v1.Grid.GridItem.GridItemLayout layout = 9; - * @param int $var - * @return $this - */ - public function setLayout($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Grid\GridItem\GridItemLayout::class); - $this->layout = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GridItem::class, \Google\Apps\Card\V1\Grid_GridItem::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem/GridItemLayout.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem/GridItemLayout.php deleted file mode 100644 index 1606b65a4919..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Grid/GridItem/GridItemLayout.php +++ /dev/null @@ -1,66 +0,0 @@ -google.apps.card.v1.Grid.GridItem.GridItemLayout - */ -class GridItemLayout -{ - /** - * Don't use. Unspecified. - * - * Generated from protobuf enum GRID_ITEM_LAYOUT_UNSPECIFIED = 0; - */ - const GRID_ITEM_LAYOUT_UNSPECIFIED = 0; - /** - * The title and subtitle are shown below the grid item's image. - * - * Generated from protobuf enum TEXT_BELOW = 1; - */ - const TEXT_BELOW = 1; - /** - * The title and subtitle are shown above the grid item's image. - * - * Generated from protobuf enum TEXT_ABOVE = 2; - */ - const TEXT_ABOVE = 2; - - private static $valueToName = [ - self::GRID_ITEM_LAYOUT_UNSPECIFIED => 'GRID_ITEM_LAYOUT_UNSPECIFIED', - self::TEXT_BELOW => 'TEXT_BELOW', - self::TEXT_ABOVE => 'TEXT_ABOVE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(GridItemLayout::class, \Google\Apps\Card\V1\Grid_GridItem_GridItemLayout::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Icon.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Icon.php deleted file mode 100644 index e3ef2178b1cb..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Icon.php +++ /dev/null @@ -1,318 +0,0 @@ -google.apps.card.v1.Icon - */ -class Icon extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A description of the icon used for accessibility. - * If unspecified, the default value `Button` is provided. As a best practice, - * you should set a helpful description for what the icon displays, and if - * applicable, what it does. For example, `A user's account portrait`, or - * `Opens a new browser tab and navigates to the Google Chat developer - * documentation at https://developers.google.com/workspace/chat`. - * If the icon is set in a [`Button`][google.apps.card.v1.Button], the - * `altText` appears as helper text when the user hovers over the button. - * However, if the button also sets `text`, the icon's `altText` is ignored. - * - * Generated from protobuf field string alt_text = 3; - */ - protected $alt_text = ''; - /** - * The crop style applied to the image. In some cases, applying a - * `CIRCLE` crop causes the image to be drawn larger than a built-in - * icon. - * - * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 4; - */ - protected $image_type = 0; - protected $icons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $known_icon - * Display one of the built-in icons provided by Google Workspace. - * For example, to display an airplane icon, specify `AIRPLANE`. - * For a bus, specify `BUS`. - * For a full list of supported icons, see [built-in - * icons](https://developers.google.com/workspace/chat/format-messages#builtinicons). - * @type string $icon_url - * Display a custom icon hosted at an HTTPS URL. - * For example: - * ``` - * "iconUrl": - * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png" - * ``` - * Supported file types include `.png` and `.jpg`. - * @type \Google\Apps\Card\V1\MaterialIcon $material_icon - * Display one of the [Google Material - * Icons](https://fonts.google.com/icons). - * For example, to display a [checkbox - * icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), - * use - * ``` - * "material_icon": { - * "name": "check_box" - * } - * ``` - * [Google Chat apps](https://developers.google.com/workspace/chat): - * @type string $alt_text - * Optional. A description of the icon used for accessibility. - * If unspecified, the default value `Button` is provided. As a best practice, - * you should set a helpful description for what the icon displays, and if - * applicable, what it does. For example, `A user's account portrait`, or - * `Opens a new browser tab and navigates to the Google Chat developer - * documentation at https://developers.google.com/workspace/chat`. - * If the icon is set in a [`Button`][google.apps.card.v1.Button], the - * `altText` appears as helper text when the user hovers over the button. - * However, if the button also sets `text`, the icon's `altText` is ignored. - * @type int $image_type - * The crop style applied to the image. In some cases, applying a - * `CIRCLE` crop causes the image to be drawn larger than a built-in - * icon. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * Display one of the built-in icons provided by Google Workspace. - * For example, to display an airplane icon, specify `AIRPLANE`. - * For a bus, specify `BUS`. - * For a full list of supported icons, see [built-in - * icons](https://developers.google.com/workspace/chat/format-messages#builtinicons). - * - * Generated from protobuf field string known_icon = 1; - * @return string - */ - public function getKnownIcon() - { - return $this->readOneof(1); - } - - public function hasKnownIcon() - { - return $this->hasOneof(1); - } - - /** - * Display one of the built-in icons provided by Google Workspace. - * For example, to display an airplane icon, specify `AIRPLANE`. - * For a bus, specify `BUS`. - * For a full list of supported icons, see [built-in - * icons](https://developers.google.com/workspace/chat/format-messages#builtinicons). - * - * Generated from protobuf field string known_icon = 1; - * @param string $var - * @return $this - */ - public function setKnownIcon($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Display a custom icon hosted at an HTTPS URL. - * For example: - * ``` - * "iconUrl": - * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png" - * ``` - * Supported file types include `.png` and `.jpg`. - * - * Generated from protobuf field string icon_url = 2; - * @return string - */ - public function getIconUrl() - { - return $this->readOneof(2); - } - - public function hasIconUrl() - { - return $this->hasOneof(2); - } - - /** - * Display a custom icon hosted at an HTTPS URL. - * For example: - * ``` - * "iconUrl": - * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png" - * ``` - * Supported file types include `.png` and `.jpg`. - * - * Generated from protobuf field string icon_url = 2; - * @param string $var - * @return $this - */ - public function setIconUrl($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Display one of the [Google Material - * Icons](https://fonts.google.com/icons). - * For example, to display a [checkbox - * icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), - * use - * ``` - * "material_icon": { - * "name": "check_box" - * } - * ``` - * [Google Chat apps](https://developers.google.com/workspace/chat): - * - * Generated from protobuf field .google.apps.card.v1.MaterialIcon material_icon = 5; - * @return \Google\Apps\Card\V1\MaterialIcon|null - */ - public function getMaterialIcon() - { - return $this->readOneof(5); - } - - public function hasMaterialIcon() - { - return $this->hasOneof(5); - } - - /** - * Display one of the [Google Material - * Icons](https://fonts.google.com/icons). - * For example, to display a [checkbox - * icon](https://fonts.google.com/icons?selected=Material%20Symbols%20Outlined%3Acheck_box%3AFILL%400%3Bwght%40400%3BGRAD%400%3Bopsz%4048), - * use - * ``` - * "material_icon": { - * "name": "check_box" - * } - * ``` - * [Google Chat apps](https://developers.google.com/workspace/chat): - * - * Generated from protobuf field .google.apps.card.v1.MaterialIcon material_icon = 5; - * @param \Google\Apps\Card\V1\MaterialIcon $var - * @return $this - */ - public function setMaterialIcon($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\MaterialIcon::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Optional. A description of the icon used for accessibility. - * If unspecified, the default value `Button` is provided. As a best practice, - * you should set a helpful description for what the icon displays, and if - * applicable, what it does. For example, `A user's account portrait`, or - * `Opens a new browser tab and navigates to the Google Chat developer - * documentation at https://developers.google.com/workspace/chat`. - * If the icon is set in a [`Button`][google.apps.card.v1.Button], the - * `altText` appears as helper text when the user hovers over the button. - * However, if the button also sets `text`, the icon's `altText` is ignored. - * - * Generated from protobuf field string alt_text = 3; - * @return string - */ - public function getAltText() - { - return $this->alt_text; - } - - /** - * Optional. A description of the icon used for accessibility. - * If unspecified, the default value `Button` is provided. As a best practice, - * you should set a helpful description for what the icon displays, and if - * applicable, what it does. For example, `A user's account portrait`, or - * `Opens a new browser tab and navigates to the Google Chat developer - * documentation at https://developers.google.com/workspace/chat`. - * If the icon is set in a [`Button`][google.apps.card.v1.Button], the - * `altText` appears as helper text when the user hovers over the button. - * However, if the button also sets `text`, the icon's `altText` is ignored. - * - * Generated from protobuf field string alt_text = 3; - * @param string $var - * @return $this - */ - public function setAltText($var) - { - GPBUtil::checkString($var, True); - $this->alt_text = $var; - - return $this; - } - - /** - * The crop style applied to the image. In some cases, applying a - * `CIRCLE` crop causes the image to be drawn larger than a built-in - * icon. - * - * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 4; - * @return int - */ - public function getImageType() - { - return $this->image_type; - } - - /** - * The crop style applied to the image. In some cases, applying a - * `CIRCLE` crop causes the image to be drawn larger than a built-in - * icon. - * - * Generated from protobuf field .google.apps.card.v1.Widget.ImageType image_type = 4; - * @param int $var - * @return $this - */ - public function setImageType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\ImageType::class); - $this->image_type = $var; - - return $this; - } - - /** - * @return string - */ - public function getIcons() - { - return $this->whichOneof("icons"); - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Image.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Image.php deleted file mode 100644 index 9cd6c58f1608..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Image.php +++ /dev/null @@ -1,165 +0,0 @@ -google.apps.card.v1.Image - */ -class Image extends \Google\Protobuf\Internal\Message -{ - /** - * The HTTPS URL that hosts the image. - * For example: - * ``` - * https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png - * ``` - * - * Generated from protobuf field string image_url = 1; - */ - protected $image_url = ''; - /** - * When a user clicks the image, the click triggers this action. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; - */ - protected $on_click = null; - /** - * The alternative text of this image that's used for accessibility. - * - * Generated from protobuf field string alt_text = 3; - */ - protected $alt_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_url - * The HTTPS URL that hosts the image. - * For example: - * ``` - * https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png - * ``` - * @type \Google\Apps\Card\V1\OnClick $on_click - * When a user clicks the image, the click triggers this action. - * @type string $alt_text - * The alternative text of this image that's used for accessibility. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The HTTPS URL that hosts the image. - * For example: - * ``` - * https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png - * ``` - * - * Generated from protobuf field string image_url = 1; - * @return string - */ - public function getImageUrl() - { - return $this->image_url; - } - - /** - * The HTTPS URL that hosts the image. - * For example: - * ``` - * https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png - * ``` - * - * Generated from protobuf field string image_url = 1; - * @param string $var - * @return $this - */ - public function setImageUrl($var) - { - GPBUtil::checkString($var, True); - $this->image_url = $var; - - return $this; - } - - /** - * When a user clicks the image, the click triggers this action. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; - * @return \Google\Apps\Card\V1\OnClick|null - */ - public function getOnClick() - { - return $this->on_click; - } - - public function hasOnClick() - { - return isset($this->on_click); - } - - public function clearOnClick() - { - unset($this->on_click); - } - - /** - * When a user clicks the image, the click triggers this action. - * - * Generated from protobuf field .google.apps.card.v1.OnClick on_click = 2; - * @param \Google\Apps\Card\V1\OnClick $var - * @return $this - */ - public function setOnClick($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OnClick::class); - $this->on_click = $var; - - return $this; - } - - /** - * The alternative text of this image that's used for accessibility. - * - * Generated from protobuf field string alt_text = 3; - * @return string - */ - public function getAltText() - { - return $this->alt_text; - } - - /** - * The alternative text of this image that's used for accessibility. - * - * Generated from protobuf field string alt_text = 3; - * @param string $var - * @return $this - */ - public function setAltText($var) - { - GPBUtil::checkString($var, True); - $this->alt_text = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageComponent.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageComponent.php deleted file mode 100644 index b0b07608f838..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageComponent.php +++ /dev/null @@ -1,191 +0,0 @@ -google.apps.card.v1.ImageComponent - */ -class ImageComponent extends \Google\Protobuf\Internal\Message -{ - /** - * The image URL. - * - * Generated from protobuf field string image_uri = 1; - */ - protected $image_uri = ''; - /** - * The accessibility label for the image. - * - * Generated from protobuf field string alt_text = 2; - */ - protected $alt_text = ''; - /** - * The crop style to apply to the image. - * - * Generated from protobuf field .google.apps.card.v1.ImageCropStyle crop_style = 3; - */ - protected $crop_style = null; - /** - * The border style to apply to the image. - * - * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 4; - */ - protected $border_style = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_uri - * The image URL. - * @type string $alt_text - * The accessibility label for the image. - * @type \Google\Apps\Card\V1\ImageCropStyle $crop_style - * The crop style to apply to the image. - * @type \Google\Apps\Card\V1\BorderStyle $border_style - * The border style to apply to the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The image URL. - * - * Generated from protobuf field string image_uri = 1; - * @return string - */ - public function getImageUri() - { - return $this->image_uri; - } - - /** - * The image URL. - * - * Generated from protobuf field string image_uri = 1; - * @param string $var - * @return $this - */ - public function setImageUri($var) - { - GPBUtil::checkString($var, True); - $this->image_uri = $var; - - return $this; - } - - /** - * The accessibility label for the image. - * - * Generated from protobuf field string alt_text = 2; - * @return string - */ - public function getAltText() - { - return $this->alt_text; - } - - /** - * The accessibility label for the image. - * - * Generated from protobuf field string alt_text = 2; - * @param string $var - * @return $this - */ - public function setAltText($var) - { - GPBUtil::checkString($var, True); - $this->alt_text = $var; - - return $this; - } - - /** - * The crop style to apply to the image. - * - * Generated from protobuf field .google.apps.card.v1.ImageCropStyle crop_style = 3; - * @return \Google\Apps\Card\V1\ImageCropStyle|null - */ - public function getCropStyle() - { - return $this->crop_style; - } - - public function hasCropStyle() - { - return isset($this->crop_style); - } - - public function clearCropStyle() - { - unset($this->crop_style); - } - - /** - * The crop style to apply to the image. - * - * Generated from protobuf field .google.apps.card.v1.ImageCropStyle crop_style = 3; - * @param \Google\Apps\Card\V1\ImageCropStyle $var - * @return $this - */ - public function setCropStyle($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ImageCropStyle::class); - $this->crop_style = $var; - - return $this; - } - - /** - * The border style to apply to the image. - * - * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 4; - * @return \Google\Apps\Card\V1\BorderStyle|null - */ - public function getBorderStyle() - { - return $this->border_style; - } - - public function hasBorderStyle() - { - return isset($this->border_style); - } - - public function clearBorderStyle() - { - unset($this->border_style); - } - - /** - * The border style to apply to the image. - * - * Generated from protobuf field .google.apps.card.v1.BorderStyle border_style = 4; - * @param \Google\Apps\Card\V1\BorderStyle $var - * @return $this - */ - public function setBorderStyle($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\BorderStyle::class); - $this->border_style = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle.php deleted file mode 100644 index eb70bd52adf0..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle.php +++ /dev/null @@ -1,138 +0,0 @@ -google.apps.card.v1.ImageCropStyle - */ -class ImageCropStyle extends \Google\Protobuf\Internal\Message -{ - /** - * The crop type. - * - * Generated from protobuf field .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1; - */ - protected $type = 0; - /** - * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. - * For example, here's how to apply a 16:9 aspect ratio: - * ``` - * cropStyle { - * "type": "RECTANGLE_CUSTOM", - * "aspectRatio": 16/9 - * } - * ``` - * - * Generated from protobuf field double aspect_ratio = 2; - */ - protected $aspect_ratio = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The crop type. - * @type float $aspect_ratio - * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. - * For example, here's how to apply a 16:9 aspect ratio: - * ``` - * cropStyle { - * "type": "RECTANGLE_CUSTOM", - * "aspectRatio": 16/9 - * } - * ``` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The crop type. - * - * Generated from protobuf field .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The crop type. - * - * Generated from protobuf field .google.apps.card.v1.ImageCropStyle.ImageCropType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\ImageCropStyle\ImageCropType::class); - $this->type = $var; - - return $this; - } - - /** - * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. - * For example, here's how to apply a 16:9 aspect ratio: - * ``` - * cropStyle { - * "type": "RECTANGLE_CUSTOM", - * "aspectRatio": 16/9 - * } - * ``` - * - * Generated from protobuf field double aspect_ratio = 2; - * @return float - */ - public function getAspectRatio() - { - return $this->aspect_ratio; - } - - /** - * The aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`. - * For example, here's how to apply a 16:9 aspect ratio: - * ``` - * cropStyle { - * "type": "RECTANGLE_CUSTOM", - * "aspectRatio": 16/9 - * } - * ``` - * - * Generated from protobuf field double aspect_ratio = 2; - * @param float $var - * @return $this - */ - public function setAspectRatio($var) - { - GPBUtil::checkDouble($var); - $this->aspect_ratio = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle/ImageCropType.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle/ImageCropType.php deleted file mode 100644 index 2f8d14d52fba..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/ImageCropStyle/ImageCropType.php +++ /dev/null @@ -1,81 +0,0 @@ -google.apps.card.v1.ImageCropStyle.ImageCropType - */ -class ImageCropType -{ - /** - * Don't use. Unspecified. - * - * Generated from protobuf enum IMAGE_CROP_TYPE_UNSPECIFIED = 0; - */ - const IMAGE_CROP_TYPE_UNSPECIFIED = 0; - /** - * Default value. Applies a square crop. - * - * Generated from protobuf enum SQUARE = 1; - */ - const SQUARE = 1; - /** - * Applies a circular crop. - * - * Generated from protobuf enum CIRCLE = 2; - */ - const CIRCLE = 2; - /** - * Applies a rectangular crop with a custom aspect ratio. Set the custom - * aspect ratio with `aspectRatio`. - * - * Generated from protobuf enum RECTANGLE_CUSTOM = 3; - */ - const RECTANGLE_CUSTOM = 3; - /** - * Applies a rectangular crop with a 4:3 aspect ratio. - * - * Generated from protobuf enum RECTANGLE_4_3 = 4; - */ - const RECTANGLE_4_3 = 4; - - private static $valueToName = [ - self::IMAGE_CROP_TYPE_UNSPECIFIED => 'IMAGE_CROP_TYPE_UNSPECIFIED', - self::SQUARE => 'SQUARE', - self::CIRCLE => 'CIRCLE', - self::RECTANGLE_CUSTOM => 'RECTANGLE_CUSTOM', - self::RECTANGLE_4_3 => 'RECTANGLE_4_3', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ImageCropType::class, \Google\Apps\Card\V1\ImageCropStyle_ImageCropType::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/MaterialIcon.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/MaterialIcon.php deleted file mode 100644 index f37b5ed6e401..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/MaterialIcon.php +++ /dev/null @@ -1,250 +0,0 @@ -google.apps.card.v1.MaterialIcon - */ -class MaterialIcon extends \Google\Protobuf\Internal\Message -{ - /** - * The icon name defined in the [Google Material - * Icon](https://fonts.google.com/icons), for example, `check_box`. Any - * invalid names are abandoned and replaced with empty string and - * results in the icon failing to render. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Whether the icon renders as filled. Default value is false. - * To preview different icon settings, go to - * [Google Font Icons](https://fonts.google.com/icons) and adjust the - * settings under **Customize**. - * - * Generated from protobuf field bool fill = 2; - */ - protected $fill = false; - /** - * The stroke weight of the icon. Choose from {100, 200, 300, 400, - * 500, 600, 700}. If absent, default value is 400. If any other value is - * specified, the default value is used. - * To preview different icon settings, go to - * [Google Font Icons](https://fonts.google.com/icons) and adjust the - * settings under **Customize**. - * - * Generated from protobuf field int32 weight = 3; - */ - protected $weight = 0; - /** - * Weight and grade affect a symbol’s thickness. Adjustments to grade are more - * granular than adjustments to weight and have a small impact on the size of - * the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If - * any other value is specified, the default value is used. - * To preview different icon settings, go to - * [Google Font Icons](https://fonts.google.com/icons) and adjust the - * settings under **Customize**. - * - * Generated from protobuf field int32 grade = 4; - */ - protected $grade = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The icon name defined in the [Google Material - * Icon](https://fonts.google.com/icons), for example, `check_box`. Any - * invalid names are abandoned and replaced with empty string and - * results in the icon failing to render. - * @type bool $fill - * Whether the icon renders as filled. Default value is false. - * To preview different icon settings, go to - * [Google Font Icons](https://fonts.google.com/icons) and adjust the - * settings under **Customize**. - * @type int $weight - * The stroke weight of the icon. Choose from {100, 200, 300, 400, - * 500, 600, 700}. If absent, default value is 400. If any other value is - * specified, the default value is used. - * To preview different icon settings, go to - * [Google Font Icons](https://fonts.google.com/icons) and adjust the - * settings under **Customize**. - * @type int $grade - * Weight and grade affect a symbol’s thickness. Adjustments to grade are more - * granular than adjustments to weight and have a small impact on the size of - * the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If - * any other value is specified, the default value is used. - * To preview different icon settings, go to - * [Google Font Icons](https://fonts.google.com/icons) and adjust the - * settings under **Customize**. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The icon name defined in the [Google Material - * Icon](https://fonts.google.com/icons), for example, `check_box`. Any - * invalid names are abandoned and replaced with empty string and - * results in the icon failing to render. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The icon name defined in the [Google Material - * Icon](https://fonts.google.com/icons), for example, `check_box`. Any - * invalid names are abandoned and replaced with empty string and - * results in the icon failing to render. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Whether the icon renders as filled. Default value is false. - * To preview different icon settings, go to - * [Google Font Icons](https://fonts.google.com/icons) and adjust the - * settings under **Customize**. - * - * Generated from protobuf field bool fill = 2; - * @return bool - */ - public function getFill() - { - return $this->fill; - } - - /** - * Whether the icon renders as filled. Default value is false. - * To preview different icon settings, go to - * [Google Font Icons](https://fonts.google.com/icons) and adjust the - * settings under **Customize**. - * - * Generated from protobuf field bool fill = 2; - * @param bool $var - * @return $this - */ - public function setFill($var) - { - GPBUtil::checkBool($var); - $this->fill = $var; - - return $this; - } - - /** - * The stroke weight of the icon. Choose from {100, 200, 300, 400, - * 500, 600, 700}. If absent, default value is 400. If any other value is - * specified, the default value is used. - * To preview different icon settings, go to - * [Google Font Icons](https://fonts.google.com/icons) and adjust the - * settings under **Customize**. - * - * Generated from protobuf field int32 weight = 3; - * @return int - */ - public function getWeight() - { - return $this->weight; - } - - /** - * The stroke weight of the icon. Choose from {100, 200, 300, 400, - * 500, 600, 700}. If absent, default value is 400. If any other value is - * specified, the default value is used. - * To preview different icon settings, go to - * [Google Font Icons](https://fonts.google.com/icons) and adjust the - * settings under **Customize**. - * - * Generated from protobuf field int32 weight = 3; - * @param int $var - * @return $this - */ - public function setWeight($var) - { - GPBUtil::checkInt32($var); - $this->weight = $var; - - return $this; - } - - /** - * Weight and grade affect a symbol’s thickness. Adjustments to grade are more - * granular than adjustments to weight and have a small impact on the size of - * the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If - * any other value is specified, the default value is used. - * To preview different icon settings, go to - * [Google Font Icons](https://fonts.google.com/icons) and adjust the - * settings under **Customize**. - * - * Generated from protobuf field int32 grade = 4; - * @return int - */ - public function getGrade() - { - return $this->grade; - } - - /** - * Weight and grade affect a symbol’s thickness. Adjustments to grade are more - * granular than adjustments to weight and have a small impact on the size of - * the symbol. Choose from {-25, 0, 200}. If absent, default value is 0. If - * any other value is specified, the default value is used. - * To preview different icon settings, go to - * [Google Font Icons](https://fonts.google.com/icons) and adjust the - * settings under **Customize**. - * - * Generated from protobuf field int32 grade = 4; - * @param int $var - * @return $this - */ - public function setGrade($var) - { - GPBUtil::checkInt32($var); - $this->grade = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OnClick.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OnClick.php deleted file mode 100644 index 7fe0139a6eda..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OnClick.php +++ /dev/null @@ -1,198 +0,0 @@ -google.apps.card.v1.OnClick - */ -class OnClick extends \Google\Protobuf\Internal\Message -{ - protected $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Card\V1\Action $action - * If specified, an action is triggered by this `onClick`. - * @type \Google\Apps\Card\V1\OpenLink $open_link - * If specified, this `onClick` triggers an open link action. - * @type \Google\Apps\Card\V1\Action $open_dynamic_link_action - * An add-on triggers this action when the action needs to open a - * link. This differs from the `open_link` above in that this needs to talk - * to server to get the link. Thus some preparation work is required for - * web client to do before the open link action response comes back. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * @type \Google\Apps\Card\V1\Card $card - * A new card is pushed to the card stack after clicking if specified. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * If specified, an action is triggered by this `onClick`. - * - * Generated from protobuf field .google.apps.card.v1.Action action = 1; - * @return \Google\Apps\Card\V1\Action|null - */ - public function getAction() - { - return $this->readOneof(1); - } - - public function hasAction() - { - return $this->hasOneof(1); - } - - /** - * If specified, an action is triggered by this `onClick`. - * - * Generated from protobuf field .google.apps.card.v1.Action action = 1; - * @param \Google\Apps\Card\V1\Action $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * If specified, this `onClick` triggers an open link action. - * - * Generated from protobuf field .google.apps.card.v1.OpenLink open_link = 2; - * @return \Google\Apps\Card\V1\OpenLink|null - */ - public function getOpenLink() - { - return $this->readOneof(2); - } - - public function hasOpenLink() - { - return $this->hasOneof(2); - } - - /** - * If specified, this `onClick` triggers an open link action. - * - * Generated from protobuf field .google.apps.card.v1.OpenLink open_link = 2; - * @param \Google\Apps\Card\V1\OpenLink $var - * @return $this - */ - public function setOpenLink($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\OpenLink::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * An add-on triggers this action when the action needs to open a - * link. This differs from the `open_link` above in that this needs to talk - * to server to get the link. Thus some preparation work is required for - * web client to do before the open link action response comes back. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Action open_dynamic_link_action = 3; - * @return \Google\Apps\Card\V1\Action|null - */ - public function getOpenDynamicLinkAction() - { - return $this->readOneof(3); - } - - public function hasOpenDynamicLinkAction() - { - return $this->hasOneof(3); - } - - /** - * An add-on triggers this action when the action needs to open a - * link. This differs from the `open_link` above in that this needs to talk - * to server to get the link. Thus some preparation work is required for - * web client to do before the open link action response comes back. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Action open_dynamic_link_action = 3; - * @param \Google\Apps\Card\V1\Action $var - * @return $this - */ - public function setOpenDynamicLinkAction($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A new card is pushed to the card stack after clicking if specified. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Card card = 4; - * @return \Google\Apps\Card\V1\Card|null - */ - public function getCard() - { - return $this->readOneof(4); - } - - public function hasCard() - { - return $this->hasOneof(4); - } - - /** - * A new card is pushed to the card stack after clicking if specified. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Card card = 4; - * @param \Google\Apps\Card\V1\Card $var - * @return $this - */ - public function setCard($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink.php deleted file mode 100644 index f401cd8d1c40..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink.php +++ /dev/null @@ -1,157 +0,0 @@ -google.apps.card.v1.OpenLink - */ -class OpenLink extends \Google\Protobuf\Internal\Message -{ - /** - * The URL to open. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - /** - * How to open a link. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.OpenLink.OpenAs open_as = 2; - */ - protected $open_as = 0; - /** - * Whether the client forgets about a link after opening it, or observes it - * until the window closes. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.OpenLink.OnClose on_close = 3; - */ - protected $on_close = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * The URL to open. - * @type int $open_as - * How to open a link. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * @type int $on_close - * Whether the client forgets about a link after opening it, or observes it - * until the window closes. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The URL to open. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The URL to open. - * - * Generated from protobuf field string url = 1; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * How to open a link. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.OpenLink.OpenAs open_as = 2; - * @return int - */ - public function getOpenAs() - { - return $this->open_as; - } - - /** - * How to open a link. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.OpenLink.OpenAs open_as = 2; - * @param int $var - * @return $this - */ - public function setOpenAs($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\OpenLink\OpenAs::class); - $this->open_as = $var; - - return $this; - } - - /** - * Whether the client forgets about a link after opening it, or observes it - * until the window closes. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.OpenLink.OnClose on_close = 3; - * @return int - */ - public function getOnClose() - { - return $this->on_close; - } - - /** - * Whether the client forgets about a link after opening it, or observes it - * until the window closes. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.OpenLink.OnClose on_close = 3; - * @param int $var - * @return $this - */ - public function setOnClose($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\OpenLink\OnClose::class); - $this->on_close = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OnClose.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OnClose.php deleted file mode 100644 index 59451bd34764..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OnClose.php +++ /dev/null @@ -1,67 +0,0 @@ -google.apps.card.v1.OpenLink.OnClose - */ -class OnClose -{ - /** - * Default value. The card doesn't reload; nothing happens. - * - * Generated from protobuf enum NOTHING = 0; - */ - const NOTHING = 0; - /** - * Reloads the card after the child window closes. - * If used in conjunction with - * [`OpenAs.OVERLAY`](https://developers.google.com/workspace/add-ons/reference/rpc/google.apps.card.v1#openas), - * the child window acts as a modal dialog and the parent card is blocked - * until the child window closes. - * - * Generated from protobuf enum RELOAD = 1; - */ - const RELOAD = 1; - - private static $valueToName = [ - self::NOTHING => 'NOTHING', - self::RELOAD => 'RELOAD', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OnClose::class, \Google\Apps\Card\V1\OpenLink_OnClose::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OpenAs.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OpenAs.php deleted file mode 100644 index 766a2b61633d..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/OpenLink/OpenAs.php +++ /dev/null @@ -1,64 +0,0 @@ -google.apps.card.v1.OpenLink.OpenAs - */ -class OpenAs -{ - /** - * The link opens as a full-size window (if that's the frame used by the - * client). - * - * Generated from protobuf enum FULL_SIZE = 0; - */ - const FULL_SIZE = 0; - /** - * The link opens as an overlay, such as a pop-up. - * - * Generated from protobuf enum OVERLAY = 1; - */ - const OVERLAY = 1; - - private static $valueToName = [ - self::FULL_SIZE => 'FULL_SIZE', - self::OVERLAY => 'OVERLAY', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OpenAs::class, \Google\Apps\Card\V1\OpenLink_OpenAs::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput.php deleted file mode 100644 index 8ae42a18e5d9..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput.php +++ /dev/null @@ -1,439 +0,0 @@ -google.apps.card.v1.SelectionInput - */ -class SelectionInput extends \Google\Protobuf\Internal\Message -{ - /** - * The name that identifies the selection input in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The text that appears above the selection input field in the user - * interface. - * Specify text that helps the user enter the information your app needs. - * For example, if users are selecting the urgency of a work ticket from a - * drop-down menu, the label might be "Urgency" or "Select urgency". - * - * Generated from protobuf field string label = 2; - */ - protected $label = ''; - /** - * The type of items that are displayed to users in a `SelectionInput` widget. - * Selection types support different types of interactions. For example, users - * can select one or more checkboxes, but they can only select one value from - * a dropdown menu. - * - * Generated from protobuf field .google.apps.card.v1.SelectionInput.SelectionType type = 3; - */ - protected $type = 0; - /** - * An array of selectable items. For example, an array of radio buttons or - * checkboxes. Supports up to 100 items. - * - * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4; - */ - private $items; - /** - * If specified, the form is submitted when the selection changes. If not - * specified, you must specify a separate button that submits the form. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 5; - */ - protected $on_change_action = null; - /** - * For multiselect menus, the maximum number of items that a user can select. - * Minimum value is 1 item. If unspecified, defaults to 3 items. - * - * Generated from protobuf field int32 multi_select_max_selected_items = 6; - */ - protected $multi_select_max_selected_items = 0; - /** - * For multiselect menus, the number of text characters that a user inputs - * before the app queries autocomplete and displays suggested items - * in the menu. - * If unspecified, defaults to 0 characters for static data sources and 3 - * characters for external data sources. - * - * Generated from protobuf field int32 multi_select_min_query_length = 7; - */ - protected $multi_select_min_query_length = 0; - protected $multi_select_data_source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name that identifies the selection input in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * @type string $label - * The text that appears above the selection input field in the user - * interface. - * Specify text that helps the user enter the information your app needs. - * For example, if users are selecting the urgency of a work ticket from a - * drop-down menu, the label might be "Urgency" or "Select urgency". - * @type int $type - * The type of items that are displayed to users in a `SelectionInput` widget. - * Selection types support different types of interactions. For example, users - * can select one or more checkboxes, but they can only select one value from - * a dropdown menu. - * @type array<\Google\Apps\Card\V1\SelectionInput\SelectionItem>|\Google\Protobuf\Internal\RepeatedField $items - * An array of selectable items. For example, an array of radio buttons or - * checkboxes. Supports up to 100 items. - * @type \Google\Apps\Card\V1\Action $on_change_action - * If specified, the form is submitted when the selection changes. If not - * specified, you must specify a separate button that submits the form. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * @type int $multi_select_max_selected_items - * For multiselect menus, the maximum number of items that a user can select. - * Minimum value is 1 item. If unspecified, defaults to 3 items. - * @type int $multi_select_min_query_length - * For multiselect menus, the number of text characters that a user inputs - * before the app queries autocomplete and displays suggested items - * in the menu. - * If unspecified, defaults to 0 characters for static data sources and 3 - * characters for external data sources. - * @type \Google\Apps\Card\V1\Action $external_data_source - * An external data source, such as a relational data base. - * @type \Google\Apps\Card\V1\SelectionInput\PlatformDataSource $platform_data_source - * A data source from Google Workspace. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The name that identifies the selection input in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name that identifies the selection input in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The text that appears above the selection input field in the user - * interface. - * Specify text that helps the user enter the information your app needs. - * For example, if users are selecting the urgency of a work ticket from a - * drop-down menu, the label might be "Urgency" or "Select urgency". - * - * Generated from protobuf field string label = 2; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * The text that appears above the selection input field in the user - * interface. - * Specify text that helps the user enter the information your app needs. - * For example, if users are selecting the urgency of a work ticket from a - * drop-down menu, the label might be "Urgency" or "Select urgency". - * - * Generated from protobuf field string label = 2; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * The type of items that are displayed to users in a `SelectionInput` widget. - * Selection types support different types of interactions. For example, users - * can select one or more checkboxes, but they can only select one value from - * a dropdown menu. - * - * Generated from protobuf field .google.apps.card.v1.SelectionInput.SelectionType type = 3; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of items that are displayed to users in a `SelectionInput` widget. - * Selection types support different types of interactions. For example, users - * can select one or more checkboxes, but they can only select one value from - * a dropdown menu. - * - * Generated from protobuf field .google.apps.card.v1.SelectionInput.SelectionType type = 3; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\SelectionInput\SelectionType::class); - $this->type = $var; - - return $this; - } - - /** - * An array of selectable items. For example, an array of radio buttons or - * checkboxes. Supports up to 100 items. - * - * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * An array of selectable items. For example, an array of radio buttons or - * checkboxes. Supports up to 100 items. - * - * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 4; - * @param array<\Google\Apps\Card\V1\SelectionInput\SelectionItem>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\SelectionInput\SelectionItem::class); - $this->items = $arr; - - return $this; - } - - /** - * If specified, the form is submitted when the selection changes. If not - * specified, you must specify a separate button that submits the form. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 5; - * @return \Google\Apps\Card\V1\Action|null - */ - public function getOnChangeAction() - { - return $this->on_change_action; - } - - public function hasOnChangeAction() - { - return isset($this->on_change_action); - } - - public function clearOnChangeAction() - { - unset($this->on_change_action); - } - - /** - * If specified, the form is submitted when the selection changes. If not - * specified, you must specify a separate button that submits the form. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 5; - * @param \Google\Apps\Card\V1\Action $var - * @return $this - */ - public function setOnChangeAction($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); - $this->on_change_action = $var; - - return $this; - } - - /** - * For multiselect menus, the maximum number of items that a user can select. - * Minimum value is 1 item. If unspecified, defaults to 3 items. - * - * Generated from protobuf field int32 multi_select_max_selected_items = 6; - * @return int - */ - public function getMultiSelectMaxSelectedItems() - { - return $this->multi_select_max_selected_items; - } - - /** - * For multiselect menus, the maximum number of items that a user can select. - * Minimum value is 1 item. If unspecified, defaults to 3 items. - * - * Generated from protobuf field int32 multi_select_max_selected_items = 6; - * @param int $var - * @return $this - */ - public function setMultiSelectMaxSelectedItems($var) - { - GPBUtil::checkInt32($var); - $this->multi_select_max_selected_items = $var; - - return $this; - } - - /** - * For multiselect menus, the number of text characters that a user inputs - * before the app queries autocomplete and displays suggested items - * in the menu. - * If unspecified, defaults to 0 characters for static data sources and 3 - * characters for external data sources. - * - * Generated from protobuf field int32 multi_select_min_query_length = 7; - * @return int - */ - public function getMultiSelectMinQueryLength() - { - return $this->multi_select_min_query_length; - } - - /** - * For multiselect menus, the number of text characters that a user inputs - * before the app queries autocomplete and displays suggested items - * in the menu. - * If unspecified, defaults to 0 characters for static data sources and 3 - * characters for external data sources. - * - * Generated from protobuf field int32 multi_select_min_query_length = 7; - * @param int $var - * @return $this - */ - public function setMultiSelectMinQueryLength($var) - { - GPBUtil::checkInt32($var); - $this->multi_select_min_query_length = $var; - - return $this; - } - - /** - * An external data source, such as a relational data base. - * - * Generated from protobuf field .google.apps.card.v1.Action external_data_source = 8; - * @return \Google\Apps\Card\V1\Action|null - */ - public function getExternalDataSource() - { - return $this->readOneof(8); - } - - public function hasExternalDataSource() - { - return $this->hasOneof(8); - } - - /** - * An external data source, such as a relational data base. - * - * Generated from protobuf field .google.apps.card.v1.Action external_data_source = 8; - * @param \Google\Apps\Card\V1\Action $var - * @return $this - */ - public function setExternalDataSource($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); - $this->writeOneof(8, $var); - - return $this; - } - - /** - * A data source from Google Workspace. - * - * Generated from protobuf field .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9; - * @return \Google\Apps\Card\V1\SelectionInput\PlatformDataSource|null - */ - public function getPlatformDataSource() - { - return $this->readOneof(9); - } - - public function hasPlatformDataSource() - { - return $this->hasOneof(9); - } - - /** - * A data source from Google Workspace. - * - * Generated from protobuf field .google.apps.card.v1.SelectionInput.PlatformDataSource platform_data_source = 9; - * @param \Google\Apps\Card\V1\SelectionInput\PlatformDataSource $var - * @return $this - */ - public function setPlatformDataSource($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\SelectionInput\PlatformDataSource::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * @return string - */ - public function getMultiSelectDataSource() - { - return $this->whichOneof("multi_select_data_source"); - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource.php deleted file mode 100644 index 024e15ecdbc6..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource.php +++ /dev/null @@ -1,85 +0,0 @@ -google.apps.card.v1.SelectionInput.PlatformDataSource - */ -class PlatformDataSource extends \Google\Protobuf\Internal\Message -{ - protected $data_source; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $common_data_source - * A data source shared by all Google Workspace applications, such as - * users in a Google Workspace organization. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * A data source shared by all Google Workspace applications, such as - * users in a Google Workspace organization. - * - * Generated from protobuf field .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1; - * @return int - */ - public function getCommonDataSource() - { - return $this->readOneof(1); - } - - public function hasCommonDataSource() - { - return $this->hasOneof(1); - } - - /** - * A data source shared by all Google Workspace applications, such as - * users in a Google Workspace organization. - * - * Generated from protobuf field .google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource common_data_source = 1; - * @param int $var - * @return $this - */ - public function setCommonDataSource($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\SelectionInput\PlatformDataSource\CommonDataSource::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getDataSource() - { - return $this->whichOneof("data_source"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PlatformDataSource::class, \Google\Apps\Card\V1\SelectionInput_PlatformDataSource::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource/CommonDataSource.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource/CommonDataSource.php deleted file mode 100644 index 21ad04475763..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/PlatformDataSource/CommonDataSource.php +++ /dev/null @@ -1,61 +0,0 @@ -google.apps.card.v1.SelectionInput.PlatformDataSource.CommonDataSource - */ -class CommonDataSource -{ - /** - * Default value. Don't use. - * - * Generated from protobuf enum UNKNOWN = 0; - */ - const UNKNOWN = 0; - /** - * Google Workspace users. The user can only view and select users from - * their Google Workspace organization. - * - * Generated from protobuf enum USER = 1; - */ - const USER = 1; - - private static $valueToName = [ - self::UNKNOWN => 'UNKNOWN', - self::USER => 'USER', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CommonDataSource::class, \Google\Apps\Card\V1\SelectionInput_PlatformDataSource_CommonDataSource::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionItem.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionItem.php deleted file mode 100644 index fbbde773450d..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionItem.php +++ /dev/null @@ -1,245 +0,0 @@ -google.apps.card.v1.SelectionInput.SelectionItem - */ -class SelectionItem extends \Google\Protobuf\Internal\Message -{ - /** - * The text that identifies or describes the item to users. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - /** - * The value associated with this item. The client should use this as a form - * input value. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - /** - * Whether the item is selected by default. If the selection input only - * accepts one value (such as for radio buttons or a dropdown menu), only - * set this field for one item. - * - * Generated from protobuf field bool selected = 3; - */ - protected $selected = false; - /** - * For multiselect menus, the URL for the icon displayed next to - * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` - * URL. For example, - * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. - * - * Generated from protobuf field string start_icon_uri = 4; - */ - protected $start_icon_uri = ''; - /** - * For multiselect menus, a text description or label that's - * displayed below the item's `text` field. - * - * Generated from protobuf field string bottom_text = 5; - */ - protected $bottom_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * The text that identifies or describes the item to users. - * @type string $value - * The value associated with this item. The client should use this as a form - * input value. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * @type bool $selected - * Whether the item is selected by default. If the selection input only - * accepts one value (such as for radio buttons or a dropdown menu), only - * set this field for one item. - * @type string $start_icon_uri - * For multiselect menus, the URL for the icon displayed next to - * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` - * URL. For example, - * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. - * @type string $bottom_text - * For multiselect menus, a text description or label that's - * displayed below the item's `text` field. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The text that identifies or describes the item to users. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * The text that identifies or describes the item to users. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * The value associated with this item. The client should use this as a form - * input value. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value associated with this item. The client should use this as a form - * input value. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * Whether the item is selected by default. If the selection input only - * accepts one value (such as for radio buttons or a dropdown menu), only - * set this field for one item. - * - * Generated from protobuf field bool selected = 3; - * @return bool - */ - public function getSelected() - { - return $this->selected; - } - - /** - * Whether the item is selected by default. If the selection input only - * accepts one value (such as for radio buttons or a dropdown menu), only - * set this field for one item. - * - * Generated from protobuf field bool selected = 3; - * @param bool $var - * @return $this - */ - public function setSelected($var) - { - GPBUtil::checkBool($var); - $this->selected = $var; - - return $this; - } - - /** - * For multiselect menus, the URL for the icon displayed next to - * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` - * URL. For example, - * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. - * - * Generated from protobuf field string start_icon_uri = 4; - * @return string - */ - public function getStartIconUri() - { - return $this->start_icon_uri; - } - - /** - * For multiselect menus, the URL for the icon displayed next to - * the item's `text` field. Supports PNG and JPEG files. Must be an `HTTPS` - * URL. For example, - * `https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png`. - * - * Generated from protobuf field string start_icon_uri = 4; - * @param string $var - * @return $this - */ - public function setStartIconUri($var) - { - GPBUtil::checkString($var, True); - $this->start_icon_uri = $var; - - return $this; - } - - /** - * For multiselect menus, a text description or label that's - * displayed below the item's `text` field. - * - * Generated from protobuf field string bottom_text = 5; - * @return string - */ - public function getBottomText() - { - return $this->bottom_text; - } - - /** - * For multiselect menus, a text description or label that's - * displayed below the item's `text` field. - * - * Generated from protobuf field string bottom_text = 5; - * @param string $var - * @return $this - */ - public function setBottomText($var) - { - GPBUtil::checkString($var, True); - $this->bottom_text = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SelectionItem::class, \Google\Apps\Card\V1\SelectionInput_SelectionItem::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionType.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionType.php deleted file mode 100644 index 4bdaf77acf90..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/SelectionInput/SelectionType.php +++ /dev/null @@ -1,106 +0,0 @@ -google.apps.card.v1.SelectionInput.SelectionType - */ -class SelectionType -{ - /** - * A set of checkboxes. Users can select one or more checkboxes. - * - * Generated from protobuf enum CHECK_BOX = 0; - */ - const CHECK_BOX = 0; - /** - * A set of radio buttons. Users can select one radio button. - * - * Generated from protobuf enum RADIO_BUTTON = 1; - */ - const RADIO_BUTTON = 1; - /** - * A set of switches. Users can turn on one or more switches. - * - * Generated from protobuf enum SWITCH = 2; - */ - const PBSWITCH = 2; - /** - * A dropdown menu. Users can select one item from the menu. - * - * Generated from protobuf enum DROPDOWN = 3; - */ - const DROPDOWN = 3; - /** - * A multiselect menu for static or dynamic data. From the menu bar, - * users select one or more items. Users can also input values to populate - * dynamic data. For example, users can start typing the name of a Google - * Chat space and the widget autosuggests the space. - * To populate items for a multiselect menu, you can use one of the - * following types of data sources: - * * Static data: Items are specified as `SelectionItem` objects in the - * widget. Up to 100 items. - * * Google Workspace data: Items are populated using data from Google - * Workspace, such as Google Workspace users or Google Chat spaces. - * * External data: Items are populated from an external data - * source outside of Google Workspace. - * For examples of how to implement multiselect menus, see - * [Add a multiselect - * menu](https://developers.google.com/workspace/chat/design-interactive-card-dialog#multiselect-menu). - * [Google Workspace Add-ons and Chat - * apps](https://developers.google.com/workspace/extend): - * Multiselect for Google Workspace Add-ons are in - * Developer Preview. - * - * Generated from protobuf enum MULTI_SELECT = 4; - */ - const MULTI_SELECT = 4; - - private static $valueToName = [ - self::CHECK_BOX => 'CHECK_BOX', - self::RADIO_BUTTON => 'RADIO_BUTTON', - self::PBSWITCH => 'SWITCH', - self::DROPDOWN => 'DROPDOWN', - self::MULTI_SELECT => 'MULTI_SELECT', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SelectionType::class, \Google\Apps\Card\V1\SelectionInput_SelectionType::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions.php deleted file mode 100644 index 7efd8f319cfc..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions.php +++ /dev/null @@ -1,84 +0,0 @@ -google.apps.card.v1.Suggestions - */ -class Suggestions extends \Google\Protobuf\Internal\Message -{ - /** - * A list of suggestions used for autocomplete recommendations in text input - * fields. - * - * Generated from protobuf field repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1; - */ - private $items; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Card\V1\Suggestions\SuggestionItem>|\Google\Protobuf\Internal\RepeatedField $items - * A list of suggestions used for autocomplete recommendations in text input - * fields. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * A list of suggestions used for autocomplete recommendations in text input - * fields. - * - * Generated from protobuf field repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * A list of suggestions used for autocomplete recommendations in text input - * fields. - * - * Generated from protobuf field repeated .google.apps.card.v1.Suggestions.SuggestionItem items = 1; - * @param array<\Google\Apps\Card\V1\Suggestions\SuggestionItem>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\Suggestions\SuggestionItem::class); - $this->items = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions/SuggestionItem.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions/SuggestionItem.php deleted file mode 100644 index b984a0a486ef..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Suggestions/SuggestionItem.php +++ /dev/null @@ -1,83 +0,0 @@ -google.apps.card.v1.Suggestions.SuggestionItem - */ -class SuggestionItem extends \Google\Protobuf\Internal\Message -{ - protected $content; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * The value of a suggested input to a text input field. This is - * equivalent to what users enter themselves. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The value of a suggested input to a text input field. This is - * equivalent to what users enter themselves. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->readOneof(1); - } - - public function hasText() - { - return $this->hasOneof(1); - } - - /** - * The value of a suggested input to a text input field. This is - * equivalent to what users enter themselves. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getContent() - { - return $this->whichOneof("content"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SuggestionItem::class, \Google\Apps\Card\V1\Suggestions_SuggestionItem::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput.php deleted file mode 100644 index 60c7cfbed1c4..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput.php +++ /dev/null @@ -1,532 +0,0 @@ -google.apps.card.v1.TextInput - */ -class TextInput extends \Google\Protobuf\Internal\Message -{ - /** - * The name by which the text input is identified in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The text that appears above the text input field in the user interface. - * Specify text that helps the user enter the information your app needs. - * For example, if you are asking someone's name, but specifically need their - * surname, write `surname` instead of `name`. - * Required if `hintText` is unspecified. Otherwise, optional. - * - * Generated from protobuf field string label = 2; - */ - protected $label = ''; - /** - * Text that appears below the text input field meant to assist users by - * prompting them to enter a certain value. This text is always visible. - * Required if `label` is unspecified. Otherwise, optional. - * - * Generated from protobuf field string hint_text = 3; - */ - protected $hint_text = ''; - /** - * The value entered by a user, returned as part of a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string value = 4; - */ - protected $value = ''; - /** - * How a text input field appears in the user interface. - * For example, whether the field is single or multi-line. - * - * Generated from protobuf field .google.apps.card.v1.TextInput.Type type = 5; - */ - protected $type = 0; - /** - * What to do when a change occurs in the text input field. For example, a - * user adding to the field or deleting text. - * Examples of actions to take include running a custom function or opening - * a [dialog](https://developers.google.com/workspace/chat/dialogs) - * in Google Chat. - * - * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; - */ - protected $on_change_action = null; - /** - * Suggested values that users can enter. These values appear when users click - * inside the text input field. As users type, the suggested values - * dynamically filter to match what the users have typed. - * For example, a text input field for programming language might suggest - * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list - * of suggestions filters to show just `Java` and `JavaScript`. - * Suggested values help guide users to enter values that your app can make - * sense of. When referring to JavaScript, some users might enter `javascript` - * and others `java script`. Suggesting `JavaScript` can standardize how users - * interact with your app. - * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set - * to `MULTIPLE_LINE`. - * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): - * - * Generated from protobuf field .google.apps.card.v1.Suggestions initial_suggestions = 7; - */ - protected $initial_suggestions = null; - /** - * Optional. Specify what action to take when the text input field provides - * suggestions to users who interact with it. - * If unspecified, the suggestions are set by `initialSuggestions` and - * are processed by the client. - * If specified, the app takes the action specified here, such as running - * a custom function. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Action auto_complete_action = 8; - */ - protected $auto_complete_action = null; - /** - * Text that appears in the text input field when the field is empty. - * Use this text to prompt users to enter a value. For example, `Enter a - * number from 0 to 100`. - * [Google Chat apps](https://developers.google.com/workspace/chat): - * - * Generated from protobuf field string placeholder_text = 12; - */ - protected $placeholder_text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The name by which the text input is identified in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * @type string $label - * The text that appears above the text input field in the user interface. - * Specify text that helps the user enter the information your app needs. - * For example, if you are asking someone's name, but specifically need their - * surname, write `surname` instead of `name`. - * Required if `hintText` is unspecified. Otherwise, optional. - * @type string $hint_text - * Text that appears below the text input field meant to assist users by - * prompting them to enter a certain value. This text is always visible. - * Required if `label` is unspecified. Otherwise, optional. - * @type string $value - * The value entered by a user, returned as part of a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * @type int $type - * How a text input field appears in the user interface. - * For example, whether the field is single or multi-line. - * @type \Google\Apps\Card\V1\Action $on_change_action - * What to do when a change occurs in the text input field. For example, a - * user adding to the field or deleting text. - * Examples of actions to take include running a custom function or opening - * a [dialog](https://developers.google.com/workspace/chat/dialogs) - * in Google Chat. - * @type \Google\Apps\Card\V1\Suggestions $initial_suggestions - * Suggested values that users can enter. These values appear when users click - * inside the text input field. As users type, the suggested values - * dynamically filter to match what the users have typed. - * For example, a text input field for programming language might suggest - * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list - * of suggestions filters to show just `Java` and `JavaScript`. - * Suggested values help guide users to enter values that your app can make - * sense of. When referring to JavaScript, some users might enter `javascript` - * and others `java script`. Suggesting `JavaScript` can standardize how users - * interact with your app. - * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set - * to `MULTIPLE_LINE`. - * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): - * @type \Google\Apps\Card\V1\Action $auto_complete_action - * Optional. Specify what action to take when the text input field provides - * suggestions to users who interact with it. - * If unspecified, the suggestions are set by `initialSuggestions` and - * are processed by the client. - * If specified, the app takes the action specified here, such as running - * a custom function. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * @type string $placeholder_text - * Text that appears in the text input field when the field is empty. - * Use this text to prompt users to enter a value. For example, `Enter a - * number from 0 to 100`. - * [Google Chat apps](https://developers.google.com/workspace/chat): - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The name by which the text input is identified in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name by which the text input is identified in a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The text that appears above the text input field in the user interface. - * Specify text that helps the user enter the information your app needs. - * For example, if you are asking someone's name, but specifically need their - * surname, write `surname` instead of `name`. - * Required if `hintText` is unspecified. Otherwise, optional. - * - * Generated from protobuf field string label = 2; - * @return string - */ - public function getLabel() - { - return $this->label; - } - - /** - * The text that appears above the text input field in the user interface. - * Specify text that helps the user enter the information your app needs. - * For example, if you are asking someone's name, but specifically need their - * surname, write `surname` instead of `name`. - * Required if `hintText` is unspecified. Otherwise, optional. - * - * Generated from protobuf field string label = 2; - * @param string $var - * @return $this - */ - public function setLabel($var) - { - GPBUtil::checkString($var, True); - $this->label = $var; - - return $this; - } - - /** - * Text that appears below the text input field meant to assist users by - * prompting them to enter a certain value. This text is always visible. - * Required if `label` is unspecified. Otherwise, optional. - * - * Generated from protobuf field string hint_text = 3; - * @return string - */ - public function getHintText() - { - return $this->hint_text; - } - - /** - * Text that appears below the text input field meant to assist users by - * prompting them to enter a certain value. This text is always visible. - * Required if `label` is unspecified. Otherwise, optional. - * - * Generated from protobuf field string hint_text = 3; - * @param string $var - * @return $this - */ - public function setHintText($var) - { - GPBUtil::checkString($var, True); - $this->hint_text = $var; - - return $this; - } - - /** - * The value entered by a user, returned as part of a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string value = 4; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value entered by a user, returned as part of a form input event. - * For details about working with form inputs, see [Receive form - * data](https://developers.google.com/workspace/chat/read-form-data). - * - * Generated from protobuf field string value = 4; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - - /** - * How a text input field appears in the user interface. - * For example, whether the field is single or multi-line. - * - * Generated from protobuf field .google.apps.card.v1.TextInput.Type type = 5; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * How a text input field appears in the user interface. - * For example, whether the field is single or multi-line. - * - * Generated from protobuf field .google.apps.card.v1.TextInput.Type type = 5; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\TextInput\Type::class); - $this->type = $var; - - return $this; - } - - /** - * What to do when a change occurs in the text input field. For example, a - * user adding to the field or deleting text. - * Examples of actions to take include running a custom function or opening - * a [dialog](https://developers.google.com/workspace/chat/dialogs) - * in Google Chat. - * - * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; - * @return \Google\Apps\Card\V1\Action|null - */ - public function getOnChangeAction() - { - return $this->on_change_action; - } - - public function hasOnChangeAction() - { - return isset($this->on_change_action); - } - - public function clearOnChangeAction() - { - unset($this->on_change_action); - } - - /** - * What to do when a change occurs in the text input field. For example, a - * user adding to the field or deleting text. - * Examples of actions to take include running a custom function or opening - * a [dialog](https://developers.google.com/workspace/chat/dialogs) - * in Google Chat. - * - * Generated from protobuf field .google.apps.card.v1.Action on_change_action = 6; - * @param \Google\Apps\Card\V1\Action $var - * @return $this - */ - public function setOnChangeAction($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); - $this->on_change_action = $var; - - return $this; - } - - /** - * Suggested values that users can enter. These values appear when users click - * inside the text input field. As users type, the suggested values - * dynamically filter to match what the users have typed. - * For example, a text input field for programming language might suggest - * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list - * of suggestions filters to show just `Java` and `JavaScript`. - * Suggested values help guide users to enter values that your app can make - * sense of. When referring to JavaScript, some users might enter `javascript` - * and others `java script`. Suggesting `JavaScript` can standardize how users - * interact with your app. - * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set - * to `MULTIPLE_LINE`. - * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): - * - * Generated from protobuf field .google.apps.card.v1.Suggestions initial_suggestions = 7; - * @return \Google\Apps\Card\V1\Suggestions|null - */ - public function getInitialSuggestions() - { - return $this->initial_suggestions; - } - - public function hasInitialSuggestions() - { - return isset($this->initial_suggestions); - } - - public function clearInitialSuggestions() - { - unset($this->initial_suggestions); - } - - /** - * Suggested values that users can enter. These values appear when users click - * inside the text input field. As users type, the suggested values - * dynamically filter to match what the users have typed. - * For example, a text input field for programming language might suggest - * Java, JavaScript, Python, and C++. When users start typing `Jav`, the list - * of suggestions filters to show just `Java` and `JavaScript`. - * Suggested values help guide users to enter values that your app can make - * sense of. When referring to JavaScript, some users might enter `javascript` - * and others `java script`. Suggesting `JavaScript` can standardize how users - * interact with your app. - * When specified, `TextInput.type` is always `SINGLE_LINE`, even if it's set - * to `MULTIPLE_LINE`. - * [Google Workspace - * Add-ons and Chat apps](https://developers.google.com/workspace/extend): - * - * Generated from protobuf field .google.apps.card.v1.Suggestions initial_suggestions = 7; - * @param \Google\Apps\Card\V1\Suggestions $var - * @return $this - */ - public function setInitialSuggestions($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Suggestions::class); - $this->initial_suggestions = $var; - - return $this; - } - - /** - * Optional. Specify what action to take when the text input field provides - * suggestions to users who interact with it. - * If unspecified, the suggestions are set by `initialSuggestions` and - * are processed by the client. - * If specified, the app takes the action specified here, such as running - * a custom function. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Action auto_complete_action = 8; - * @return \Google\Apps\Card\V1\Action|null - */ - public function getAutoCompleteAction() - { - return $this->auto_complete_action; - } - - public function hasAutoCompleteAction() - { - return isset($this->auto_complete_action); - } - - public function clearAutoCompleteAction() - { - unset($this->auto_complete_action); - } - - /** - * Optional. Specify what action to take when the text input field provides - * suggestions to users who interact with it. - * If unspecified, the suggestions are set by `initialSuggestions` and - * are processed by the client. - * If specified, the app takes the action specified here, such as running - * a custom function. - * [Google Workspace - * Add-ons](https://developers.google.com/workspace/add-ons): - * - * Generated from protobuf field .google.apps.card.v1.Action auto_complete_action = 8; - * @param \Google\Apps\Card\V1\Action $var - * @return $this - */ - public function setAutoCompleteAction($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Action::class); - $this->auto_complete_action = $var; - - return $this; - } - - /** - * Text that appears in the text input field when the field is empty. - * Use this text to prompt users to enter a value. For example, `Enter a - * number from 0 to 100`. - * [Google Chat apps](https://developers.google.com/workspace/chat): - * - * Generated from protobuf field string placeholder_text = 12; - * @return string - */ - public function getPlaceholderText() - { - return $this->placeholder_text; - } - - /** - * Text that appears in the text input field when the field is empty. - * Use this text to prompt users to enter a value. For example, `Enter a - * number from 0 to 100`. - * [Google Chat apps](https://developers.google.com/workspace/chat): - * - * Generated from protobuf field string placeholder_text = 12; - * @param string $var - * @return $this - */ - public function setPlaceholderText($var) - { - GPBUtil::checkString($var, True); - $this->placeholder_text = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput/Type.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput/Type.php deleted file mode 100644 index 0bd6f1608c34..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextInput/Type.php +++ /dev/null @@ -1,62 +0,0 @@ -google.apps.card.v1.TextInput.Type - */ -class Type -{ - /** - * The text input field has a fixed height of one line. - * - * Generated from protobuf enum SINGLE_LINE = 0; - */ - const SINGLE_LINE = 0; - /** - * The text input field has a fixed height of multiple lines. - * - * Generated from protobuf enum MULTIPLE_LINE = 1; - */ - const MULTIPLE_LINE = 1; - - private static $valueToName = [ - self::SINGLE_LINE => 'SINGLE_LINE', - self::MULTIPLE_LINE => 'MULTIPLE_LINE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Apps\Card\V1\TextInput_Type::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextParagraph.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextParagraph.php deleted file mode 100644 index 029cb54e8a3c..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/TextParagraph.php +++ /dev/null @@ -1,79 +0,0 @@ -google.apps.card.v1.TextParagraph - */ -class TextParagraph extends \Google\Protobuf\Internal\Message -{ - /** - * The text that's shown in the widget. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * The text that's shown in the widget. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * The text that's shown in the widget. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * The text that's shown in the widget. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget.php deleted file mode 100644 index 9299d133d355..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget.php +++ /dev/null @@ -1,1062 +0,0 @@ -google.apps.card.v1.Widget - */ -class Widget extends \Google\Protobuf\Internal\Message -{ - /** - * Specifies whether widgets align to the left, right, or center of a column. - * - * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; - */ - protected $horizontal_alignment = 0; - protected $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Card\V1\TextParagraph $text_paragraph - * Displays a text paragraph. Supports simple HTML formatted text. For more - * information about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * For example, the following JSON creates a bolded text: - * ``` - * "textParagraph": { - * "text": " bold text" - * } - * ``` - * @type \Google\Apps\Card\V1\Image $image - * Displays an image. - * For example, the following JSON creates an image with alternative text: - * ``` - * "image": { - * "imageUrl": - * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", - * "altText": "Chat app avatar" - * } - * ``` - * @type \Google\Apps\Card\V1\DecoratedText $decorated_text - * Displays a decorated text item. - * For example, the following JSON creates a decorated text widget showing - * email address: - * ``` - * "decoratedText": { - * "icon": { - * "knownIcon": "EMAIL" - * }, - * "topLabel": "Email Address", - * "text": "sasha@example.com", - * "bottomLabel": "This is a new Email address!", - * "switchControl": { - * "name": "has_send_welcome_email_to_sasha", - * "selected": false, - * "controlType": "CHECKBOX" - * } - * } - * ``` - * @type \Google\Apps\Card\V1\ButtonList $button_list - * A list of buttons. - * For example, the following JSON creates two buttons. The first - * is a blue text button and the second is an image button that opens a - * link: - * ``` - * "buttonList": { - * "buttons": [ - * { - * "text": "Edit", - * "color": { - * "red": 0, - * "green": 0, - * "blue": 1, - * "alpha": 1 - * }, - * "disabled": true, - * }, - * { - * "icon": { - * "knownIcon": "INVITE", - * "altText": "check calendar" - * }, - * "onClick": { - * "openLink": { - * "url": "https://example.com/calendar" - * } - * } - * } - * ] - * } - * ``` - * @type \Google\Apps\Card\V1\TextInput $text_input - * Displays a text box that users can type into. - * For example, the following JSON creates a text input for an email - * address: - * ``` - * "textInput": { - * "name": "mailing_address", - * "label": "Mailing Address" - * } - * ``` - * As another example, the following JSON creates a text input for a - * programming language with static suggestions: - * ``` - * "textInput": { - * "name": "preferred_programing_language", - * "label": "Preferred Language", - * "initialSuggestions": { - * "items": [ - * { - * "text": "C++" - * }, - * { - * "text": "Java" - * }, - * { - * "text": "JavaScript" - * }, - * { - * "text": "Python" - * } - * ] - * } - * } - * ``` - * @type \Google\Apps\Card\V1\SelectionInput $selection_input - * Displays a selection control that lets users select items. Selection - * controls can be checkboxes, radio buttons, switches, or dropdown menus. - * For example, the following JSON creates a dropdown menu that lets users - * choose a size: - * ``` - * "selectionInput": { - * "name": "size", - * "label": "Size" - * "type": "DROPDOWN", - * "items": [ - * { - * "text": "S", - * "value": "small", - * "selected": false - * }, - * { - * "text": "M", - * "value": "medium", - * "selected": true - * }, - * { - * "text": "L", - * "value": "large", - * "selected": false - * }, - * { - * "text": "XL", - * "value": "extra_large", - * "selected": false - * } - * ] - * } - * ``` - * @type \Google\Apps\Card\V1\DateTimePicker $date_time_picker - * Displays a widget that lets users input a date, time, or date and time. - * For example, the following JSON creates a date time picker to schedule an - * appointment: - * ``` - * "dateTimePicker": { - * "name": "appointment_time", - * "label": "Book your appointment at:", - * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" - * } - * ``` - * @type \Google\Apps\Card\V1\Divider $divider - * Displays a horizontal line divider between widgets. - * For example, the following JSON creates a divider: - * ``` - * "divider": { - * } - * ``` - * @type \Google\Apps\Card\V1\Grid $grid - * Displays a grid with a collection of items. - * A grid supports any number of columns and items. The number of rows is - * determined by the upper bounds of the number items divided by the number - * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 - * items and 2 columns has 6 rows. - * [Google Workspace Add-ons and - * Chat apps](https://developers.google.com/workspace/extend): - * For example, the following JSON creates a 2 column grid with a single - * item: - * ``` - * "grid": { - * "title": "A fine collection of items", - * "columnCount": 2, - * "borderStyle": { - * "type": "STROKE", - * "cornerRadius": 4 - * }, - * "items": [ - * { - * "image": { - * "imageUri": "https://www.example.com/image.png", - * "cropStyle": { - * "type": "SQUARE" - * }, - * "borderStyle": { - * "type": "STROKE" - * } - * }, - * "title": "An item", - * "textAlignment": "CENTER" - * } - * ], - * "onClick": { - * "openLink": { - * "url": "https://www.example.com" - * } - * } - * } - * ``` - * @type \Google\Apps\Card\V1\Columns $columns - * Displays up to 2 columns. - * To include more than 2 columns, or to use rows, use the `Grid` widget. - * For example, the following JSON creates 2 columns that each contain - * text paragraphs: - * ``` - * "columns": { - * "columnItems": [ - * { - * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", - * "horizontalAlignment": "CENTER", - * "verticalAlignment": "CENTER", - * "widgets": [ - * { - * "textParagraph": { - * "text": "First column text paragraph" - * } - * } - * ] - * }, - * { - * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", - * "horizontalAlignment": "CENTER", - * "verticalAlignment": "CENTER", - * "widgets": [ - * { - * "textParagraph": { - * "text": "Second column text paragraph" - * } - * } - * ] - * } - * ] - * } - * ``` - * @type int $horizontal_alignment - * Specifies whether widgets align to the left, right, or center of a column. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Apps\Card\V1\Card::initOnce(); - parent::__construct($data); - } - - /** - * Displays a text paragraph. Supports simple HTML formatted text. For more - * information about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * For example, the following JSON creates a bolded text: - * ``` - * "textParagraph": { - * "text": " bold text" - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.TextParagraph text_paragraph = 1; - * @return \Google\Apps\Card\V1\TextParagraph|null - */ - public function getTextParagraph() - { - return $this->readOneof(1); - } - - public function hasTextParagraph() - { - return $this->hasOneof(1); - } - - /** - * Displays a text paragraph. Supports simple HTML formatted text. For more - * information about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * For example, the following JSON creates a bolded text: - * ``` - * "textParagraph": { - * "text": " bold text" - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.TextParagraph text_paragraph = 1; - * @param \Google\Apps\Card\V1\TextParagraph $var - * @return $this - */ - public function setTextParagraph($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\TextParagraph::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Displays an image. - * For example, the following JSON creates an image with alternative text: - * ``` - * "image": { - * "imageUrl": - * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", - * "altText": "Chat app avatar" - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.Image image = 2; - * @return \Google\Apps\Card\V1\Image|null - */ - public function getImage() - { - return $this->readOneof(2); - } - - public function hasImage() - { - return $this->hasOneof(2); - } - - /** - * Displays an image. - * For example, the following JSON creates an image with alternative text: - * ``` - * "image": { - * "imageUrl": - * "https://developers.google.com/workspace/chat/images/quickstart-app-avatar.png", - * "altText": "Chat app avatar" - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.Image image = 2; - * @param \Google\Apps\Card\V1\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Image::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Displays a decorated text item. - * For example, the following JSON creates a decorated text widget showing - * email address: - * ``` - * "decoratedText": { - * "icon": { - * "knownIcon": "EMAIL" - * }, - * "topLabel": "Email Address", - * "text": "sasha@example.com", - * "bottomLabel": "This is a new Email address!", - * "switchControl": { - * "name": "has_send_welcome_email_to_sasha", - * "selected": false, - * "controlType": "CHECKBOX" - * } - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.DecoratedText decorated_text = 3; - * @return \Google\Apps\Card\V1\DecoratedText|null - */ - public function getDecoratedText() - { - return $this->readOneof(3); - } - - public function hasDecoratedText() - { - return $this->hasOneof(3); - } - - /** - * Displays a decorated text item. - * For example, the following JSON creates a decorated text widget showing - * email address: - * ``` - * "decoratedText": { - * "icon": { - * "knownIcon": "EMAIL" - * }, - * "topLabel": "Email Address", - * "text": "sasha@example.com", - * "bottomLabel": "This is a new Email address!", - * "switchControl": { - * "name": "has_send_welcome_email_to_sasha", - * "selected": false, - * "controlType": "CHECKBOX" - * } - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.DecoratedText decorated_text = 3; - * @param \Google\Apps\Card\V1\DecoratedText $var - * @return $this - */ - public function setDecoratedText($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DecoratedText::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A list of buttons. - * For example, the following JSON creates two buttons. The first - * is a blue text button and the second is an image button that opens a - * link: - * ``` - * "buttonList": { - * "buttons": [ - * { - * "text": "Edit", - * "color": { - * "red": 0, - * "green": 0, - * "blue": 1, - * "alpha": 1 - * }, - * "disabled": true, - * }, - * { - * "icon": { - * "knownIcon": "INVITE", - * "altText": "check calendar" - * }, - * "onClick": { - * "openLink": { - * "url": "https://example.com/calendar" - * } - * } - * } - * ] - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 4; - * @return \Google\Apps\Card\V1\ButtonList|null - */ - public function getButtonList() - { - return $this->readOneof(4); - } - - public function hasButtonList() - { - return $this->hasOneof(4); - } - - /** - * A list of buttons. - * For example, the following JSON creates two buttons. The first - * is a blue text button and the second is an image button that opens a - * link: - * ``` - * "buttonList": { - * "buttons": [ - * { - * "text": "Edit", - * "color": { - * "red": 0, - * "green": 0, - * "blue": 1, - * "alpha": 1 - * }, - * "disabled": true, - * }, - * { - * "icon": { - * "knownIcon": "INVITE", - * "altText": "check calendar" - * }, - * "onClick": { - * "openLink": { - * "url": "https://example.com/calendar" - * } - * } - * } - * ] - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 4; - * @param \Google\Apps\Card\V1\ButtonList $var - * @return $this - */ - public function setButtonList($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ButtonList::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Displays a text box that users can type into. - * For example, the following JSON creates a text input for an email - * address: - * ``` - * "textInput": { - * "name": "mailing_address", - * "label": "Mailing Address" - * } - * ``` - * As another example, the following JSON creates a text input for a - * programming language with static suggestions: - * ``` - * "textInput": { - * "name": "preferred_programing_language", - * "label": "Preferred Language", - * "initialSuggestions": { - * "items": [ - * { - * "text": "C++" - * }, - * { - * "text": "Java" - * }, - * { - * "text": "JavaScript" - * }, - * { - * "text": "Python" - * } - * ] - * } - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.TextInput text_input = 5; - * @return \Google\Apps\Card\V1\TextInput|null - */ - public function getTextInput() - { - return $this->readOneof(5); - } - - public function hasTextInput() - { - return $this->hasOneof(5); - } - - /** - * Displays a text box that users can type into. - * For example, the following JSON creates a text input for an email - * address: - * ``` - * "textInput": { - * "name": "mailing_address", - * "label": "Mailing Address" - * } - * ``` - * As another example, the following JSON creates a text input for a - * programming language with static suggestions: - * ``` - * "textInput": { - * "name": "preferred_programing_language", - * "label": "Preferred Language", - * "initialSuggestions": { - * "items": [ - * { - * "text": "C++" - * }, - * { - * "text": "Java" - * }, - * { - * "text": "JavaScript" - * }, - * { - * "text": "Python" - * } - * ] - * } - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.TextInput text_input = 5; - * @param \Google\Apps\Card\V1\TextInput $var - * @return $this - */ - public function setTextInput($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\TextInput::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Displays a selection control that lets users select items. Selection - * controls can be checkboxes, radio buttons, switches, or dropdown menus. - * For example, the following JSON creates a dropdown menu that lets users - * choose a size: - * ``` - * "selectionInput": { - * "name": "size", - * "label": "Size" - * "type": "DROPDOWN", - * "items": [ - * { - * "text": "S", - * "value": "small", - * "selected": false - * }, - * { - * "text": "M", - * "value": "medium", - * "selected": true - * }, - * { - * "text": "L", - * "value": "large", - * "selected": false - * }, - * { - * "text": "XL", - * "value": "extra_large", - * "selected": false - * } - * ] - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.SelectionInput selection_input = 6; - * @return \Google\Apps\Card\V1\SelectionInput|null - */ - public function getSelectionInput() - { - return $this->readOneof(6); - } - - public function hasSelectionInput() - { - return $this->hasOneof(6); - } - - /** - * Displays a selection control that lets users select items. Selection - * controls can be checkboxes, radio buttons, switches, or dropdown menus. - * For example, the following JSON creates a dropdown menu that lets users - * choose a size: - * ``` - * "selectionInput": { - * "name": "size", - * "label": "Size" - * "type": "DROPDOWN", - * "items": [ - * { - * "text": "S", - * "value": "small", - * "selected": false - * }, - * { - * "text": "M", - * "value": "medium", - * "selected": true - * }, - * { - * "text": "L", - * "value": "large", - * "selected": false - * }, - * { - * "text": "XL", - * "value": "extra_large", - * "selected": false - * } - * ] - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.SelectionInput selection_input = 6; - * @param \Google\Apps\Card\V1\SelectionInput $var - * @return $this - */ - public function setSelectionInput($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\SelectionInput::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * Displays a widget that lets users input a date, time, or date and time. - * For example, the following JSON creates a date time picker to schedule an - * appointment: - * ``` - * "dateTimePicker": { - * "name": "appointment_time", - * "label": "Book your appointment at:", - * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.DateTimePicker date_time_picker = 7; - * @return \Google\Apps\Card\V1\DateTimePicker|null - */ - public function getDateTimePicker() - { - return $this->readOneof(7); - } - - public function hasDateTimePicker() - { - return $this->hasOneof(7); - } - - /** - * Displays a widget that lets users input a date, time, or date and time. - * For example, the following JSON creates a date time picker to schedule an - * appointment: - * ``` - * "dateTimePicker": { - * "name": "appointment_time", - * "label": "Book your appointment at:", - * "type": "DATE_AND_TIME", - * "valueMsEpoch": "796435200000" - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.DateTimePicker date_time_picker = 7; - * @param \Google\Apps\Card\V1\DateTimePicker $var - * @return $this - */ - public function setDateTimePicker($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\DateTimePicker::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Displays a horizontal line divider between widgets. - * For example, the following JSON creates a divider: - * ``` - * "divider": { - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.Divider divider = 9; - * @return \Google\Apps\Card\V1\Divider|null - */ - public function getDivider() - { - return $this->readOneof(9); - } - - public function hasDivider() - { - return $this->hasOneof(9); - } - - /** - * Displays a horizontal line divider between widgets. - * For example, the following JSON creates a divider: - * ``` - * "divider": { - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.Divider divider = 9; - * @param \Google\Apps\Card\V1\Divider $var - * @return $this - */ - public function setDivider($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Divider::class); - $this->writeOneof(9, $var); - - return $this; - } - - /** - * Displays a grid with a collection of items. - * A grid supports any number of columns and items. The number of rows is - * determined by the upper bounds of the number items divided by the number - * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 - * items and 2 columns has 6 rows. - * [Google Workspace Add-ons and - * Chat apps](https://developers.google.com/workspace/extend): - * For example, the following JSON creates a 2 column grid with a single - * item: - * ``` - * "grid": { - * "title": "A fine collection of items", - * "columnCount": 2, - * "borderStyle": { - * "type": "STROKE", - * "cornerRadius": 4 - * }, - * "items": [ - * { - * "image": { - * "imageUri": "https://www.example.com/image.png", - * "cropStyle": { - * "type": "SQUARE" - * }, - * "borderStyle": { - * "type": "STROKE" - * } - * }, - * "title": "An item", - * "textAlignment": "CENTER" - * } - * ], - * "onClick": { - * "openLink": { - * "url": "https://www.example.com" - * } - * } - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.Grid grid = 10; - * @return \Google\Apps\Card\V1\Grid|null - */ - public function getGrid() - { - return $this->readOneof(10); - } - - public function hasGrid() - { - return $this->hasOneof(10); - } - - /** - * Displays a grid with a collection of items. - * A grid supports any number of columns and items. The number of rows is - * determined by the upper bounds of the number items divided by the number - * of columns. A grid with 10 items and 2 columns has 5 rows. A grid with 11 - * items and 2 columns has 6 rows. - * [Google Workspace Add-ons and - * Chat apps](https://developers.google.com/workspace/extend): - * For example, the following JSON creates a 2 column grid with a single - * item: - * ``` - * "grid": { - * "title": "A fine collection of items", - * "columnCount": 2, - * "borderStyle": { - * "type": "STROKE", - * "cornerRadius": 4 - * }, - * "items": [ - * { - * "image": { - * "imageUri": "https://www.example.com/image.png", - * "cropStyle": { - * "type": "SQUARE" - * }, - * "borderStyle": { - * "type": "STROKE" - * } - * }, - * "title": "An item", - * "textAlignment": "CENTER" - * } - * ], - * "onClick": { - * "openLink": { - * "url": "https://www.example.com" - * } - * } - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.Grid grid = 10; - * @param \Google\Apps\Card\V1\Grid $var - * @return $this - */ - public function setGrid($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Grid::class); - $this->writeOneof(10, $var); - - return $this; - } - - /** - * Displays up to 2 columns. - * To include more than 2 columns, or to use rows, use the `Grid` widget. - * For example, the following JSON creates 2 columns that each contain - * text paragraphs: - * ``` - * "columns": { - * "columnItems": [ - * { - * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", - * "horizontalAlignment": "CENTER", - * "verticalAlignment": "CENTER", - * "widgets": [ - * { - * "textParagraph": { - * "text": "First column text paragraph" - * } - * } - * ] - * }, - * { - * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", - * "horizontalAlignment": "CENTER", - * "verticalAlignment": "CENTER", - * "widgets": [ - * { - * "textParagraph": { - * "text": "Second column text paragraph" - * } - * } - * ] - * } - * ] - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.Columns columns = 11; - * @return \Google\Apps\Card\V1\Columns|null - */ - public function getColumns() - { - return $this->readOneof(11); - } - - public function hasColumns() - { - return $this->hasOneof(11); - } - - /** - * Displays up to 2 columns. - * To include more than 2 columns, or to use rows, use the `Grid` widget. - * For example, the following JSON creates 2 columns that each contain - * text paragraphs: - * ``` - * "columns": { - * "columnItems": [ - * { - * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", - * "horizontalAlignment": "CENTER", - * "verticalAlignment": "CENTER", - * "widgets": [ - * { - * "textParagraph": { - * "text": "First column text paragraph" - * } - * } - * ] - * }, - * { - * "horizontalSizeStyle": "FILL_AVAILABLE_SPACE", - * "horizontalAlignment": "CENTER", - * "verticalAlignment": "CENTER", - * "widgets": [ - * { - * "textParagraph": { - * "text": "Second column text paragraph" - * } - * } - * ] - * } - * ] - * } - * ``` - * - * Generated from protobuf field .google.apps.card.v1.Columns columns = 11; - * @param \Google\Apps\Card\V1\Columns $var - * @return $this - */ - public function setColumns($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Columns::class); - $this->writeOneof(11, $var); - - return $this; - } - - /** - * Specifies whether widgets align to the left, right, or center of a column. - * - * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; - * @return int - */ - public function getHorizontalAlignment() - { - return $this->horizontal_alignment; - } - - /** - * Specifies whether widgets align to the left, right, or center of a column. - * - * Generated from protobuf field .google.apps.card.v1.Widget.HorizontalAlignment horizontal_alignment = 8; - * @param int $var - * @return $this - */ - public function setHorizontalAlignment($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Card\V1\Widget\HorizontalAlignment::class); - $this->horizontal_alignment = $var; - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - -} - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/HorizontalAlignment.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/HorizontalAlignment.php deleted file mode 100644 index e7e24749522d..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/HorizontalAlignment.php +++ /dev/null @@ -1,76 +0,0 @@ -google.apps.card.v1.Widget.HorizontalAlignment - */ -class HorizontalAlignment -{ - /** - * Don't use. Unspecified. - * - * Generated from protobuf enum HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; - */ - const HORIZONTAL_ALIGNMENT_UNSPECIFIED = 0; - /** - * Default value. Aligns widgets to the start position of the column. For - * left-to-right layouts, aligns to the left. For right-to-left layouts, - * aligns to the right. - * - * Generated from protobuf enum START = 1; - */ - const START = 1; - /** - * Aligns widgets to the center of the column. - * - * Generated from protobuf enum CENTER = 2; - */ - const CENTER = 2; - /** - * Aligns widgets to the end position of the column. For left-to-right - * layouts, aligns widgets to the right. For right-to-left layouts, aligns - * widgets to the left. - * - * Generated from protobuf enum END = 3; - */ - const END = 3; - - private static $valueToName = [ - self::HORIZONTAL_ALIGNMENT_UNSPECIFIED => 'HORIZONTAL_ALIGNMENT_UNSPECIFIED', - self::START => 'START', - self::CENTER => 'CENTER', - self::END => 'END', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(HorizontalAlignment::class, \Google\Apps\Card\V1\Widget_HorizontalAlignment::class); - diff --git a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/ImageType.php b/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/ImageType.php deleted file mode 100644 index f1cee4017576..000000000000 --- a/owl-bot-staging/AppsChat/card-protos/v1/proto/src/Google/Apps/Card/V1/Widget/ImageType.php +++ /dev/null @@ -1,61 +0,0 @@ -google.apps.card.v1.Widget.ImageType - */ -class ImageType -{ - /** - * Default value. Applies a square mask to the image. For example, a 4x3 - * image becomes 3x3. - * - * Generated from protobuf enum SQUARE = 0; - */ - const SQUARE = 0; - /** - * Applies a circular mask to the image. For example, a 4x3 image becomes a - * circle with a diameter of 3. - * - * Generated from protobuf enum CIRCLE = 1; - */ - const CIRCLE = 1; - - private static $valueToName = [ - self::SQUARE => 'SQUARE', - self::CIRCLE => 'CIRCLE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ImageType::class, \Google\Apps\Card\V1\Widget_ImageType::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ActionStatus.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ActionStatus.php deleted file mode 100644 index 809c8f272695..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ActionStatus.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - ' - -"google/chat/v1/action_status.protogoogle.chat.v1"R - ActionStatus% - status_code (2.google.rpc.Code -user_facing_message ( B -com.google.chat.v1BActionStatusProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Annotation.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Annotation.php deleted file mode 100644 index af1277287045334b969d2e12c284b22c8b90a02b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2391 zcmb7G>rUfF6kaC~HYX6Wv#8C&E(}?u4HXzAt=h_zt(*%GEx9NOs9RaG9A}bPO>E1a zpl&Pv_Zj-LQmd-3&^|$*r0OH^t25(Vz@#_+0ORjFbG~oRoHL(&?hagdiO+~lJcE)h z?!3cvK(OmM)G?hQ?u>gq;$hPnxz><)GRCDkuGQPPT&lEp8P#{jo=Ftkcbxu^9GL@y z9$n{-4BK|7K`qCYMJxc@7!lt!OoGoEg({&&*Pw=WCTLob(X^}FF@QNVd>^YbI(!S5 z{kY@K&@!>lW14u+@^#C$sAUYTZ&=nRxMvJ~!srjNy|HcbJTNEJZIfj8aS)SZ_gsgm zJi*gM8eBLNtyOGFJlhy*CE}Z&L~N@3Z|A;__a>_iM28FSUY_0YK)(Bwyz?9}s3jg5uhI7K%7#*#@67 zzeND%)r1aUiN145TEbE`nctT0?^vfm5zxRI2@zNkQWR%=NAATPg#W|tm=0pXMU96>4KzD z29~&9;bS7d5#EJU(8m+6xoydOb`d7zh0I;g(Qc6MzSgDq4?Ml6tie&zfU}KRzXcwX#hyG)ppWMrHKb+^Hup&{k0jrY}(|LCj zr4UDmHL>7~bgL^0A&TCIb?RCDKJk3L%et1+7iau9llyO40b-TfRsBtwN&PhfsqiT> zGooY95;Ehc49R&xh;k2(;4myL97dil2>(BY^{!`Klc2D8yA}!)`4{0hB@W|NRbn7k z&?;>3yQ_egL4f7D08m!(+W*at}mEyU6QK`Mr7nDU3pwz5fmG#rg zMVVCx`@eXuw)Iv+Ei%^%F<9aXGGD;jy=>7(kPKAv&$>r?lUjKm&Qj30z$WRTClDW5 zBcjjTjc0z6;K>6e=n$5L3&GJ8wr|xfcqSTK(0UBl@?};pN5TMf1Ti}Bh|v|zCSKUN zRiDG=B79rGP!3kuT=k9qr2Go_R(%0mix|}a_W^-qsL$=dmRe&|UFElFk-I5ay=;}6 z`t-s{%z(Alh1xpTi}h+%t(8&{v6v&!$g1o5a*c-wt+x3})~R+yMLqrCQiU diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Attachment.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Attachment.php deleted file mode 100644 index 1609b69644668bc8ee18ae9b6ac7f4f608e3d08e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1793 zcma)7TaVL56ed|3mcz0v<`(FMAL{h^gSSiT#7P>lBvJMv6K@||yvzyBeg$8aC@NJJ9MNq{D=5T6qi zCyXJBn#Y5)&b3hz7%b)N%Uz_XIR$S>h85%@~`7q~XsoZyYxpm~-sU zk4VH#6$>E3M0qY>p4hx9j5^$wciFeL(h+IN~oKBp`~5-^N>Qh$VWOzHa|W}?d-bW+GjHZGcW z`w=HeghSUMsh`l8vt%S(Eo(;jk}hefKg!d}aCD05x<<=7RpbuhNk&$)Ba{%HCDFF3 zTLxGx-`q23vSaFYDG7rXnd4*163Z&ODuR3nIwtwF&O|9HzJ5yc#_b?j_SqG)uP-Z; zbv}f5>u~oYLpL_HgDF*E9yjmY&H*^4jU+Ed>!bGf8bC31V*}1h!Bk7ARKIB4h7F&I zx+3l=Ygt-bYj5ne)g%5YCe^j#=tsC#$k3B=^Aa+xo);dMzPV@qyEd~(?g-B@nf`Rn z*oMs@p~s{EUr^xB-UmCap7lm>2zX~vy?2S6@ez)Iow$2%w0M597*zvmk z-Og6YxDHzfqurtHbR4fe9PD=n`&(tpduzKce4$3BDH794O|bzQ1x1FXu5#LVt)7d9 zxZ5e75n;&R7Aq@2Sc^d{S^(=O!>D};8>`$IH{h~nd@3a8(V(hEU3&&si{v@a()UC} zS{7O?ci~o%&C6m%GG{MIln2{|>pjAYcw_QQMpABkyQ;a?S8wd{I~#qBi5h`h2P((u zfKQ+j<3y-d%eZx4h5X$3^el3pYX(JE>#}#Hb17A&^K$J4R8OZ#V-}^vczU+bB_01q z=&e6WV2Js?C+gOfq9e5yN2M2!{g7qB(otw)#`Mk?A`xp}HWp8|_2c*QCFkdXJ?bm; zpXF;kwd_qhj#INOSHfZQuM?~5O0%oK1maWhwtQ2&Tb4YqED5lz!{(%-J}6HfF89%6 Uy;oP(@CR40^3;oR0SkbC08|n;q5uE@ diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ChatService.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ChatService.php deleted file mode 100644 index cedd67f16eefe1a07ef67cacb2dc16529b8de43c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7235 zcmbtZ&2QX96lW_a?W7;cgtRpMa@@2{w;L}>MG;O5a+@@&pl#H&m8e#V9PcD+y1O>E zH&I(65C{$&K%y5u1QHyO%7H(mH{itHkT~&IF!N@{U$fh+LoVz1ef{RWH}Aa}UwYeb z_~?|jNZKT@BU0B^A8Jv9Xnx>Dp5ryO)y~=)2{gxR`EHX0hNjKm(r(_mqb8#C~`5|UuUb%+7l5Ng{k68g47w8f<>H%MgH?Z~bzf?(|` z6|CKxnM25F+F_`%|ChNudWtrM6TD?n82;JL#EDYTqon5^gX)J%bG;8#MVyNUAx|nNYJ*MwRsXcf$K+JutZr+ zbDc!7$Jm>xbHXfB=dNi}9HVI}ATMiC&>?B-nii0#6SU_5H&d_`Kh=8p$@1Nr)oy#t z3tl@k&16l9ihhDun=WZbgUg7Z)T}77oknX%vNuR;l>}kK^^4oRLBh~pC&dMC6B{C4 zTymKu=nlmeHg@D8Fi8>DmuXOUYI~Vx(GEO(rx8%YJ1`#a5}Kn6EkAnL+h?%3rr&bK zRb7bUdsT{nz`@(`cOn@v+CHf04_rqHJam*~~5wVOi#R2tp}75=(}4suPh5{CFp zZ#*%Bgj74bEu(;CWMQ4e$NM=8jNp&Z{zXC^Bu%RE%aA3Y@jRYHgI?)cFR~^Nevts! zi#S#^RA7%r4R0a@7GOi+iM-x~CQbKEo$0h)8IQbOFvHRX|4vi)u1|-L{;8WGZ)^YK zQr8-lN!tOCpMgLKy3rR`oW1vFW{Zm857GX4(j?DWQid#-bVzz#?s)@h zxt{fCnP+%k=5GbN@)15-}LNy zq7kcmDbFHtO-Z+i4r8c{V%J@O7*Fd{y*FD5me~P3W~q$dM~Kw}==-6X`3X(p(errH zECR_`*LnfK?8AtG;pLI;vVF_M4xEOtrWC?7RoYVuVU|f)JSHuU;*rFn8G<>yhW5~u z0IT?99>1hWgJXFHkkj>a4vgVZH3zov1KO9M4{=k9t5U>mtW9*SmqIrFfg4Bllp9S> zzz#xm(7Nk$TT0DJXxo@N3MR(%;f&wd1V_{3^AZ~31*p%GQp9cSTnS5UH%EccA$4<$5ul^!%%8N1%{y+CA7IiDOon56yl z1M!Lko`xvY&gy!P#4_2LH-W+e^9YSxbKCWKHz1B2EwEB66c&lCPm)gpiWB%)Di_ui zGe6RbCI_mxWvdk}&mwIrl{VG37if~ilb6&Dpw8>hA0kX7`Z+z_;oqR<^0q3q^sKpA zmO&8S?OKNtOG++ZoaN;=VaX2Kmxua*ggMM64}4=Ge%x-fn}pl6{8KLNB3y>O%Bk7)h!A(q_2 zf0fWHndTwUDP^-4*PsBSu5}FBO6rKI?Acqhb4mY6G4h?e-Ac^iyaD`631RBf+=T`{ zm-nX1BiE%&DLGyGd^#!Kz^^A=L&3|>*en?QDHViI`LGO8g&QMvBgxzVvV^CU@I-_D zS{m6YJdq#+KgCG_3SmN~%@z)&iIP5t(iDS4qPCrQ9_0pZ(|cYxE7M%vFN)Bb+oad2 zP=X}DTnXCZiOW@tKi&Jx8io0rUn|hdozS2?`48)>y^SdHL$g}l+}sr5mDH-;i5hVG zY}oad+cxTODykHaNV-V4Lop+uo7HPK9~P14fhsOh(AcUM4Q8W=<6M~52Gd*Ey(t01 z_WitG$W3k--G`mCB6cj6x*_^k~vV=&nJqHCF z)&X~^gT*Z;6uaTdQ`&oIY09;lE5oS^Q@Af*D&4O*O|MgrIlWeO-Q!=)XbBS^&ivIm zR`~qYpLY$-zjxDGx(?F6?iyW$k7b7C`=P;<8~0|O$+xu{dtKvS(&(qOe|H_??54>G nrpW|M^WMzrZn*8aa5lbtukg=OsjpalzhD6;|I)ODwh;OcKY9ht diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ContextualAddon.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ContextualAddon.php deleted file mode 100644 index 9b4adf8b86ed9c189d26bf9edf384b3611354b0d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1493 zcmb7E-A)rh6t<-ldO%WFRDxcNh@m8~O)+}0h_bW=8ih8t)Ic`bOn0a4hV9N~cNRs% z3-}mbn)o8Vfv@0|58#C}J4^XfBfaQuX20{D?>pzrdH&Mx`|t>D5sw6z5gT=m5$hA= z2b58Zx~LO%yCgss9r%t*0u`Z39qrazs9LGD9`ewTMu9~%)T6ZLlA_hetawx^TGV6Y zJ&UkwV%w&k8Z!cTctAoQTLf)2Hg*WZHfGq^ii3?Z4>sDRRRGJyVTj5@5?ye>M?n1N zM;+I(P{=Ujk9j9F9nWD7cAXF0z#8geHzb_nDz+PW7IUbFL_poMNMR94PJx~GDL1@^ zPSrF-4Y+@!#;pV%c8v-Nt-$da4H_J(X+6S*l@lk0#U!nubGoP?HEP-wk!y$r5jme7 zp@6U`@K$5pg5YHMX8gTY##_hcGD1x|^K?cLTUvhMBnEgDhk7@8I}5`MBHsf1%EIIS z>Z39xVXA1idQ_VGGzxbvbgS;|;NURwXMbiOQ^tX|lsuOob>vA};FUd?a0a+X%#a;(*a$zIT3Nq_r?X^gO%OE& zk8%rgk~Rulscdc?;2hvS+^g;ATUE2!+J9X&_ja3&YPq&qt5)(ilpKu4AM+^%Agj0a zmi{K6p52DA(+W;qXlG7YhOu{Y6qB|*xNJdAYBClFvPekD*L;7qZUVhN#B;MOVxcpRK@;M+of-(r-mVp4Y}9&V*8Q4E8&_ZK4_W< h(6n}`la1HolZD}hT#^go+&=m1E{T!y&Y!>uz;9rd(`x_# diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/DeletionMetadata.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/DeletionMetadata.php deleted file mode 100644 index 0fe6a8e5df12023ac54bd3170049c7c18625ab87..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1037 zcma)5(QeZ)6eS%S!i6nL#efGSGbYwaTdKlaNyMymSfi($nvgX1umop&Tm<1$qmzW_R zF{Eaa07Phs6N)?xJ9ewP-gG({+i7#QGp;uP@IsU%&{(T%aNsk5{G;hK3_O@H#Q1U? zByJD|EI?uKiC>`!XDCcC7rBX@rI9CWK|$z89%uY(`Ib@! zciIC}AN2>aq#S_q(AL|g+kf9P2XaZd3wCv*YxU$E2T zRKUSnz#Ut<%Q5n<@(@(Ego=&5)^`agJm=T$)OxV7ya{2J3S0Vk=7l8n3piQU<|NNQ zq5*#bqN8-$$d|9BvN7rDww1BJl`47SRh`mA6|q;x^&gw6 jO%nu78`r0M*{gbaQq2D>kJVNR|CzuHnTKr!Rsj3~32{Wk diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/EventPayload.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/EventPayload.php deleted file mode 100644 index 002a8589e7f5..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/EventPayload.php +++ /dev/null @@ -1,71 +0,0 @@ -internalAddGeneratedFile( - ' - -"google/chat/v1/event_payload.protogoogle.chat.v1google/chat/v1/membership.protogoogle/chat/v1/message.protogoogle/chat/v1/reaction.protogoogle/chat/v1/space.proto"L -MembershipCreatedEventData. - -membership ( 2.google.chat.v1.Membership"L -MembershipDeletedEventData. - -membership ( 2.google.chat.v1.Membership"L -MembershipUpdatedEventData. - -membership ( 2.google.chat.v1.Membership"b -MembershipBatchCreatedEventData? - memberships ( 2*.google.chat.v1.MembershipCreatedEventData"b -MembershipBatchUpdatedEventData? - memberships ( 2*.google.chat.v1.MembershipUpdatedEventData"b -MembershipBatchDeletedEventData? - memberships ( 2*.google.chat.v1.MembershipDeletedEventData"C -MessageCreatedEventData( -message ( 2.google.chat.v1.Message"C -MessageUpdatedEventData( -message ( 2.google.chat.v1.Message"C -MessageDeletedEventData( -message ( 2.google.chat.v1.Message"Y -MessageBatchCreatedEventData9 -messages ( 2\'.google.chat.v1.MessageCreatedEventData"Y -MessageBatchUpdatedEventData9 -messages ( 2\'.google.chat.v1.MessageUpdatedEventData"Y -MessageBatchDeletedEventData9 -messages ( 2\'.google.chat.v1.MessageDeletedEventData"= -SpaceUpdatedEventData$ -space ( 2.google.chat.v1.Space"S -SpaceBatchUpdatedEventData5 -spaces ( 2%.google.chat.v1.SpaceUpdatedEventData"F -ReactionCreatedEventData* -reaction ( 2.google.chat.v1.Reaction"F -ReactionDeletedEventData* -reaction ( 2.google.chat.v1.Reaction"\\ -ReactionBatchCreatedEventData; - reactions ( 2(.google.chat.v1.ReactionCreatedEventData"\\ -ReactionBatchDeletedEventData; - reactions ( 2(.google.chat.v1.ReactionDeletedEventDataB -com.google.chat.v1BEventPayloadProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Group.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Group.php deleted file mode 100644 index 5032c0f55dde..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Group.php +++ /dev/null @@ -1,30 +0,0 @@ -internalAddGeneratedFile( - ' - -google/chat/v1/group.protogoogle.chat.v1" -Group -name ( B -com.google.chat.v1B -GroupProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/HistoryState.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/HistoryState.php deleted file mode 100644 index 7ddf20031fdd6920dcc6cfb9a957c8a523c9f7fc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 851 zcmah{-HH=27`46dA}edHAb25s>cVzqol?9@tspkM7OUy?G4YhP&dn58(OcVLntF# zmP3j^=)!bHi%u6Invy(+OUE#?1n4^g^T{GkIR(pUjuW0QdB!y- zDgS1q_aGr@&J4kQY*J)YbCH2a+)gJ7ngm!zgdE{rBsf?u2kmXcy zX;umi6yr71)tlK$>+Ei-oJNfAiR^(^1v{J$pqMUH)-82gf?f4jDtr5Z-|6VD zR@K7}7Xg)?q`|Ig=+^98=5vmG7qdvH;p{7ZU_xG5=lfxn98;7;8=QI_?s)CAb zdo5gwh~y?nR-=r&?)XtZ8eRqc&@a1h>rY*FyuOsVX9MIdI=}YSD6-|q1! diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/MatchedUrl.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/MatchedUrl.php deleted file mode 100644 index bcea53750339..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/MatchedUrl.php +++ /dev/null @@ -1,31 +0,0 @@ -internalAddGeneratedFile( - ' - - google/chat/v1/matched_url.protogoogle.chat.v1" - -MatchedUrl -url ( BAB -com.google.chat.v1BMatchedUrlProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Membership.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Membership.php deleted file mode 100644 index 1aede18ab0240dbd530cdfc53955fd9f890339e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2784 zcmb_e&2HO95RPP9u}6k2FsZG$MZHym#4ZvEa)K71;}n!7D+*#+kYxich!PaFk`|#z zmP@)#4ZlO5peTAO`Y3%0UwX;Cm!7&mBqjgBDq3Ge@6IMq=)pr&#}4+* z0QXS$Jqm^xdA=LCmTRMK*zaQ>S?J z4b7l*QZ9|~sEd6%BwkVY0&vU`rk-hGRBu)GabWh$z|`vkrtdPCeq7!Luxyi3w4cD? z6cGFK!mdp$L<2KmKaU7Ch(iKm+T=$T^$zNrHpL8n)wUlxRzO?_alnCN;f+lseRA7J zp382zgW^D1{Nn7=dcz5@@0hk;#nkeN7r1_lnX2jl2MJw#Wn(ismb)W;v>{_u)hj{n zpui9DiAY;CpSUcILg-4s3X?7AQOuqra>AMewqUq7nM?mSzeF%6iRI@R384VA^23pF9T$u(;}<+ z(gfrc%yDJoe41gFwmvUjymoPHI`MhP5tW&9ZAN(sv%YKN{9OUxoC@A%0FF*6k0CP> zJt05C@Y${Vm+@R`ukR?&U{R22MAmb{`lHL%LeI?nOUPP2W-%I^u>7pBUW=_`Hj9a< zDw%U_j>p4*J#6C`I6p10@GUHlnG*CU2tL`b?N@5;!`F?LaoEv1HRGsx*sAR|_8PTn z?v4VGd2`TcvhS3Vg}aUBaihcjNh>*6WX;&n4Cx>@Q|Q3b*gxk_S%;4&+_w+jUiQ8W zS+N@VNO7-nL2GLDT056ks~$0zW~Bb1umO41n>=!87Ew$e%-a;(@4 zvo|7+VOkcZG|zQ2U-+4Yc;vA`g|CKq@hDzMQyldIvZ3%NiuZDWiQbY1cyoZf4CV`e zreNhQp}{yj+WwCeuE2t44zNMlWEBC<$qHNr5bJ^a4m+X>7v#o0$n=TLrllY)TFgV1 z4&Cn!QH(U7;n7O-2e2r1h;u^Ni$nB-XzRK}@XDGm3}N-kHL2%16f2BUDJq_F%JedG zdm=K*Dl9wrhrpP)67OpZg+AP`;|V@vI$vDqn2{cDEs5)HBr``~wJI9OICcO3QT$5t zmETgJux1{2wWtg#6Md+~Up=kVH%~3w4SR_p8vp}WKIzy*U^9tBz3#UB`8A!be%;hs z4T1hWeXlOwaz)MaXmOVh!{hQF@v5%#WnDh>*h}w2dPSP6D&J654p7zOayKKY;Q5ne b5{>6Ip#H^bAr| zdXCexNWnPLgTnDfp-+5Y?~yzc1Yqm9;OYiZwi~5g66jq$&^z0Vr&C6r&eM(i0EVUe zzOu`C;Wa4u=Y|KCX()c62l!bvea*DZz|<}C52)`07*w z?T*4_QrcD5LHiykkroYVGMd||*#Yrv-Re|`Z+NB~I9>xui^U!ZVn@-HwL9WiD$YDq z*0_$v;)s$Dl)wwg;OUCuks$Q!`%G^t;57c#Im1V)Yj(CwVs%U8NIy0muULF%)jJ{Y zV{H-x=)RAkD`nbR(UCC$|=QmY}$vkmQLJ z7TZayeVV5lb|jjpf@UQlg7q4)7de~;fI2k9loMN#Zmdfo_7@H*#AuGo}cl z?BN8tUjU{=!;)rUf;KuirKHwoq&txIiQOfhJcj>gHka~T$tV-@H1|v6Z`5(=9%Kx( zIv^SqFOM_&m54q%J0E9mDg8#Be50nM?;(rc2(-|}hAOzPew3S?`76k+1oI4jNnkhOTp?9>65cU0ei_p!} zmQxy&Q_?z2Gj{EGQ@+9^#14riAnh|VII49ev__9J-Iw8P1~n$(D&B&0aD!KNta;`hY{;QH(qdO%rPhZ01Ki}vD{t9_K7^t#C(wy z!y6{{YDPs>oRC&vPWO5t?PXl(0u{>D|251F6@$FUbhG1~Xs^sJ4z#|!&X{kEFh_*X z7+taaR(%N9SmkjT!~W&x5rqpvN9iUj5x?-7eNUq+04@llPjfdQGoX}|h4IicIb1Rg zbAKL#%V%0HZ46>-=}Sb-|EkwNtk7BD$e}pS+%uq+f@AUL)LZqBaOW&@&sOirM~yG= z3`j(@@R~1=B*tm(C8P!X4EL3*0HUg1kQ3G`7#yUE58tW}u&n5ukqD8Hb0eW77lQ%f zKTdQ1nSl9W5R!gGz&~+$Pn+NTW;9Lcs2f36KKju{78=nB9%GBOK&Iw|gs9cU>zmWl zcvXvbH-cIfM#RaEwhEf@Ow>vf=36+huu-`dkiL&q zK55b)n2xkvZA3D4*Tp=iL)h^~{vD6)hQYwU$hqN9P(+G?rW)oe*{NI$7Sv%dk-me>K^O#%ty!iY2*<<_H01FT zquW8UN0&;|kmfm)+k(Yy5{P1Il9wSmc@!hYK86vw-@+1uZ1R7LlICC%harQoFiq$F znt~;s4hhkBVXDttoiO}rG9v^7&D1fe02!Y2Y%CSCzmkG?H(%< z)^=05e~iOYnN6ArrM`uQclr1 z7BS7^L8R?}ify6wDd{Iz63*f?gyy)knB-|BncuvZ^xRptREPZBpVN% zi4V>F38YaT90CZ*mYSyd}o zeamopn6lo~w$$2Ab}aWx3O=JLFSPKZ1iw&}7GcJvbCr(|W-NUsv5J8$1rc+D2(sBu9h3TQ*WZts9mTc4I0W%z6%gj>Sohz9ZmV;2zxPpTCb~ zD$n=SMvZa*YwWXa_7s~}X|pTS3F7I-zoXSohc0*cJ1ss3z8$;5$%{q0Q7lr1V)5z5 kL7L4|-`{6wca7z$cWSC7~`97)+!X71nZERcJ$~>==@$EwKVb0&QiD*JEesdS|;c z8$pq|=7K98fs0=77+m%#xaJXh#r*7U9EU_m_06o$oHOV9zB%X2onNBe2(F`b5|S7T z(nH-BNbC|6#Y`}t1*n_!`y@s_8%8uBv4c=+3q9C+gzmLAA6=87oF%bOTr^;85RjU` zi$!g(UW*C#1!bY5PXY+>knjlm1g*E5zY~FbSYU5m2YG8U$lIx}0Qdps9Brq;@Dh;x zMM*cHKH>rkxhzuNp&=C%2lQ`=cop?=z=;e#?AuR5jRL8Ft11o8LpxX zMq81VguTsBkT}GF*CO1HX(U+OmaeWlAR?DaS*kbEwCXt8M^%H-bq|4DMIuhfcy@$h zB9b^<(YVzCqx{SJf=G>sdiN;_dQGy6_b7{9cc0b%AxDL7lk}#(Ix4*t?=dGwW(8SE6NZs6_syg1(!&a zW~=hSf|FSZ*{5Jy)n3^`R<&e%OE9fG%LVy&Zh780n9xyNo5hcfqP+++WXPV;a#4FO zOnTl^o9>fOjUD)2!!;*Kq}-9+Qp*AStjnI)Ug~vJlYPMPfJj67HOiYs+OobGRXQ-E zbJ*wLL=sY;^->ZWQ}%5* zZsip$tVxp~S-NfVS33pufWfKo<}OI?cc9**QEbDjywbI}<~tSY8d`4tvgBp`=1Umow8W~%t{h2H$f z0$W!8gv!ltGC}otZCg)o`T-x!X8d1cZH8m!7>i=d|&r@d4yeINO`Bb=I++9~~xULFt-JN=ORzFKWF69&IrkT%U QinternalAddGeneratedFile( - ' - -"google/chat/v1/slash_command.protogoogle.chat.v1"" - SlashCommand - -command_id (B -com.google.chat.v1BSlashCommandProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Space.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/Space.php deleted file mode 100644 index 5504f5780ffdd9120a567312053453a8169b86e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4890 zcmb_g-EQ015sqZbu}6+9AKQtn7#l{-Hcq=M*WQc8DotBTqHS%hA4sy%6aolZJhr%@ zNS36s>n?(#1qu{>jP|Zi(d)iMbG;AHi(Ylk98#8KC5;!W8%gBMH*>!EIdjg>f9VZ8 z_>pqN9qt<;HCs{^2&qWRlNyBY5>abh{R&OlS$jg59U^??;e-cY?Bvd{-37TYSBr-;QJr&)V}N_GB*S3o|eSNs%tXALV;K zt_8||%&NT$5j=f}OhhP;B9yU27%x`}6#labDJlfE3X7tAatS4|yTbNhF}(74E{Xp# z2l?W(<3&;_c2T07$|c^a3+yuhsyv<4fYct%S0iPi%N_v>ECV{OE zif!&5`LQz#Fj*rk2We~Qxqhe*U6bds@$wSvb4d4*u#oE_)VX!?W*omb4~pZoFE71S zQ-bO*Ad77=)D3KBuOn^tf3=B&9auBWq2*xH#PqanBzzDKm=ov2;ZUOPeFyYSKv5Tn_A7WWkpVjY#~OW`t{x`TzsC z99br}k(z+I!AkxV)@DM)eheRdARyi8$@NN z^8ZXgW;$x@*RUD~U9>&&DRc0%`CLuw7NfsHPeyqQmW`2VaonSG)GjC~3SUBcLX_=5 zPOVh5PDk%_)vl(WHaab>Qah|^)$ARXhP$nH?F?UJ6D$j>)mo?0Jk#20`9#Ym^M76f zb~6W96Sk2Jcl`mYf2yVp3Yy?4YcDse@P_Rm#~S2Z(UsJGNI$@eeT&;*H~g- zy3NY&B20M)^0>#pBcI9-U`uQYH*%xA4r}^!oXcCVA!>9cX5|d5#s&ocWd_;!f6Qe$ z3mJWi7s8)jUj7i)ZzM48U0Lb9ABYU0{aFkh%edRGjSD1tArgAIP=rOA7d9c=ec75V z%4Jw=H=A{=$R$Wt>)B-C3|6SMky0M+cUo#i)90wJ;PfNjp>77?sNFnm>6K%(n@utX znQE=ARl0f|yMcP7Wfuy6O2CE$o|**M$M85ZaopC_YOQfJw|i{CdY1&WY7E*zOSmes zJo$71$=En;+!S9d`~h~}x8txP{G`>^s@h?#fru@wU9WXIwPr)_Xx%Ql)|u&PXsFUW zIZ?~aw%R4Rh>`oi)JCIu+NfxCtjI`CX4;FtwV z z=nOY}7d!QG;g6#5xZ(E))8U+_A$!UCWS~VCNnu4###o*h7^E=c{43h0XdFy3928vN z6z7pE+Ir}5qVN@LPP_2Kgk885x;Qq=oD^=Q3OcYVxA_eBKVUM{Az#6(7Ga`B2Z^a5 z-_}r}0uSfHMHD^xpmP2@W*l~rnOZLcxz-XlC#}S9Kk3`<$Q;XH)46ozWe|2DybltU z;hjI1Uw=!ct1laBt47-YNNya_RZvmIU9DIVhw!ugf5lIGJ@L3F?}_lD=)2^7DPAgx s7p0O=D3#9k&zC57KYKbp{C^^^UM6m8#4+9K&$*=`NqLv@2HpVt4>2b0W&i*H diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceEvent.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceEvent.php deleted file mode 100644 index 28b3baeaed4a5528b3cbcc9376a7b039bc9e9bf7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3151 zcma);-EJF26vuHw1DU3cx`ouZw4FFDaZ$R)1#z(?jvx;eC)0__BeKKHX5Jvn{)o>?4I-0H*`S34y@w|8)Tz>r2E553Tbol&ocBj|-gN_-sI5FVYt?@wCr+0k)pTez}t6nWTz{V?qNxali zDE{cE;}Z`uj<|R{B&~&?>!4e+P@HOB)wXS_vyE*Y#5Ss#MSqlel9Dzk{(S?0N!MB%;9c49`5erZ z)-4+V4V7N`RdIIxX~B*oOptb}l4Yg#7Zm5$6r%wOLPUo8xa~z)zODNGYRmU1zoD4! zZUT+dwj0{zP6A;=cE zuTff71Mr>#erg0NQ4Q3W;NB1qJ2+wkLQS>0Wrj9VCqtz!Lk*Eyi=c)`TbCj=ROlc1 z(q4Z$lm8@CLxFw-JDL3FcI*R%E>BB4LCv9^q7nD;!`5eDL&>BiVIrv2 z?7&WD>qHpq4%iIvFI+4QA{u@5in{9e9I!+wruwC}Iq_9XQZx5@&-24kH#HRH>xX)u z7WEV>wY-&f_VweBmD_c-IonlAnSCgioU_WG$*JqgV^^=$Vy}L?vZc)(NB-bA(!p`g fDxEd8eSE%~u2_3|NzLrEbN5+gskhEC7z6M>eY+f8 diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceReadState.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceReadState.php deleted file mode 100644 index 40bb79eed855..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceReadState.php +++ /dev/null @@ -1,41 +0,0 @@ -internalAddGeneratedFile( - ' - -%google/chat/v1/space_read_state.protogoogle.chat.v1google/api/resource.proto google/protobuf/field_mask.protogoogle/protobuf/timestamp.proto" -SpaceReadState -name ( 7 -last_read_time ( 2.google.protobuf.TimestampBA:cA` -"chat.googleapis.com/SpaceReadState*users/{user}/spaces/{space}/spaceReadState2spaceReadState"T -GetSpaceReadStateRequest8 -name ( B*AA$ -"chat.googleapis.com/SpaceReadState" -UpdateSpaceReadStateRequest= -space_read_state ( 2.google.chat.v1.SpaceReadStateBA4 - update_mask ( 2.google.protobuf.FieldMaskBAB -com.google.chat.v1BSpaceReadStateProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceSetup.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceSetup.php deleted file mode 100644 index ee6cbcbaa165..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/SpaceSetup.php +++ /dev/null @@ -1,35 +0,0 @@ -internalAddGeneratedFile( - ' - - google/chat/v1/space_setup.protogoogle.chat.v1google/chat/v1/membership.protogoogle/chat/v1/space.proto" -SetUpSpaceRequest) -space ( 2.google.chat.v1.SpaceBA - -request_id ( BA4 - memberships ( 2.google.chat.v1.MembershipBAB -com.google.chat.v1BSpaceSetupProtoPZ,cloud.google.com/go/chat/apiv1/chatpb;chatpb DYNAPIProtoGoogle.Apps.Chat.V1Google\\Apps\\Chat\\V1Google::Apps::Chat::V1bproto3' - , true); - - static::$is_initialized = true; - } -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ThreadReadState.php b/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ThreadReadState.php deleted file mode 100644 index d8c72b7e4905..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/GPBMetadata/Google/Chat/V1/ThreadReadState.php +++ /dev/null @@ -1,37 +0,0 @@ -internalAddGeneratedFile( - ' - -&google/chat/v1/thread_read_state.protogoogle.chat.v1google/api/resource.protogoogle/protobuf/timestamp.proto" -ThreadReadState -name ( 2 -last_read_time ( 2.google.protobuf.Timestamp:wAt -#chat.googleapis.com/ThreadReadStateH72Fj0I6gCP?YBnLm?f{c4JCoU25;VL_ zFTL>EXYeV!_9>j%1zK(4X4!Ag`F_uN_kqticnLcsAOcI`!SNEx8G&3d$z0~caWt6_ z0bMrd)F;A%u-S*b{s6X`-N6e*4Ot{yg5Z>~sZYx849oJOQjS6ejz=orv#su3+IFV~GU)nqb87+^z0gY1DEPz9ghTO-?Q5;R_Xe0f*o;DwYtjFe< z1|#a__hYnE1R1&HB)_L#kKPolf9qSifHhD6omZ&`2P|05Srq0E6yaf<_xLr)#E_>T zH@LD}qhar}-8%2KyRByKftdw+ABPw9Ud}KNK)TT%y*5eJt8f=?8S(b@$zO=2B9e1Qm?d8_L5ubI+Waxtz~F4^Kk4E$?%mM^3`W z^6*qnPPiOKK@yAtPaaN>j(8-Gf=TFlJgUfYLzla{C94h1x{1&@m_{RBm5+nq*yFpS z6DQeyvA6rRJ3i(~ToHi)d}qSr&>3-g->7wX;*6cd8SD$pppKY9fA2BC$aCUY{xZeF zcOc_mI30TKNRAUH!N(mpwq4&%T*q_2MZQnuBgcz5V&C>Xn);)}4SbmZxQ9L{onDbXksgGL8Jlf;R~x0Zr6@uOOZ98CEWJwR1X)?IG^biW2!ja$?uptz& zXAx3ic9sSZ!ptMovdHZ;1bKqk)5sI&7SMJP3P}*!o-^d0C}%<1h8%h&+)qktSl@zl z4KB_M_GIcMuIKu^RKQnx=`w5#1FYy|7GYfg&L)@@Epn~|rH>#x6Fw(U=V^~trk2A# zMuKszkTQ<~uY3aQqA-+TT2jiIrljy+^`~T=IOL4E=S7#b-m z%vlZ7Hawq(I2?3$r=?p+Q~o{!xmh1cpF-9V_w4y5q!~mLMff8v9RDEXzKuOFZ{FqO zucLPxom&@ZHs~u-z6$xdRVu>jqA=y3GXSqnlgc2aJnacjPJ*#55=(1%06>=?zTi=e z-AuR1CrgLmRp3gR4PAu-Uw#1FZ`y9(HP~Y10vGLjuS)^mZFTTR5V{hT5x}nn8~2U5cW16s^rbx&+&5 zU+r49p_)zI?5HNYENua##-6HJ>>a!cwwi5izh&8qX=;6?%@}1fvo%yhF|9*WW!n_F zrCVy7Wht`wX`8yBx>s3G`Z;!AgYg9JVdZ zXsbv~#|M)ry54Le#rG%>GVWnIMKT*L9rfEJn5p(G<tI0ULAr9`&h^*ImDIgjr5DvI0jkyh-Y_dRw?}su Y%f|h5hdHzI{Oh_SJk!nQCAgoogle.chat.v1.AccessoryWidget - */ -class AccessoryWidget extends \Google\Protobuf\Internal\Message -{ - protected $action; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Card\V1\ButtonList $button_list - * A list of buttons. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * A list of buttons. - * - * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 1; - * @return \Google\Apps\Card\V1\ButtonList|null - */ - public function getButtonList() - { - return $this->readOneof(1); - } - - public function hasButtonList() - { - return $this->hasOneof(1); - } - - /** - * A list of buttons. - * - * Generated from protobuf field .google.apps.card.v1.ButtonList button_list = 1; - * @param \Google\Apps\Card\V1\ButtonList $var - * @return $this - */ - public function setButtonList($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\ButtonList::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * @return string - */ - public function getAction() - { - return $this->whichOneof("action"); - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse.php deleted file mode 100644 index ab29fb67f3d4..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse.php +++ /dev/null @@ -1,201 +0,0 @@ -google.chat.v1.ActionResponse - */ -class ActionResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. The type of Chat app response. - * - * Generated from protobuf field .google.chat.v1.ActionResponse.ResponseType type = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $type = 0; - /** - * Input only. URL for users to authenticate or configure. (Only for - * `REQUEST_CONFIG` response types.) - * - * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $url = ''; - /** - * Input only. A response to an interaction event related to a - * [dialog](https://developers.google.com/workspace/chat/dialogs). Must be - * accompanied by `ResponseType.Dialog`. - * - * Generated from protobuf field .google.chat.v1.DialogAction dialog_action = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $dialog_action = null; - /** - * Input only. The response of the updated widget. - * - * Generated from protobuf field .google.chat.v1.ActionResponse.UpdatedWidget updated_widget = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $updated_widget = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * Input only. The type of Chat app response. - * @type string $url - * Input only. URL for users to authenticate or configure. (Only for - * `REQUEST_CONFIG` response types.) - * @type \Google\Apps\Chat\V1\DialogAction $dialog_action - * Input only. A response to an interaction event related to a - * [dialog](https://developers.google.com/workspace/chat/dialogs). Must be - * accompanied by `ResponseType.Dialog`. - * @type \Google\Apps\Chat\V1\ActionResponse\UpdatedWidget $updated_widget - * Input only. The response of the updated widget. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Input only. The type of Chat app response. - * - * Generated from protobuf field .google.chat.v1.ActionResponse.ResponseType type = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * Input only. The type of Chat app response. - * - * Generated from protobuf field .google.chat.v1.ActionResponse.ResponseType type = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\ActionResponse\ResponseType::class); - $this->type = $var; - - return $this; - } - - /** - * Input only. URL for users to authenticate or configure. (Only for - * `REQUEST_CONFIG` response types.) - * - * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Input only. URL for users to authenticate or configure. (Only for - * `REQUEST_CONFIG` response types.) - * - * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - - /** - * Input only. A response to an interaction event related to a - * [dialog](https://developers.google.com/workspace/chat/dialogs). Must be - * accompanied by `ResponseType.Dialog`. - * - * Generated from protobuf field .google.chat.v1.DialogAction dialog_action = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Apps\Chat\V1\DialogAction|null - */ - public function getDialogAction() - { - return $this->dialog_action; - } - - public function hasDialogAction() - { - return isset($this->dialog_action); - } - - public function clearDialogAction() - { - unset($this->dialog_action); - } - - /** - * Input only. A response to an interaction event related to a - * [dialog](https://developers.google.com/workspace/chat/dialogs). Must be - * accompanied by `ResponseType.Dialog`. - * - * Generated from protobuf field .google.chat.v1.DialogAction dialog_action = 3 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Apps\Chat\V1\DialogAction $var - * @return $this - */ - public function setDialogAction($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DialogAction::class); - $this->dialog_action = $var; - - return $this; - } - - /** - * Input only. The response of the updated widget. - * - * Generated from protobuf field .google.chat.v1.ActionResponse.UpdatedWidget updated_widget = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Apps\Chat\V1\ActionResponse\UpdatedWidget|null - */ - public function getUpdatedWidget() - { - return $this->updated_widget; - } - - public function hasUpdatedWidget() - { - return isset($this->updated_widget); - } - - public function clearUpdatedWidget() - { - unset($this->updated_widget); - } - - /** - * Input only. The response of the updated widget. - * - * Generated from protobuf field .google.chat.v1.ActionResponse.UpdatedWidget updated_widget = 4 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Apps\Chat\V1\ActionResponse\UpdatedWidget $var - * @return $this - */ - public function setUpdatedWidget($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ActionResponse\UpdatedWidget::class); - $this->updated_widget = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/ResponseType.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/ResponseType.php deleted file mode 100644 index cc00e73c7d90..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/ResponseType.php +++ /dev/null @@ -1,96 +0,0 @@ -google.chat.v1.ActionResponse.ResponseType - */ -class ResponseType -{ - /** - * Default type that's handled as `NEW_MESSAGE`. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Post as a new message in the topic. - * - * Generated from protobuf enum NEW_MESSAGE = 1; - */ - const NEW_MESSAGE = 1; - /** - * Update the Chat app's message. This is only permitted on a `CARD_CLICKED` - * event where the message sender type is `BOT`. - * - * Generated from protobuf enum UPDATE_MESSAGE = 2; - */ - const UPDATE_MESSAGE = 2; - /** - * Update the cards on a user's message. This is only permitted as a - * response to a `MESSAGE` event with a matched url, or a `CARD_CLICKED` - * event where the message sender type is `HUMAN`. Text is ignored. - * - * Generated from protobuf enum UPDATE_USER_MESSAGE_CARDS = 6; - */ - const UPDATE_USER_MESSAGE_CARDS = 6; - /** - * Privately ask the user for additional authentication or configuration. - * - * Generated from protobuf enum REQUEST_CONFIG = 3; - */ - const REQUEST_CONFIG = 3; - /** - * Presents a - * [dialog](https://developers.google.com/workspace/chat/dialogs). - * - * Generated from protobuf enum DIALOG = 4; - */ - const DIALOG = 4; - /** - * Widget text autocomplete options query. - * - * Generated from protobuf enum UPDATE_WIDGET = 7; - */ - const UPDATE_WIDGET = 7; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::NEW_MESSAGE => 'NEW_MESSAGE', - self::UPDATE_MESSAGE => 'UPDATE_MESSAGE', - self::UPDATE_USER_MESSAGE_CARDS => 'UPDATE_USER_MESSAGE_CARDS', - self::REQUEST_CONFIG => 'REQUEST_CONFIG', - self::DIALOG => 'DIALOG', - self::UPDATE_WIDGET => 'UPDATE_WIDGET', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ResponseType::class, \Google\Apps\Chat\V1\ActionResponse_ResponseType::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/SelectionItems.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/SelectionItems.php deleted file mode 100644 index b51465c4205f..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/SelectionItems.php +++ /dev/null @@ -1,70 +0,0 @@ -google.chat.v1.ActionResponse.SelectionItems - */ -class SelectionItems extends \Google\Protobuf\Internal\Message -{ - /** - * An array of the SelectionItem objects. - * - * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 1; - */ - private $items; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Card\V1\SelectionInput\SelectionItem>|\Google\Protobuf\Internal\RepeatedField $items - * An array of the SelectionItem objects. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * An array of the SelectionItem objects. - * - * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getItems() - { - return $this->items; - } - - /** - * An array of the SelectionItem objects. - * - * Generated from protobuf field repeated .google.apps.card.v1.SelectionInput.SelectionItem items = 1; - * @param array<\Google\Apps\Card\V1\SelectionInput\SelectionItem>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setItems($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Card\V1\SelectionInput\SelectionItem::class); - $this->items = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SelectionItems::class, \Google\Apps\Chat\V1\ActionResponse_SelectionItems::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/UpdatedWidget.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/UpdatedWidget.php deleted file mode 100644 index f07309fbfb7e..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionResponse/UpdatedWidget.php +++ /dev/null @@ -1,117 +0,0 @@ -google.chat.v1.ActionResponse.UpdatedWidget - */ -class UpdatedWidget extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the updated widget. The ID must match the one for the - * widget that triggered the update request. - * - * Generated from protobuf field string widget = 2; - */ - protected $widget = ''; - protected $updated_widget; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\ActionResponse\SelectionItems $suggestions - * List of widget autocomplete results - * @type string $widget - * The ID of the updated widget. The ID must match the one for the - * widget that triggered the update request. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * List of widget autocomplete results - * - * Generated from protobuf field .google.chat.v1.ActionResponse.SelectionItems suggestions = 1; - * @return \Google\Apps\Chat\V1\ActionResponse\SelectionItems|null - */ - public function getSuggestions() - { - return $this->readOneof(1); - } - - public function hasSuggestions() - { - return $this->hasOneof(1); - } - - /** - * List of widget autocomplete results - * - * Generated from protobuf field .google.chat.v1.ActionResponse.SelectionItems suggestions = 1; - * @param \Google\Apps\Chat\V1\ActionResponse\SelectionItems $var - * @return $this - */ - public function setSuggestions($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ActionResponse\SelectionItems::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The ID of the updated widget. The ID must match the one for the - * widget that triggered the update request. - * - * Generated from protobuf field string widget = 2; - * @return string - */ - public function getWidget() - { - return $this->widget; - } - - /** - * The ID of the updated widget. The ID must match the one for the - * widget that triggered the update request. - * - * Generated from protobuf field string widget = 2; - * @param string $var - * @return $this - */ - public function setWidget($var) - { - GPBUtil::checkString($var, True); - $this->widget = $var; - - return $this; - } - - /** - * @return string - */ - public function getUpdatedWidget() - { - return $this->whichOneof("updated_widget"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(UpdatedWidget::class, \Google\Apps\Chat\V1\ActionResponse_UpdatedWidget::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionStatus.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionStatus.php deleted file mode 100644 index 687ef00ac63c..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ActionStatus.php +++ /dev/null @@ -1,106 +0,0 @@ -google.chat.v1.ActionStatus - */ -class ActionStatus extends \Google\Protobuf\Internal\Message -{ - /** - * The status code. - * - * Generated from protobuf field .google.rpc.Code status_code = 1; - */ - protected $status_code = 0; - /** - * The message to send users about the status of their request. - * If unset, a generic message based on the `status_code` is sent. - * - * Generated from protobuf field string user_facing_message = 2; - */ - protected $user_facing_message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $status_code - * The status code. - * @type string $user_facing_message - * The message to send users about the status of their request. - * If unset, a generic message based on the `status_code` is sent. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\ActionStatus::initOnce(); - parent::__construct($data); - } - - /** - * The status code. - * - * Generated from protobuf field .google.rpc.Code status_code = 1; - * @return int - */ - public function getStatusCode() - { - return $this->status_code; - } - - /** - * The status code. - * - * Generated from protobuf field .google.rpc.Code status_code = 1; - * @param int $var - * @return $this - */ - public function setStatusCode($var) - { - GPBUtil::checkEnum($var, \Google\Rpc\Code::class); - $this->status_code = $var; - - return $this; - } - - /** - * The message to send users about the status of their request. - * If unset, a generic message based on the `status_code` is sent. - * - * Generated from protobuf field string user_facing_message = 2; - * @return string - */ - public function getUserFacingMessage() - { - return $this->user_facing_message; - } - - /** - * The message to send users about the status of their request. - * If unset, a generic message based on the `status_code` is sent. - * - * Generated from protobuf field string user_facing_message = 2; - * @param string $var - * @return $this - */ - public function setUserFacingMessage($var) - { - GPBUtil::checkString($var, True); - $this->user_facing_message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Annotation.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Annotation.php deleted file mode 100644 index 7c9e10fdc422..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Annotation.php +++ /dev/null @@ -1,285 +0,0 @@ -google.chat.v1.Annotation - */ -class Annotation extends \Google\Protobuf\Internal\Message -{ - /** - * The type of this annotation. - * - * Generated from protobuf field .google.chat.v1.AnnotationType type = 1; - */ - protected $type = 0; - /** - * Start index (0-based, inclusive) in the plain-text message body this - * annotation corresponds to. - * - * Generated from protobuf field optional int32 start_index = 2; - */ - protected $start_index = null; - /** - * Length of the substring in the plain-text message body this annotation - * corresponds to. - * - * Generated from protobuf field int32 length = 3; - */ - protected $length = 0; - protected $metadata; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $type - * The type of this annotation. - * @type int $start_index - * Start index (0-based, inclusive) in the plain-text message body this - * annotation corresponds to. - * @type int $length - * Length of the substring in the plain-text message body this annotation - * corresponds to. - * @type \Google\Apps\Chat\V1\UserMentionMetadata $user_mention - * The metadata of user mention. - * @type \Google\Apps\Chat\V1\SlashCommandMetadata $slash_command - * The metadata for a slash command. - * @type \Google\Apps\Chat\V1\RichLinkMetadata $rich_link_metadata - * The metadata for a rich link. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); - parent::__construct($data); - } - - /** - * The type of this annotation. - * - * Generated from protobuf field .google.chat.v1.AnnotationType type = 1; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of this annotation. - * - * Generated from protobuf field .google.chat.v1.AnnotationType type = 1; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\AnnotationType::class); - $this->type = $var; - - return $this; - } - - /** - * Start index (0-based, inclusive) in the plain-text message body this - * annotation corresponds to. - * - * Generated from protobuf field optional int32 start_index = 2; - * @return int - */ - public function getStartIndex() - { - return isset($this->start_index) ? $this->start_index : 0; - } - - public function hasStartIndex() - { - return isset($this->start_index); - } - - public function clearStartIndex() - { - unset($this->start_index); - } - - /** - * Start index (0-based, inclusive) in the plain-text message body this - * annotation corresponds to. - * - * Generated from protobuf field optional int32 start_index = 2; - * @param int $var - * @return $this - */ - public function setStartIndex($var) - { - GPBUtil::checkInt32($var); - $this->start_index = $var; - - return $this; - } - - /** - * Length of the substring in the plain-text message body this annotation - * corresponds to. - * - * Generated from protobuf field int32 length = 3; - * @return int - */ - public function getLength() - { - return $this->length; - } - - /** - * Length of the substring in the plain-text message body this annotation - * corresponds to. - * - * Generated from protobuf field int32 length = 3; - * @param int $var - * @return $this - */ - public function setLength($var) - { - GPBUtil::checkInt32($var); - $this->length = $var; - - return $this; - } - - /** - * The metadata of user mention. - * - * Generated from protobuf field .google.chat.v1.UserMentionMetadata user_mention = 4; - * @return \Google\Apps\Chat\V1\UserMentionMetadata|null - */ - public function getUserMention() - { - return $this->readOneof(4); - } - - public function hasUserMention() - { - return $this->hasOneof(4); - } - - /** - * The metadata of user mention. - * - * Generated from protobuf field .google.chat.v1.UserMentionMetadata user_mention = 4; - * @param \Google\Apps\Chat\V1\UserMentionMetadata $var - * @return $this - */ - public function setUserMention($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\UserMentionMetadata::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * The metadata for a slash command. - * - * Generated from protobuf field .google.chat.v1.SlashCommandMetadata slash_command = 5; - * @return \Google\Apps\Chat\V1\SlashCommandMetadata|null - */ - public function getSlashCommand() - { - return $this->readOneof(5); - } - - public function hasSlashCommand() - { - return $this->hasOneof(5); - } - - /** - * The metadata for a slash command. - * - * Generated from protobuf field .google.chat.v1.SlashCommandMetadata slash_command = 5; - * @param \Google\Apps\Chat\V1\SlashCommandMetadata $var - * @return $this - */ - public function setSlashCommand($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SlashCommandMetadata::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * The metadata for a rich link. - * - * Generated from protobuf field .google.chat.v1.RichLinkMetadata rich_link_metadata = 6; - * @return \Google\Apps\Chat\V1\RichLinkMetadata|null - */ - public function getRichLinkMetadata() - { - return $this->readOneof(6); - } - - public function hasRichLinkMetadata() - { - return $this->hasOneof(6); - } - - /** - * The metadata for a rich link. - * - * Generated from protobuf field .google.chat.v1.RichLinkMetadata rich_link_metadata = 6; - * @param \Google\Apps\Chat\V1\RichLinkMetadata $var - * @return $this - */ - public function setRichLinkMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\RichLinkMetadata::class); - $this->writeOneof(6, $var); - - return $this; - } - - /** - * @return string - */ - public function getMetadata() - { - return $this->whichOneof("metadata"); - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AnnotationType.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AnnotationType.php deleted file mode 100644 index c9b09b768c19..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AnnotationType.php +++ /dev/null @@ -1,68 +0,0 @@ -google.chat.v1.AnnotationType - */ -class AnnotationType -{ - /** - * Default value for the enum. Don't use. - * - * Generated from protobuf enum ANNOTATION_TYPE_UNSPECIFIED = 0; - */ - const ANNOTATION_TYPE_UNSPECIFIED = 0; - /** - * A user is mentioned. - * - * Generated from protobuf enum USER_MENTION = 1; - */ - const USER_MENTION = 1; - /** - * A slash command is invoked. - * - * Generated from protobuf enum SLASH_COMMAND = 2; - */ - const SLASH_COMMAND = 2; - /** - * A rich link annotation. - * - * Generated from protobuf enum RICH_LINK = 3; - */ - const RICH_LINK = 3; - - private static $valueToName = [ - self::ANNOTATION_TYPE_UNSPECIFIED => 'ANNOTATION_TYPE_UNSPECIFIED', - self::USER_MENTION => 'USER_MENTION', - self::SLASH_COMMAND => 'SLASH_COMMAND', - self::RICH_LINK => 'RICH_LINK', - ]; - - 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachedGif.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachedGif.php deleted file mode 100644 index 0856cd583a48..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachedGif.php +++ /dev/null @@ -1,67 +0,0 @@ -google.chat.v1.AttachedGif - */ -class AttachedGif extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The URL that hosts the GIF image. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uri = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * Output only. The URL that hosts the GIF image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The URL that hosts the GIF image. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * Output only. The URL that hosts the GIF image. - * - * Generated from protobuf field string uri = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment.php deleted file mode 100644 index 585adb4fc599..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment.php +++ /dev/null @@ -1,338 +0,0 @@ -google.chat.v1.Attachment - */ -class Attachment extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the attachment, in the form - * `spaces/{space}/messages/{message}/attachments/{attachment}`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The original file name for the content, not the full path. - * - * Generated from protobuf field string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $content_name = ''; - /** - * Output only. The content type (MIME type) of the file. - * - * Generated from protobuf field string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $content_type = ''; - /** - * Output only. The thumbnail URL which should be used to preview the - * attachment to a human user. Chat apps shouldn't use this URL to download - * attachment content. - * - * Generated from protobuf field string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $thumbnail_uri = ''; - /** - * Output only. The download URL which should be used to allow a human user to - * download the attachment. Chat apps shouldn't use this URL to download - * attachment content. - * - * Generated from protobuf field string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $download_uri = ''; - /** - * Output only. The source of the attachment. - * - * Generated from protobuf field .google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $source = 0; - protected $data_ref; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the attachment, in the form - * `spaces/{space}/messages/{message}/attachments/{attachment}`. - * @type string $content_name - * Output only. The original file name for the content, not the full path. - * @type string $content_type - * Output only. The content type (MIME type) of the file. - * @type \Google\Apps\Chat\V1\AttachmentDataRef $attachment_data_ref - * A reference to the attachment data. This field is used with the media API - * to download the attachment data. - * @type \Google\Apps\Chat\V1\DriveDataRef $drive_data_ref - * Output only. A reference to the Google Drive attachment. This field is - * used with the Google Drive API. - * @type string $thumbnail_uri - * Output only. The thumbnail URL which should be used to preview the - * attachment to a human user. Chat apps shouldn't use this URL to download - * attachment content. - * @type string $download_uri - * Output only. The download URL which should be used to allow a human user to - * download the attachment. Chat apps shouldn't use this URL to download - * attachment content. - * @type int $source - * Output only. The source of the attachment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the attachment, in the form - * `spaces/{space}/messages/{message}/attachments/{attachment}`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the attachment, in the form - * `spaces/{space}/messages/{message}/attachments/{attachment}`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The original file name for the content, not the full path. - * - * Generated from protobuf field string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getContentName() - { - return $this->content_name; - } - - /** - * Output only. The original file name for the content, not the full path. - * - * Generated from protobuf field string content_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setContentName($var) - { - GPBUtil::checkString($var, True); - $this->content_name = $var; - - return $this; - } - - /** - * Output only. The content type (MIME type) of the file. - * - * Generated from protobuf field string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getContentType() - { - return $this->content_type; - } - - /** - * Output only. The content type (MIME type) of the file. - * - * Generated from protobuf field string content_type = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setContentType($var) - { - GPBUtil::checkString($var, True); - $this->content_type = $var; - - return $this; - } - - /** - * A reference to the attachment data. This field is used with the media API - * to download the attachment data. - * - * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 4; - * @return \Google\Apps\Chat\V1\AttachmentDataRef|null - */ - public function getAttachmentDataRef() - { - return $this->readOneof(4); - } - - public function hasAttachmentDataRef() - { - return $this->hasOneof(4); - } - - /** - * A reference to the attachment data. This field is used with the media API - * to download the attachment data. - * - * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 4; - * @param \Google\Apps\Chat\V1\AttachmentDataRef $var - * @return $this - */ - public function setAttachmentDataRef($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\AttachmentDataRef::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * Output only. A reference to the Google Drive attachment. This field is - * used with the Google Drive API. - * - * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Apps\Chat\V1\DriveDataRef|null - */ - public function getDriveDataRef() - { - return $this->readOneof(7); - } - - public function hasDriveDataRef() - { - return $this->hasOneof(7); - } - - /** - * Output only. A reference to the Google Drive attachment. This field is - * used with the Google Drive API. - * - * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Apps\Chat\V1\DriveDataRef $var - * @return $this - */ - public function setDriveDataRef($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DriveDataRef::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * Output only. The thumbnail URL which should be used to preview the - * attachment to a human user. Chat apps shouldn't use this URL to download - * attachment content. - * - * Generated from protobuf field string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getThumbnailUri() - { - return $this->thumbnail_uri; - } - - /** - * Output only. The thumbnail URL which should be used to preview the - * attachment to a human user. Chat apps shouldn't use this URL to download - * attachment content. - * - * Generated from protobuf field string thumbnail_uri = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setThumbnailUri($var) - { - GPBUtil::checkString($var, True); - $this->thumbnail_uri = $var; - - return $this; - } - - /** - * Output only. The download URL which should be used to allow a human user to - * download the attachment. Chat apps shouldn't use this URL to download - * attachment content. - * - * Generated from protobuf field string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDownloadUri() - { - return $this->download_uri; - } - - /** - * Output only. The download URL which should be used to allow a human user to - * download the attachment. Chat apps shouldn't use this URL to download - * attachment content. - * - * Generated from protobuf field string download_uri = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDownloadUri($var) - { - GPBUtil::checkString($var, True); - $this->download_uri = $var; - - return $this; - } - - /** - * Output only. The source of the attachment. - * - * Generated from protobuf field .google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSource() - { - return $this->source; - } - - /** - * Output only. The source of the attachment. - * - * Generated from protobuf field .google.chat.v1.Attachment.Source source = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSource($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Attachment\Source::class); - $this->source = $var; - - return $this; - } - - /** - * @return string - */ - public function getDataRef() - { - return $this->whichOneof("data_ref"); - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment/Source.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment/Source.php deleted file mode 100644 index f62db353fa3a..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Attachment/Source.php +++ /dev/null @@ -1,64 +0,0 @@ -google.chat.v1.Attachment.Source - */ -class Source -{ - /** - * Reserved. - * - * Generated from protobuf enum SOURCE_UNSPECIFIED = 0; - */ - const SOURCE_UNSPECIFIED = 0; - /** - * The file is a Google Drive file. - * - * Generated from protobuf enum DRIVE_FILE = 1; - */ - const DRIVE_FILE = 1; - /** - * The file is uploaded to Chat. - * - * Generated from protobuf enum UPLOADED_CONTENT = 2; - */ - const UPLOADED_CONTENT = 2; - - private static $valueToName = [ - self::SOURCE_UNSPECIFIED => 'SOURCE_UNSPECIFIED', - self::DRIVE_FILE => 'DRIVE_FILE', - self::UPLOADED_CONTENT => 'UPLOADED_CONTENT', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Source::class, \Google\Apps\Chat\V1\Attachment_Source::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachmentDataRef.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachmentDataRef.php deleted file mode 100644 index 713e30068a9b..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/AttachmentDataRef.php +++ /dev/null @@ -1,113 +0,0 @@ -google.chat.v1.AttachmentDataRef - */ -class AttachmentDataRef extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the attachment data. This field is used with the media - * API to download the attachment data. - * - * Generated from protobuf field string resource_name = 1; - */ - protected $resource_name = ''; - /** - * Opaque token containing a reference to an uploaded attachment. Treated by - * clients as an opaque string and used to create or update Chat messages with - * attachments. - * - * Generated from protobuf field string attachment_upload_token = 2; - */ - protected $attachment_upload_token = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $resource_name - * The resource name of the attachment data. This field is used with the media - * API to download the attachment data. - * @type string $attachment_upload_token - * Opaque token containing a reference to an uploaded attachment. Treated by - * clients as an opaque string and used to create or update Chat messages with - * attachments. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the attachment data. This field is used with the media - * API to download the attachment data. - * - * Generated from protobuf field string resource_name = 1; - * @return string - */ - public function getResourceName() - { - return $this->resource_name; - } - - /** - * The resource name of the attachment data. This field is used with the media - * API to download the attachment data. - * - * Generated from protobuf field string resource_name = 1; - * @param string $var - * @return $this - */ - public function setResourceName($var) - { - GPBUtil::checkString($var, True); - $this->resource_name = $var; - - return $this; - } - - /** - * Opaque token containing a reference to an uploaded attachment. Treated by - * clients as an opaque string and used to create or update Chat messages with - * attachments. - * - * Generated from protobuf field string attachment_upload_token = 2; - * @return string - */ - public function getAttachmentUploadToken() - { - return $this->attachment_upload_token; - } - - /** - * Opaque token containing a reference to an uploaded attachment. Treated by - * clients as an opaque string and used to create or update Chat messages with - * attachments. - * - * Generated from protobuf field string attachment_upload_token = 2; - * @param string $var - * @return $this - */ - public function setAttachmentUploadToken($var) - { - GPBUtil::checkString($var, True); - $this->attachment_upload_token = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CardWithId.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CardWithId.php deleted file mode 100644 index 3d2235adb173..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CardWithId.php +++ /dev/null @@ -1,121 +0,0 @@ -google.chat.v1.CardWithId - */ -class CardWithId extends \Google\Protobuf\Internal\Message -{ - /** - * Required if the message contains multiple cards. A unique identifier for - * a card in a message. - * - * Generated from protobuf field string card_id = 1; - */ - protected $card_id = ''; - /** - * A card. Maximum size is 32 KB. - * - * Generated from protobuf field .google.apps.card.v1.Card card = 2; - */ - protected $card = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $card_id - * Required if the message contains multiple cards. A unique identifier for - * a card in a message. - * @type \Google\Apps\Card\V1\Card $card - * A card. Maximum size is 32 KB. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Required if the message contains multiple cards. A unique identifier for - * a card in a message. - * - * Generated from protobuf field string card_id = 1; - * @return string - */ - public function getCardId() - { - return $this->card_id; - } - - /** - * Required if the message contains multiple cards. A unique identifier for - * a card in a message. - * - * Generated from protobuf field string card_id = 1; - * @param string $var - * @return $this - */ - public function setCardId($var) - { - GPBUtil::checkString($var, True); - $this->card_id = $var; - - return $this; - } - - /** - * A card. Maximum size is 32 KB. - * - * Generated from protobuf field .google.apps.card.v1.Card card = 2; - * @return \Google\Apps\Card\V1\Card|null - */ - public function getCard() - { - return $this->card; - } - - public function hasCard() - { - return isset($this->card); - } - - public function clearCard() - { - unset($this->card); - } - - /** - * A card. Maximum size is 32 KB. - * - * Generated from protobuf field .google.apps.card.v1.Card card = 2; - * @param \Google\Apps\Card\V1\Card $var - * @return $this - */ - public function setCard($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card::class); - $this->card = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ChatSpaceLinkData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ChatSpaceLinkData.php deleted file mode 100644 index 8efe4c4f2610..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ChatSpaceLinkData.php +++ /dev/null @@ -1,147 +0,0 @@ -google.chat.v1.ChatSpaceLinkData - */ -class ChatSpaceLinkData extends \Google\Protobuf\Internal\Message -{ - /** - * The space of the linked Chat space resource. - * Format: `spaces/{space}` - * - * Generated from protobuf field string space = 1 [(.google.api.resource_reference) = { - */ - protected $space = ''; - /** - * The thread of the linked Chat space resource. - * Format: `spaces/{space}/threads/{thread}` - * - * Generated from protobuf field string thread = 2 [(.google.api.resource_reference) = { - */ - protected $thread = ''; - /** - * The message of the linked Chat space resource. - * Format: `spaces/{space}/messages/{message}` - * - * Generated from protobuf field string message = 3 [(.google.api.resource_reference) = { - */ - protected $message = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $space - * The space of the linked Chat space resource. - * Format: `spaces/{space}` - * @type string $thread - * The thread of the linked Chat space resource. - * Format: `spaces/{space}/threads/{thread}` - * @type string $message - * The message of the linked Chat space resource. - * Format: `spaces/{space}/messages/{message}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); - parent::__construct($data); - } - - /** - * The space of the linked Chat space resource. - * Format: `spaces/{space}` - * - * Generated from protobuf field string space = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getSpace() - { - return $this->space; - } - - /** - * The space of the linked Chat space resource. - * Format: `spaces/{space}` - * - * Generated from protobuf field string space = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setSpace($var) - { - GPBUtil::checkString($var, True); - $this->space = $var; - - return $this; - } - - /** - * The thread of the linked Chat space resource. - * Format: `spaces/{space}/threads/{thread}` - * - * Generated from protobuf field string thread = 2 [(.google.api.resource_reference) = { - * @return string - */ - public function getThread() - { - return $this->thread; - } - - /** - * The thread of the linked Chat space resource. - * Format: `spaces/{space}/threads/{thread}` - * - * Generated from protobuf field string thread = 2 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setThread($var) - { - GPBUtil::checkString($var, True); - $this->thread = $var; - - return $this; - } - - /** - * The message of the linked Chat space resource. - * Format: `spaces/{space}/messages/{message}` - * - * Generated from protobuf field string message = 3 [(.google.api.resource_reference) = { - * @return string - */ - public function getMessage() - { - return $this->message; - } - - /** - * The message of the linked Chat space resource. - * Format: `spaces/{space}/messages/{message}` - * - * Generated from protobuf field string message = 3 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkString($var, True); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceRequest.php deleted file mode 100644 index f6cddab25e0d..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceRequest.php +++ /dev/null @@ -1,71 +0,0 @@ -google.chat.v1.CompleteImportSpaceRequest - */ -class CompleteImportSpaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the import mode space. - * Format: `spaces/{space}` - * - * 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. Resource name of the import mode space. - * Format: `spaces/{space}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the import mode space. - * Format: `spaces/{space}` - * - * 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. Resource name of the import mode space. - * Format: `spaces/{space}` - * - * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceResponse.php deleted file mode 100644 index 500dcf0d0fe4..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CompleteImportSpaceResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.chat.v1.CompleteImportSpaceResponse - */ -class CompleteImportSpaceResponse extends \Google\Protobuf\Internal\Message -{ - /** - * The import mode space. - * - * Generated from protobuf field .google.chat.v1.Space space = 1; - */ - protected $space = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Space $space - * The import mode space. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * The import mode space. - * - * Generated from protobuf field .google.chat.v1.Space space = 1; - * @return \Google\Apps\Chat\V1\Space|null - */ - public function getSpace() - { - return $this->space; - } - - public function hasSpace() - { - return isset($this->space); - } - - public function clearSpace() - { - unset($this->space); - } - - /** - * The import mode space. - * - * Generated from protobuf field .google.chat.v1.Space space = 1; - * @param \Google\Apps\Chat\V1\Space $var - * @return $this - */ - public function setSpace($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); - $this->space = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup.php deleted file mode 100644 index 0eec00f28227..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup.php +++ /dev/null @@ -1,33 +0,0 @@ -google.chat.v1.ContextualAddOnMarkup - */ -class ContextualAddOnMarkup extends \Google\Protobuf\Internal\Message -{ - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); - parent::__construct($data); - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card.php deleted file mode 100644 index 249d39abc6ce..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card.php +++ /dev/null @@ -1,183 +0,0 @@ -google.chat.v1.ContextualAddOnMarkup.Card - */ -class Card extends \Google\Protobuf\Internal\Message -{ - /** - * The header of the card. A header usually contains a title and an image. - * - * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1; - */ - protected $header = null; - /** - * Sections are separated by a line divider. - * - * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2; - */ - private $sections; - /** - * The actions of this card. - * - * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3; - */ - private $card_actions; - /** - * Name of the card. - * - * Generated from protobuf field string name = 4; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader $header - * The header of the card. A header usually contains a title and an image. - * @type array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\Section>|\Google\Protobuf\Internal\RepeatedField $sections - * Sections are separated by a line divider. - * @type array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardAction>|\Google\Protobuf\Internal\RepeatedField $card_actions - * The actions of this card. - * @type string $name - * Name of the card. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); - parent::__construct($data); - } - - /** - * The header of the card. A header usually contains a title and an image. - * - * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1; - * @return \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader|null - */ - public function getHeader() - { - return $this->header; - } - - public function hasHeader() - { - return isset($this->header); - } - - public function clearHeader() - { - unset($this->header); - } - - /** - * The header of the card. A header usually contains a title and an image. - * - * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader header = 1; - * @param \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader::class); - $this->header = $var; - - return $this; - } - - /** - * Sections are separated by a line divider. - * - * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSections() - { - return $this->sections; - } - - /** - * Sections are separated by a line divider. - * - * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.Section sections = 2; - * @param array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\Section>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSections($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\Section::class); - $this->sections = $arr; - - return $this; - } - - /** - * The actions of this card. - * - * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCardActions() - { - return $this->card_actions; - } - - /** - * The actions of this card. - * - * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card.CardAction card_actions = 3; - * @param array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardAction>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCardActions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardAction::class); - $this->card_actions = $arr; - - return $this; - } - - /** - * Name of the card. - * - * Generated from protobuf field string name = 4; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Name of the card. - * - * Generated from protobuf field string name = 4; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Card::class, \Google\Apps\Chat\V1\ContextualAddOnMarkup_Card::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardAction.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardAction.php deleted file mode 100644 index a6cbe6824e74..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardAction.php +++ /dev/null @@ -1,118 +0,0 @@ -google.chat.v1.ContextualAddOnMarkup.Card.CardAction - */ -class CardAction extends \Google\Protobuf\Internal\Message -{ - /** - * The label used to be displayed in the action menu item. - * - * Generated from protobuf field string action_label = 1; - */ - protected $action_label = ''; - /** - * The onclick action for this action item. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; - */ - protected $on_click = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $action_label - * The label used to be displayed in the action menu item. - * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click - * The onclick action for this action item. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); - parent::__construct($data); - } - - /** - * The label used to be displayed in the action menu item. - * - * Generated from protobuf field string action_label = 1; - * @return string - */ - public function getActionLabel() - { - return $this->action_label; - } - - /** - * The label used to be displayed in the action menu item. - * - * Generated from protobuf field string action_label = 1; - * @param string $var - * @return $this - */ - public function setActionLabel($var) - { - GPBUtil::checkString($var, True); - $this->action_label = $var; - - return $this; - } - - /** - * The onclick action for this action item. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; - * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null - */ - public function getOnClick() - { - return $this->on_click; - } - - public function hasOnClick() - { - return isset($this->on_click); - } - - public function clearOnClick() - { - unset($this->on_click); - } - - /** - * The onclick action for this action item. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; - * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var - * @return $this - */ - public function setOnClick($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); - $this->on_click = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CardAction::class, \Google\Apps\Chat\V1\ContextualAddOnMarkup_Card_CardAction::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader.php deleted file mode 100644 index a8ca508b489a..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader.php +++ /dev/null @@ -1,178 +0,0 @@ -google.chat.v1.ContextualAddOnMarkup.Card.CardHeader - */ -class CardHeader extends \Google\Protobuf\Internal\Message -{ - /** - * The title must be specified. The header has a fixed height: if both a - * title and subtitle is specified, each takes up one line. If only the - * title is specified, it takes up both lines. - * - * Generated from protobuf field string title = 1; - */ - protected $title = ''; - /** - * The subtitle of the card header. - * - * Generated from protobuf field string subtitle = 2; - */ - protected $subtitle = ''; - /** - * The image's type (for example, square border or circular border). - * - * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader.ImageStyle image_style = 3; - */ - protected $image_style = 0; - /** - * The URL of the image in the card header. - * - * Generated from protobuf field string image_url = 4; - */ - protected $image_url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $title - * The title must be specified. The header has a fixed height: if both a - * title and subtitle is specified, each takes up one line. If only the - * title is specified, it takes up both lines. - * @type string $subtitle - * The subtitle of the card header. - * @type int $image_style - * The image's type (for example, square border or circular border). - * @type string $image_url - * The URL of the image in the card header. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); - parent::__construct($data); - } - - /** - * The title must be specified. The header has a fixed height: if both a - * title and subtitle is specified, each takes up one line. If only the - * title is specified, it takes up both lines. - * - * Generated from protobuf field string title = 1; - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * The title must be specified. The header has a fixed height: if both a - * title and subtitle is specified, each takes up one line. If only the - * title is specified, it takes up both lines. - * - * Generated from protobuf field string title = 1; - * @param string $var - * @return $this - */ - public function setTitle($var) - { - GPBUtil::checkString($var, True); - $this->title = $var; - - return $this; - } - - /** - * The subtitle of the card header. - * - * Generated from protobuf field string subtitle = 2; - * @return string - */ - public function getSubtitle() - { - return $this->subtitle; - } - - /** - * The subtitle of the card header. - * - * Generated from protobuf field string subtitle = 2; - * @param string $var - * @return $this - */ - public function setSubtitle($var) - { - GPBUtil::checkString($var, True); - $this->subtitle = $var; - - return $this; - } - - /** - * The image's type (for example, square border or circular border). - * - * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader.ImageStyle image_style = 3; - * @return int - */ - public function getImageStyle() - { - return $this->image_style; - } - - /** - * The image's type (for example, square border or circular border). - * - * Generated from protobuf field .google.chat.v1.ContextualAddOnMarkup.Card.CardHeader.ImageStyle image_style = 3; - * @param int $var - * @return $this - */ - public function setImageStyle($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card\CardHeader\ImageStyle::class); - $this->image_style = $var; - - return $this; - } - - /** - * The URL of the image in the card header. - * - * Generated from protobuf field string image_url = 4; - * @return string - */ - public function getImageUrl() - { - return $this->image_url; - } - - /** - * The URL of the image in the card header. - * - * Generated from protobuf field string image_url = 4; - * @param string $var - * @return $this - */ - public function setImageUrl($var) - { - GPBUtil::checkString($var, True); - $this->image_url = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(CardHeader::class, \Google\Apps\Chat\V1\ContextualAddOnMarkup_Card_CardHeader::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader/ImageStyle.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader/ImageStyle.php deleted file mode 100644 index a86eddd71cea..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/CardHeader/ImageStyle.php +++ /dev/null @@ -1,60 +0,0 @@ -google.chat.v1.ContextualAddOnMarkup.Card.CardHeader.ImageStyle - */ -class ImageStyle -{ - /** - * Generated from protobuf enum IMAGE_STYLE_UNSPECIFIED = 0; - */ - const IMAGE_STYLE_UNSPECIFIED = 0; - /** - * Square border. - * - * Generated from protobuf enum IMAGE = 1; - */ - const IMAGE = 1; - /** - * Circular border. - * - * Generated from protobuf enum AVATAR = 2; - */ - const AVATAR = 2; - - private static $valueToName = [ - self::IMAGE_STYLE_UNSPECIFIED => 'IMAGE_STYLE_UNSPECIFIED', - self::IMAGE => 'IMAGE', - self::AVATAR => 'AVATAR', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ImageStyle::class, \Google\Apps\Chat\V1\ContextualAddOnMarkup_Card_CardHeader_ImageStyle::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/Section.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/Section.php deleted file mode 100644 index 8363df325e24..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ContextualAddOnMarkup/Card/Section.php +++ /dev/null @@ -1,139 +0,0 @@ -google.chat.v1.ContextualAddOnMarkup.Card.Section - */ -class Section extends \Google\Protobuf\Internal\Message -{ - /** - * The header of the section. Formatted text is - * supported. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string header = 1; - */ - protected $header = ''; - /** - * A section must contain at least one widget. - * - * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup widgets = 2; - */ - private $widgets; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $header - * The header of the section. Formatted text is - * supported. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * @type array<\Google\Apps\Chat\V1\WidgetMarkup>|\Google\Protobuf\Internal\RepeatedField $widgets - * A section must contain at least one widget. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\ContextualAddon::initOnce(); - parent::__construct($data); - } - - /** - * The header of the section. Formatted text is - * supported. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string header = 1; - * @return string - */ - public function getHeader() - { - return $this->header; - } - - /** - * The header of the section. Formatted text is - * supported. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string header = 1; - * @param string $var - * @return $this - */ - public function setHeader($var) - { - GPBUtil::checkString($var, True); - $this->header = $var; - - return $this; - } - - /** - * A section must contain at least one widget. - * - * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup widgets = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getWidgets() - { - return $this->widgets; - } - - /** - * A section must contain at least one widget. - * - * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup widgets = 2; - * @param array<\Google\Apps\Chat\V1\WidgetMarkup>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setWidgets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\WidgetMarkup::class); - $this->widgets = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Section::class, \Google\Apps\Chat\V1\ContextualAddOnMarkup_Card_Section::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMembershipRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMembershipRequest.php deleted file mode 100644 index 8d36c8549b38..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMembershipRequest.php +++ /dev/null @@ -1,283 +0,0 @@ -google.chat.v1.CreateMembershipRequest - */ -class CreateMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the space for which to create the - * membership. - * Format: spaces/{space} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The membership relation to create. - * The `memberType` field must contain a user with the `user.name` and - * `user.type` fields populated. The server will assign a resource name - * and overwrite anything specified. - * When a Chat app creates a membership relation for a human user, it must use - * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set - * `user.name` with format `users/{user}`, where `{user}` can be the email - * address for the user. For users in the same Workspace organization `{user}` - * can also be the `id` of the - * [person](https://developers.google.com/people/api/rest/v1/people) from the - * People API, or the `id` for the user in the Directory API. For example, if - * the People API Person profile ID for `user@example.com` is `123456789`, you - * can add the user to the space by setting the `membership.member.name` to - * `users/user@example.com` or `users/123456789`. When a Chat app creates a - * membership relation for itself, it must use the `chat.memberships.app` - * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $membership = null; - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Creating app memberships or creating memberships for users outside the - * administrator's Google Workspace organization isn't supported using admin - * access. - * - * Generated from protobuf field bool use_admin_access = 5; - */ - protected $use_admin_access = false; - - /** - * @param string $parent Required. The resource name of the space for which to create the - * membership. - * - * Format: spaces/{space} - * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. - * @param \Google\Apps\Chat\V1\Membership $membership Required. The membership relation to create. - * The `memberType` field must contain a user with the `user.name` and - * `user.type` fields populated. The server will assign a resource name - * and overwrite anything specified. - * When a Chat app creates a membership relation for a human user, it must use - * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set - * `user.name` with format `users/{user}`, where `{user}` can be the email - * address for the user. For users in the same Workspace organization `{user}` - * can also be the `id` of the - * [person](https://developers.google.com/people/api/rest/v1/people) from the - * People API, or the `id` for the user in the Directory API. For example, if - * the People API Person profile ID for `user@example.com` is `123456789`, you - * can add the user to the space by setting the `membership.member.name` to - * `users/user@example.com` or `users/123456789`. When a Chat app creates a - * membership relation for itself, it must use the `chat.memberships.app` - * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. - * - * @return \Google\Apps\Chat\V1\CreateMembershipRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Apps\Chat\V1\Membership $membership): self - { - return (new self()) - ->setParent($parent) - ->setMembership($membership); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the space for which to create the - * membership. - * Format: spaces/{space} - * @type \Google\Apps\Chat\V1\Membership $membership - * Required. The membership relation to create. - * The `memberType` field must contain a user with the `user.name` and - * `user.type` fields populated. The server will assign a resource name - * and overwrite anything specified. - * When a Chat app creates a membership relation for a human user, it must use - * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set - * `user.name` with format `users/{user}`, where `{user}` can be the email - * address for the user. For users in the same Workspace organization `{user}` - * can also be the `id` of the - * [person](https://developers.google.com/people/api/rest/v1/people) from the - * People API, or the `id` for the user in the Directory API. For example, if - * the People API Person profile ID for `user@example.com` is `123456789`, you - * can add the user to the space by setting the `membership.member.name` to - * `users/user@example.com` or `users/123456789`. When a Chat app creates a - * membership relation for itself, it must use the `chat.memberships.app` - * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. - * @type bool $use_admin_access - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Creating app memberships or creating memberships for users outside the - * administrator's Google Workspace organization isn't supported using admin - * access. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the space for which to create the - * membership. - * Format: spaces/{space} - * - * 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 space for which to create the - * membership. - * Format: spaces/{space} - * - * 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 membership relation to create. - * The `memberType` field must contain a user with the `user.name` and - * `user.type` fields populated. The server will assign a resource name - * and overwrite anything specified. - * When a Chat app creates a membership relation for a human user, it must use - * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set - * `user.name` with format `users/{user}`, where `{user}` can be the email - * address for the user. For users in the same Workspace organization `{user}` - * can also be the `id` of the - * [person](https://developers.google.com/people/api/rest/v1/people) from the - * People API, or the `id` for the user in the Directory API. For example, if - * the People API Person profile ID for `user@example.com` is `123456789`, you - * can add the user to the space by setting the `membership.member.name` to - * `users/user@example.com` or `users/123456789`. When a Chat app creates a - * membership relation for itself, it must use the `chat.memberships.app` - * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Apps\Chat\V1\Membership|null - */ - public function getMembership() - { - return $this->membership; - } - - public function hasMembership() - { - return isset($this->membership); - } - - public function clearMembership() - { - unset($this->membership); - } - - /** - * Required. The membership relation to create. - * The `memberType` field must contain a user with the `user.name` and - * `user.type` fields populated. The server will assign a resource name - * and overwrite anything specified. - * When a Chat app creates a membership relation for a human user, it must use - * the `chat.memberships` scope, set `user.type` to `HUMAN`, and set - * `user.name` with format `users/{user}`, where `{user}` can be the email - * address for the user. For users in the same Workspace organization `{user}` - * can also be the `id` of the - * [person](https://developers.google.com/people/api/rest/v1/people) from the - * People API, or the `id` for the user in the Directory API. For example, if - * the People API Person profile ID for `user@example.com` is `123456789`, you - * can add the user to the space by setting the `membership.member.name` to - * `users/user@example.com` or `users/123456789`. When a Chat app creates a - * membership relation for itself, it must use the `chat.memberships.app` - * scope, set `user.type` to `BOT`, and set `user.name` to `users/app`. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Apps\Chat\V1\Membership $var - * @return $this - */ - public function setMembership($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); - $this->membership = $var; - - return $this; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Creating app memberships or creating memberships for users outside the - * administrator's Google Workspace organization isn't supported using admin - * access. - * - * Generated from protobuf field bool use_admin_access = 5; - * @return bool - */ - public function getUseAdminAccess() - { - return $this->use_admin_access; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Creating app memberships or creating memberships for users outside the - * administrator's Google Workspace organization isn't supported using admin - * access. - * - * Generated from protobuf field bool use_admin_access = 5; - * @param bool $var - * @return $this - */ - public function setUseAdminAccess($var) - { - GPBUtil::checkBool($var); - $this->use_admin_access = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest.php deleted file mode 100644 index e90a569bc416..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest.php +++ /dev/null @@ -1,370 +0,0 @@ -google.chat.v1.CreateMessageRequest - */ -class CreateMessageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the space in which to create a message. - * Format: `spaces/{space}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. Message body. - * - * Generated from protobuf field .google.chat.v1.Message message = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $message = null; - /** - * Optional. Deprecated: Use - * [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the - * thread. Supports up to 4000 characters. To start or add to a thread, create - * a message and specify a `threadKey` or the - * [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or - * reply to a message - * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). - * - * Generated from protobuf field string thread_key = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @deprecated - */ - protected $thread_key = ''; - /** - * Optional. A unique request ID for this message. Specifying an existing - * request ID returns the message created with that ID instead of creating a - * new message. - * - * Generated from protobuf field string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. Specifies whether a message starts a thread or replies to one. - * Only supported in named spaces. - * - * Generated from protobuf field .google.chat.v1.CreateMessageRequest.MessageReplyOption message_reply_option = 8 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $message_reply_option = 0; - /** - * Optional. A custom ID for a message. Lets Chat apps get, update, or delete - * a message without needing to store the system-assigned ID in the message's - * resource name (represented in the message `name` field). - * The value for this field must meet the following requirements: - * * Begins with `client-`. For example, `client-custom-name` is a valid - * custom ID, but `custom-name` is not. - * * Contains up to 63 characters and only lowercase letters, numbers, and - * hyphens. - * * Is unique within a space. A Chat app can't use the same custom ID for - * different messages. - * For details, see [Name a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * Generated from protobuf field string message_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $message_id = ''; - - /** - * @param string $parent Required. The resource name of the space in which to create a message. - * - * Format: `spaces/{space}` - * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. - * @param \Google\Apps\Chat\V1\Message $message Required. Message body. - * @param string $messageId Optional. A custom ID for a message. Lets Chat apps get, update, or delete - * a message without needing to store the system-assigned ID in the message's - * resource name (represented in the message `name` field). - * - * The value for this field must meet the following requirements: - * - * * Begins with `client-`. For example, `client-custom-name` is a valid - * custom ID, but `custom-name` is not. - * * Contains up to 63 characters and only lowercase letters, numbers, and - * hyphens. - * * Is unique within a space. A Chat app can't use the same custom ID for - * different messages. - * - * For details, see [Name a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * @return \Google\Apps\Chat\V1\CreateMessageRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Apps\Chat\V1\Message $message, string $messageId): self - { - return (new self()) - ->setParent($parent) - ->setMessage($message) - ->setMessageId($messageId); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The resource name of the space in which to create a message. - * Format: `spaces/{space}` - * @type \Google\Apps\Chat\V1\Message $message - * Required. Message body. - * @type string $thread_key - * Optional. Deprecated: Use - * [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the - * thread. Supports up to 4000 characters. To start or add to a thread, create - * a message and specify a `threadKey` or the - * [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or - * reply to a message - * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). - * @type string $request_id - * Optional. A unique request ID for this message. Specifying an existing - * request ID returns the message created with that ID instead of creating a - * new message. - * @type int $message_reply_option - * Optional. Specifies whether a message starts a thread or replies to one. - * Only supported in named spaces. - * @type string $message_id - * Optional. A custom ID for a message. Lets Chat apps get, update, or delete - * a message without needing to store the system-assigned ID in the message's - * resource name (represented in the message `name` field). - * The value for this field must meet the following requirements: - * * Begins with `client-`. For example, `client-custom-name` is a valid - * custom ID, but `custom-name` is not. - * * Contains up to 63 characters and only lowercase letters, numbers, and - * hyphens. - * * Is unique within a space. A Chat app can't use the same custom ID for - * different messages. - * For details, see [Name a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the space in which to create a message. - * Format: `spaces/{space}` - * - * 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 space in which to create a message. - * Format: `spaces/{space}` - * - * 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. Message body. - * - * Generated from protobuf field .google.chat.v1.Message message = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Apps\Chat\V1\Message|null - */ - public function getMessage() - { - return $this->message; - } - - public function hasMessage() - { - return isset($this->message); - } - - public function clearMessage() - { - unset($this->message); - } - - /** - * Required. Message body. - * - * Generated from protobuf field .google.chat.v1.Message message = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Apps\Chat\V1\Message $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Message::class); - $this->message = $var; - - return $this; - } - - /** - * Optional. Deprecated: Use - * [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the - * thread. Supports up to 4000 characters. To start or add to a thread, create - * a message and specify a `threadKey` or the - * [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or - * reply to a message - * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). - * - * Generated from protobuf field string thread_key = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @return string - * @deprecated - */ - public function getThreadKey() - { - @trigger_error('thread_key is deprecated.', E_USER_DEPRECATED); - return $this->thread_key; - } - - /** - * Optional. Deprecated: Use - * [thread.thread_key][google.chat.v1.Thread.thread_key] instead. ID for the - * thread. Supports up to 4000 characters. To start or add to a thread, create - * a message and specify a `threadKey` or the - * [thread.name][google.chat.v1.Thread.name]. For example usage, see [Start or - * reply to a message - * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). - * - * Generated from protobuf field string thread_key = 6 [deprecated = true, (.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - * @deprecated - */ - public function setThreadKey($var) - { - @trigger_error('thread_key is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkString($var, True); - $this->thread_key = $var; - - return $this; - } - - /** - * Optional. A unique request ID for this message. Specifying an existing - * request ID returns the message created with that ID instead of creating a - * new message. - * - * Generated from protobuf field string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique request ID for this message. Specifying an existing - * request ID returns the message created with that ID instead of creating a - * new message. - * - * Generated from protobuf field string request_id = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. Specifies whether a message starts a thread or replies to one. - * Only supported in named spaces. - * - * Generated from protobuf field .google.chat.v1.CreateMessageRequest.MessageReplyOption message_reply_option = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getMessageReplyOption() - { - return $this->message_reply_option; - } - - /** - * Optional. Specifies whether a message starts a thread or replies to one. - * Only supported in named spaces. - * - * Generated from protobuf field .google.chat.v1.CreateMessageRequest.MessageReplyOption message_reply_option = 8 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setMessageReplyOption($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\CreateMessageRequest\MessageReplyOption::class); - $this->message_reply_option = $var; - - return $this; - } - - /** - * Optional. A custom ID for a message. Lets Chat apps get, update, or delete - * a message without needing to store the system-assigned ID in the message's - * resource name (represented in the message `name` field). - * The value for this field must meet the following requirements: - * * Begins with `client-`. For example, `client-custom-name` is a valid - * custom ID, but `custom-name` is not. - * * Contains up to 63 characters and only lowercase letters, numbers, and - * hyphens. - * * Is unique within a space. A Chat app can't use the same custom ID for - * different messages. - * For details, see [Name a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * Generated from protobuf field string message_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getMessageId() - { - return $this->message_id; - } - - /** - * Optional. A custom ID for a message. Lets Chat apps get, update, or delete - * a message without needing to store the system-assigned ID in the message's - * resource name (represented in the message `name` field). - * The value for this field must meet the following requirements: - * * Begins with `client-`. For example, `client-custom-name` is a valid - * custom ID, but `custom-name` is not. - * * Contains up to 63 characters and only lowercase letters, numbers, and - * hyphens. - * * Is unique within a space. A Chat app can't use the same custom ID for - * different messages. - * For details, see [Name a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * Generated from protobuf field string message_id = 9 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setMessageId($var) - { - GPBUtil::checkString($var, True); - $this->message_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest/MessageReplyOption.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest/MessageReplyOption.php deleted file mode 100644 index 92144a5ebd83..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateMessageRequest/MessageReplyOption.php +++ /dev/null @@ -1,74 +0,0 @@ -google.chat.v1.CreateMessageRequest.MessageReplyOption - */ -class MessageReplyOption -{ - /** - * Default. Starts a new thread. Using this option ignores any [thread - * ID][google.chat.v1.Thread.name] or - * [`thread_key`][google.chat.v1.Thread.thread_key] that's included. - * - * Generated from protobuf enum MESSAGE_REPLY_OPTION_UNSPECIFIED = 0; - */ - const MESSAGE_REPLY_OPTION_UNSPECIFIED = 0; - /** - * Creates the message as a reply to the thread specified by [thread - * ID][google.chat.v1.Thread.name] or - * [`thread_key`][google.chat.v1.Thread.thread_key]. If it fails, the - * message starts a new thread instead. - * - * Generated from protobuf enum REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1; - */ - const REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD = 1; - /** - * Creates the message as a reply to the thread specified by [thread - * ID][google.chat.v1.Thread.name] or - * [`thread_key`][google.chat.v1.Thread.thread_key]. If a new `thread_key` - * is used, a new thread is created. If the message creation fails, a - * `NOT_FOUND` error is returned instead. - * - * Generated from protobuf enum REPLY_MESSAGE_OR_FAIL = 2; - */ - const REPLY_MESSAGE_OR_FAIL = 2; - - private static $valueToName = [ - self::MESSAGE_REPLY_OPTION_UNSPECIFIED => 'MESSAGE_REPLY_OPTION_UNSPECIFIED', - self::REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD => 'REPLY_MESSAGE_FALLBACK_TO_NEW_THREAD', - self::REPLY_MESSAGE_OR_FAIL => 'REPLY_MESSAGE_OR_FAIL', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MessageReplyOption::class, \Google\Apps\Chat\V1\CreateMessageRequest_MessageReplyOption::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateReactionRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateReactionRequest.php deleted file mode 100644 index 97555cae7e06..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateReactionRequest.php +++ /dev/null @@ -1,133 +0,0 @@ -google.chat.v1.CreateReactionRequest - */ -class CreateReactionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The message where the reaction is created. - * Format: `spaces/{space}/messages/{message}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The reaction to create. - * - * Generated from protobuf field .google.chat.v1.Reaction reaction = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $reaction = null; - - /** - * @param string $parent Required. The message where the reaction is created. - * - * Format: `spaces/{space}/messages/{message}` - * Please see {@see ChatServiceClient::messageName()} for help formatting this field. - * @param \Google\Apps\Chat\V1\Reaction $reaction Required. The reaction to create. - * - * @return \Google\Apps\Chat\V1\CreateReactionRequest - * - * @experimental - */ - public static function build(string $parent, \Google\Apps\Chat\V1\Reaction $reaction): self - { - return (new self()) - ->setParent($parent) - ->setReaction($reaction); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. The message where the reaction is created. - * Format: `spaces/{space}/messages/{message}` - * @type \Google\Apps\Chat\V1\Reaction $reaction - * Required. The reaction to create. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); - parent::__construct($data); - } - - /** - * Required. The message where the reaction is created. - * Format: `spaces/{space}/messages/{message}` - * - * 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 message where the reaction is created. - * Format: `spaces/{space}/messages/{message}` - * - * 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 reaction to create. - * - * Generated from protobuf field .google.chat.v1.Reaction reaction = 2 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Apps\Chat\V1\Reaction|null - */ - public function getReaction() - { - return $this->reaction; - } - - public function hasReaction() - { - return isset($this->reaction); - } - - public function clearReaction() - { - unset($this->reaction); - } - - /** - * Required. The reaction to create. - * - * Generated from protobuf field .google.chat.v1.Reaction reaction = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Apps\Chat\V1\Reaction $var - * @return $this - */ - public function setReaction($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Reaction::class); - $this->reaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateSpaceRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateSpaceRequest.php deleted file mode 100644 index 0f89cf2aafdf..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CreateSpaceRequest.php +++ /dev/null @@ -1,192 +0,0 @@ -google.chat.v1.CreateSpaceRequest - */ -class CreateSpaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `displayName` and `spaceType` fields must be populated. Only - * `SpaceType.SPACE` is supported. - * If you receive the error message `ALREADY_EXISTS`, - * try a different `displayName`. An existing space within the Google - * Workspace organization might already use this display name. - * If you're a member of the [Developer Preview - * program](https://developers.google.com/workspace/preview), - * `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. - * The space `name` is assigned on the server so anything specified in this - * field will be ignored. - * - * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $space = null; - /** - * Optional. A unique identifier for this request. - * A random UUID is recommended. - * Specifying an existing request ID returns the space created with that ID - * instead of creating a new space. - * Specifying an existing request ID from the same Chat app with a different - * authenticated user returns an error. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - - /** - * @param \Google\Apps\Chat\V1\Space $space Required. The `displayName` and `spaceType` fields must be populated. Only - * `SpaceType.SPACE` is supported. - * - * If you receive the error message `ALREADY_EXISTS`, - * try a different `displayName`. An existing space within the Google - * Workspace organization might already use this display name. - * - * If you're a member of the [Developer Preview - * program](https://developers.google.com/workspace/preview), - * `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. - * - * The space `name` is assigned on the server so anything specified in this - * field will be ignored. - * - * @return \Google\Apps\Chat\V1\CreateSpaceRequest - * - * @experimental - */ - public static function build(\Google\Apps\Chat\V1\Space $space): self - { - return (new self()) - ->setSpace($space); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Space $space - * Required. The `displayName` and `spaceType` fields must be populated. Only - * `SpaceType.SPACE` is supported. - * If you receive the error message `ALREADY_EXISTS`, - * try a different `displayName`. An existing space within the Google - * Workspace organization might already use this display name. - * If you're a member of the [Developer Preview - * program](https://developers.google.com/workspace/preview), - * `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. - * The space `name` is assigned on the server so anything specified in this - * field will be ignored. - * @type string $request_id - * Optional. A unique identifier for this request. - * A random UUID is recommended. - * Specifying an existing request ID returns the space created with that ID - * instead of creating a new space. - * Specifying an existing request ID from the same Chat app with a different - * authenticated user returns an error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `displayName` and `spaceType` fields must be populated. Only - * `SpaceType.SPACE` is supported. - * If you receive the error message `ALREADY_EXISTS`, - * try a different `displayName`. An existing space within the Google - * Workspace organization might already use this display name. - * If you're a member of the [Developer Preview - * program](https://developers.google.com/workspace/preview), - * `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. - * The space `name` is assigned on the server so anything specified in this - * field will be ignored. - * - * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Apps\Chat\V1\Space|null - */ - public function getSpace() - { - return $this->space; - } - - public function hasSpace() - { - return isset($this->space); - } - - public function clearSpace() - { - unset($this->space); - } - - /** - * Required. The `displayName` and `spaceType` fields must be populated. Only - * `SpaceType.SPACE` is supported. - * If you receive the error message `ALREADY_EXISTS`, - * try a different `displayName`. An existing space within the Google - * Workspace organization might already use this display name. - * If you're a member of the [Developer Preview - * program](https://developers.google.com/workspace/preview), - * `SpaceType.GROUP_CHAT` can be used if `importMode` is set to true. - * The space `name` is assigned on the server so anything specified in this - * field will be ignored. - * - * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Apps\Chat\V1\Space $var - * @return $this - */ - public function setSpace($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); - $this->space = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. - * A random UUID is recommended. - * Specifying an existing request ID returns the space created with that ID - * instead of creating a new space. - * Specifying an existing request ID from the same Chat app with a different - * authenticated user returns an error. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. - * A random UUID is recommended. - * Specifying an existing request ID returns the space created with that ID - * instead of creating a new space. - * Specifying an existing request ID from the same Chat app with a different - * authenticated user returns an error. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CustomEmoji.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CustomEmoji.php deleted file mode 100644 index 726372738cb6..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/CustomEmoji.php +++ /dev/null @@ -1,67 +0,0 @@ -google.chat.v1.CustomEmoji - */ -class CustomEmoji extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Unique key for the custom emoji resource. - * - * Generated from protobuf field string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $uid = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uid - * Output only. Unique key for the custom emoji resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Unique key for the custom emoji resource. - * - * Generated from protobuf field string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUid() - { - return $this->uid; - } - - /** - * Output only. Unique key for the custom emoji resource. - * - * Generated from protobuf field string uid = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUid($var) - { - GPBUtil::checkString($var, True); - $this->uid = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMembershipRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMembershipRequest.php deleted file mode 100644 index cbbedad4aa34..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMembershipRequest.php +++ /dev/null @@ -1,196 +0,0 @@ -google.chat.v1.DeleteMembershipRequest - */ -class DeleteMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the membership to delete. Chat apps can delete - * human users' or their own memberships. Chat apps can't delete other apps' - * memberships. - * When deleting a human membership, requires the `chat.memberships` scope and - * `spaces/{space}/members/{member}` format. You can use the email as an - * alias for `{member}`. For example, - * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the - * email of the Google Chat user. - * When deleting an app membership, requires the `chat.memberships.app` scope - * and `spaces/{space}/members/app` format. - * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Deleting app memberships in a space isn't supported using admin access. - * - * Generated from protobuf field bool use_admin_access = 2; - */ - protected $use_admin_access = false; - - /** - * @param string $name Required. Resource name of the membership to delete. Chat apps can delete - * human users' or their own memberships. Chat apps can't delete other apps' - * memberships. - * - * When deleting a human membership, requires the `chat.memberships` scope and - * `spaces/{space}/members/{member}` format. You can use the email as an - * alias for `{member}`. For example, - * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the - * email of the Google Chat user. - * - * When deleting an app membership, requires the `chat.memberships.app` scope - * and `spaces/{space}/members/app` format. - * - * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. Please see - * {@see ChatServiceClient::membershipName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\DeleteMembershipRequest - * - * @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. Resource name of the membership to delete. Chat apps can delete - * human users' or their own memberships. Chat apps can't delete other apps' - * memberships. - * When deleting a human membership, requires the `chat.memberships` scope and - * `spaces/{space}/members/{member}` format. You can use the email as an - * alias for `{member}`. For example, - * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the - * email of the Google Chat user. - * When deleting an app membership, requires the `chat.memberships.app` scope - * and `spaces/{space}/members/app` format. - * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. - * @type bool $use_admin_access - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Deleting app memberships in a space isn't supported using admin access. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the membership to delete. Chat apps can delete - * human users' or their own memberships. Chat apps can't delete other apps' - * memberships. - * When deleting a human membership, requires the `chat.memberships` scope and - * `spaces/{space}/members/{member}` format. You can use the email as an - * alias for `{member}`. For example, - * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the - * email of the Google Chat user. - * When deleting an app membership, requires the `chat.memberships.app` scope - * and `spaces/{space}/members/app` format. - * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. - * - * 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. Resource name of the membership to delete. Chat apps can delete - * human users' or their own memberships. Chat apps can't delete other apps' - * memberships. - * When deleting a human membership, requires the `chat.memberships` scope and - * `spaces/{space}/members/{member}` format. You can use the email as an - * alias for `{member}`. For example, - * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the - * email of the Google Chat user. - * When deleting an app membership, requires the `chat.memberships.app` scope - * and `spaces/{space}/members/app` format. - * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app`. - * - * 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; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Deleting app memberships in a space isn't supported using admin access. - * - * Generated from protobuf field bool use_admin_access = 2; - * @return bool - */ - public function getUseAdminAccess() - { - return $this->use_admin_access; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Deleting app memberships in a space isn't supported using admin access. - * - * Generated from protobuf field bool use_admin_access = 2; - * @param bool $var - * @return $this - */ - public function setUseAdminAccess($var) - { - GPBUtil::checkBool($var); - $this->use_admin_access = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMessageRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMessageRequest.php deleted file mode 100644 index 37cb2a3434f7..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteMessageRequest.php +++ /dev/null @@ -1,162 +0,0 @@ -google.chat.v1.DeleteMessageRequest - */ -class DeleteMessageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the message. - * Format: `spaces/{space}/messages/{message}` - * If you've set a custom ID for your message, you can use the value from the - * `clientAssignedMessageId` field for `{message}`. For details, see [Name a - * message] - * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * When `true`, deleting a message also deletes its threaded replies. When - * `false`, if a message has threaded replies, deletion fails. - * Only applies when [authenticating as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * Has no effect when [authenticating as a Chat app] - * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * - * Generated from protobuf field bool force = 2; - */ - protected $force = false; - - /** - * @param string $name Required. Resource name of the message. - * - * Format: `spaces/{space}/messages/{message}` - * - * If you've set a custom ID for your message, you can use the value from the - * `clientAssignedMessageId` field for `{message}`. For details, see [Name a - * message] - * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). Please see - * {@see ChatServiceClient::messageName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\DeleteMessageRequest - * - * @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. Resource name of the message. - * Format: `spaces/{space}/messages/{message}` - * If you've set a custom ID for your message, you can use the value from the - * `clientAssignedMessageId` field for `{message}`. For details, see [Name a - * message] - * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * @type bool $force - * When `true`, deleting a message also deletes its threaded replies. When - * `false`, if a message has threaded replies, deletion fails. - * Only applies when [authenticating as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * Has no effect when [authenticating as a Chat app] - * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the message. - * Format: `spaces/{space}/messages/{message}` - * If you've set a custom ID for your message, you can use the value from the - * `clientAssignedMessageId` field for `{message}`. For details, see [Name a - * message] - * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * 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. Resource name of the message. - * Format: `spaces/{space}/messages/{message}` - * If you've set a custom ID for your message, you can use the value from the - * `clientAssignedMessageId` field for `{message}`. For details, see [Name a - * message] - * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * 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; - } - - /** - * When `true`, deleting a message also deletes its threaded replies. When - * `false`, if a message has threaded replies, deletion fails. - * Only applies when [authenticating as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * Has no effect when [authenticating as a Chat app] - * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * - * Generated from protobuf field bool force = 2; - * @return bool - */ - public function getForce() - { - return $this->force; - } - - /** - * When `true`, deleting a message also deletes its threaded replies. When - * `false`, if a message has threaded replies, deletion fails. - * Only applies when [authenticating as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * Has no effect when [authenticating as a Chat app] - * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * - * Generated from protobuf field bool force = 2; - * @param bool $var - * @return $this - */ - public function setForce($var) - { - GPBUtil::checkBool($var); - $this->force = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteReactionRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteReactionRequest.php deleted file mode 100644 index c7557ad1c0e4..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteReactionRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.chat.v1.DeleteReactionRequest - */ -class DeleteReactionRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Name of the reaction to delete. - * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Name of the reaction to delete. - * - * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` - * Please see {@see ChatServiceClient::reactionName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\DeleteReactionRequest - * - * @experimental - */ - public static function build(string $name): self - { - return (new self()) - ->setName($name); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Name of the reaction to delete. - * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); - parent::__construct($data); - } - - /** - * Required. Name of the reaction to delete. - * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Name of the reaction to delete. - * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` - * - * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteSpaceRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteSpaceRequest.php deleted file mode 100644 index 0f9bea7f4729..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeleteSpaceRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.chat.v1.DeleteSpaceRequest - */ -class DeleteSpaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the space to delete. - * Format: `spaces/{space}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.delete` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * - * Generated from protobuf field bool use_admin_access = 2; - */ - protected $use_admin_access = false; - - /** - * @param string $name Required. Resource name of the space to delete. - * - * Format: `spaces/{space}` - * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\DeleteSpaceRequest - * - * @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. Resource name of the space to delete. - * Format: `spaces/{space}` - * @type bool $use_admin_access - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.delete` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the space to delete. - * Format: `spaces/{space}` - * - * 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. Resource name of the space to delete. - * Format: `spaces/{space}` - * - * 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; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.delete` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * - * Generated from protobuf field bool use_admin_access = 2; - * @return bool - */ - public function getUseAdminAccess() - { - return $this->use_admin_access; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.delete` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * - * Generated from protobuf field bool use_admin_access = 2; - * @param bool $var - * @return $this - */ - public function setUseAdminAccess($var) - { - GPBUtil::checkBool($var); - $this->use_admin_access = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata.php deleted file mode 100644 index cd50e1dc6aa7..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata.php +++ /dev/null @@ -1,68 +0,0 @@ -google.chat.v1.DeletionMetadata - */ -class DeletionMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Indicates who deleted the message. - * - * Generated from protobuf field .google.chat.v1.DeletionMetadata.DeletionType deletion_type = 1; - */ - protected $deletion_type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $deletion_type - * Indicates who deleted the message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\DeletionMetadata::initOnce(); - parent::__construct($data); - } - - /** - * Indicates who deleted the message. - * - * Generated from protobuf field .google.chat.v1.DeletionMetadata.DeletionType deletion_type = 1; - * @return int - */ - public function getDeletionType() - { - return $this->deletion_type; - } - - /** - * Indicates who deleted the message. - * - * Generated from protobuf field .google.chat.v1.DeletionMetadata.DeletionType deletion_type = 1; - * @param int $var - * @return $this - */ - public function setDeletionType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\DeletionMetadata\DeletionType::class); - $this->deletion_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata/DeletionType.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata/DeletionType.php deleted file mode 100644 index c7ff2a29683c..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DeletionMetadata/DeletionType.php +++ /dev/null @@ -1,92 +0,0 @@ -google.chat.v1.DeletionMetadata.DeletionType - */ -class DeletionType -{ - /** - * This value is unused. - * - * Generated from protobuf enum DELETION_TYPE_UNSPECIFIED = 0; - */ - const DELETION_TYPE_UNSPECIFIED = 0; - /** - * User deleted their own message. - * - * Generated from protobuf enum CREATOR = 1; - */ - const CREATOR = 1; - /** - * The space owner deleted the message. - * - * Generated from protobuf enum SPACE_OWNER = 2; - */ - const SPACE_OWNER = 2; - /** - * A Google Workspace admin deleted the message. - * - * Generated from protobuf enum ADMIN = 3; - */ - const ADMIN = 3; - /** - * A Chat app deleted its own message when it expired. - * - * Generated from protobuf enum APP_MESSAGE_EXPIRY = 4; - */ - const APP_MESSAGE_EXPIRY = 4; - /** - * A Chat app deleted the message on behalf of the user. - * - * Generated from protobuf enum CREATOR_VIA_APP = 5; - */ - const CREATOR_VIA_APP = 5; - /** - * A Chat app deleted the message on behalf of the space owner. - * - * Generated from protobuf enum SPACE_OWNER_VIA_APP = 6; - */ - const SPACE_OWNER_VIA_APP = 6; - - private static $valueToName = [ - self::DELETION_TYPE_UNSPECIFIED => 'DELETION_TYPE_UNSPECIFIED', - self::CREATOR => 'CREATOR', - self::SPACE_OWNER => 'SPACE_OWNER', - self::ADMIN => 'ADMIN', - self::APP_MESSAGE_EXPIRY => 'APP_MESSAGE_EXPIRY', - self::CREATOR_VIA_APP => 'CREATOR_VIA_APP', - self::SPACE_OWNER_VIA_APP => 'SPACE_OWNER_VIA_APP', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(DeletionType::class, \Google\Apps\Chat\V1\DeletionMetadata_DeletionType::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Dialog.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Dialog.php deleted file mode 100644 index 86434601a751..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Dialog.php +++ /dev/null @@ -1,85 +0,0 @@ -google.chat.v1.Dialog - */ -class Dialog extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. Body of the dialog, which is rendered in a modal. - * Google Chat apps don't support the following card entities: - * `DateTimePicker`, `OnChangeAction`. - * - * Generated from protobuf field .google.apps.card.v1.Card body = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $body = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Card\V1\Card $body - * Input only. Body of the dialog, which is rendered in a modal. - * Google Chat apps don't support the following card entities: - * `DateTimePicker`, `OnChangeAction`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Input only. Body of the dialog, which is rendered in a modal. - * Google Chat apps don't support the following card entities: - * `DateTimePicker`, `OnChangeAction`. - * - * Generated from protobuf field .google.apps.card.v1.Card body = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Apps\Card\V1\Card|null - */ - public function getBody() - { - return $this->body; - } - - public function hasBody() - { - return isset($this->body); - } - - public function clearBody() - { - unset($this->body); - } - - /** - * Input only. Body of the dialog, which is rendered in a modal. - * Google Chat apps don't support the following card entities: - * `DateTimePicker`, `OnChangeAction`. - * - * Generated from protobuf field .google.apps.card.v1.Card body = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Apps\Card\V1\Card $var - * @return $this - */ - public function setBody($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Card\V1\Card::class); - $this->body = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DialogAction.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DialogAction.php deleted file mode 100644 index 381110a1278f..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DialogAction.php +++ /dev/null @@ -1,139 +0,0 @@ -google.chat.v1.DialogAction - */ -class DialogAction extends \Google\Protobuf\Internal\Message -{ - /** - * Input only. Status for a request to either invoke or submit a - * [dialog](https://developers.google.com/workspace/chat/dialogs). Displays - * a status and message to users, if necessary. - * For example, in case of an error or success. - * - * Generated from protobuf field .google.chat.v1.ActionStatus action_status = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $action_status = null; - protected $action; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Dialog $dialog - * Input only. - * [Dialog](https://developers.google.com/workspace/chat/dialogs) for the - * request. - * @type \Google\Apps\Chat\V1\ActionStatus $action_status - * Input only. Status for a request to either invoke or submit a - * [dialog](https://developers.google.com/workspace/chat/dialogs). Displays - * a status and message to users, if necessary. - * For example, in case of an error or success. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Input only. - * [Dialog](https://developers.google.com/workspace/chat/dialogs) for the - * request. - * - * Generated from protobuf field .google.chat.v1.Dialog dialog = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Apps\Chat\V1\Dialog|null - */ - public function getDialog() - { - return $this->readOneof(1); - } - - public function hasDialog() - { - return $this->hasOneof(1); - } - - /** - * Input only. - * [Dialog](https://developers.google.com/workspace/chat/dialogs) for the - * request. - * - * Generated from protobuf field .google.chat.v1.Dialog dialog = 1 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Apps\Chat\V1\Dialog $var - * @return $this - */ - public function setDialog($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Dialog::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Input only. Status for a request to either invoke or submit a - * [dialog](https://developers.google.com/workspace/chat/dialogs). Displays - * a status and message to users, if necessary. - * For example, in case of an error or success. - * - * Generated from protobuf field .google.chat.v1.ActionStatus action_status = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Apps\Chat\V1\ActionStatus|null - */ - public function getActionStatus() - { - return $this->action_status; - } - - public function hasActionStatus() - { - return isset($this->action_status); - } - - public function clearActionStatus() - { - unset($this->action_status); - } - - /** - * Input only. Status for a request to either invoke or submit a - * [dialog](https://developers.google.com/workspace/chat/dialogs). Displays - * a status and message to users, if necessary. - * For example, in case of an error or success. - * - * Generated from protobuf field .google.chat.v1.ActionStatus action_status = 2 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Apps\Chat\V1\ActionStatus $var - * @return $this - */ - public function setActionStatus($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ActionStatus::class); - $this->action_status = $var; - - return $this; - } - - /** - * @return string - */ - public function getAction() - { - return $this->whichOneof("action"); - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveDataRef.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveDataRef.php deleted file mode 100644 index 9c6bf3e9e6b9..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveDataRef.php +++ /dev/null @@ -1,67 +0,0 @@ -google.chat.v1.DriveDataRef - */ -class DriveDataRef extends \Google\Protobuf\Internal\Message -{ - /** - * The ID for the drive file. Use with the Drive API. - * - * Generated from protobuf field string drive_file_id = 2; - */ - protected $drive_file_id = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $drive_file_id - * The ID for the drive file. Use with the Drive API. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); - parent::__construct($data); - } - - /** - * The ID for the drive file. Use with the Drive API. - * - * Generated from protobuf field string drive_file_id = 2; - * @return string - */ - public function getDriveFileId() - { - return $this->drive_file_id; - } - - /** - * The ID for the drive file. Use with the Drive API. - * - * Generated from protobuf field string drive_file_id = 2; - * @param string $var - * @return $this - */ - public function setDriveFileId($var) - { - GPBUtil::checkString($var, True); - $this->drive_file_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveLinkData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveLinkData.php deleted file mode 100644 index f27cfb2631df..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/DriveLinkData.php +++ /dev/null @@ -1,119 +0,0 @@ -google.chat.v1.DriveLinkData - */ -class DriveLinkData extends \Google\Protobuf\Internal\Message -{ - /** - * A - * [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) - * which references a Google Drive file. - * - * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 1; - */ - protected $drive_data_ref = null; - /** - * The mime type of the linked Google Drive resource. - * - * Generated from protobuf field string mime_type = 2; - */ - protected $mime_type = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\DriveDataRef $drive_data_ref - * A - * [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) - * which references a Google Drive file. - * @type string $mime_type - * The mime type of the linked Google Drive resource. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); - parent::__construct($data); - } - - /** - * A - * [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) - * which references a Google Drive file. - * - * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 1; - * @return \Google\Apps\Chat\V1\DriveDataRef|null - */ - public function getDriveDataRef() - { - return $this->drive_data_ref; - } - - public function hasDriveDataRef() - { - return isset($this->drive_data_ref); - } - - public function clearDriveDataRef() - { - unset($this->drive_data_ref); - } - - /** - * A - * [DriveDataRef](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments#drivedataref) - * which references a Google Drive file. - * - * Generated from protobuf field .google.chat.v1.DriveDataRef drive_data_ref = 1; - * @param \Google\Apps\Chat\V1\DriveDataRef $var - * @return $this - */ - public function setDriveDataRef($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DriveDataRef::class); - $this->drive_data_ref = $var; - - return $this; - } - - /** - * The mime type of the linked Google Drive resource. - * - * Generated from protobuf field string mime_type = 2; - * @return string - */ - public function getMimeType() - { - return $this->mime_type; - } - - /** - * The mime type of the linked Google Drive resource. - * - * Generated from protobuf field string mime_type = 2; - * @param string $var - * @return $this - */ - public function setMimeType($var) - { - GPBUtil::checkString($var, True); - $this->mime_type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Emoji.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Emoji.php deleted file mode 100644 index c4efb005ee19..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Emoji.php +++ /dev/null @@ -1,108 +0,0 @@ -google.chat.v1.Emoji - */ -class Emoji extends \Google\Protobuf\Internal\Message -{ - protected $content; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $unicode - * A basic emoji represented by a unicode string. - * @type \Google\Apps\Chat\V1\CustomEmoji $custom_emoji - * Output only. A custom emoji. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); - parent::__construct($data); - } - - /** - * A basic emoji represented by a unicode string. - * - * Generated from protobuf field string unicode = 1; - * @return string - */ - public function getUnicode() - { - return $this->readOneof(1); - } - - public function hasUnicode() - { - return $this->hasOneof(1); - } - - /** - * A basic emoji represented by a unicode string. - * - * Generated from protobuf field string unicode = 1; - * @param string $var - * @return $this - */ - public function setUnicode($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Output only. A custom emoji. - * - * Generated from protobuf field .google.chat.v1.CustomEmoji custom_emoji = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Apps\Chat\V1\CustomEmoji|null - */ - public function getCustomEmoji() - { - return $this->readOneof(2); - } - - public function hasCustomEmoji() - { - return $this->hasOneof(2); - } - - /** - * Output only. A custom emoji. - * - * Generated from protobuf field .google.chat.v1.CustomEmoji custom_emoji = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Apps\Chat\V1\CustomEmoji $var - * @return $this - */ - public function setCustomEmoji($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\CustomEmoji::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getContent() - { - return $this->whichOneof("content"); - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/EmojiReactionSummary.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/EmojiReactionSummary.php deleted file mode 100644 index c607da712f81..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/EmojiReactionSummary.php +++ /dev/null @@ -1,121 +0,0 @@ -google.chat.v1.EmojiReactionSummary - */ -class EmojiReactionSummary extends \Google\Protobuf\Internal\Message -{ - /** - * Emoji associated with the reactions. - * - * Generated from protobuf field .google.chat.v1.Emoji emoji = 1; - */ - protected $emoji = null; - /** - * The total number of reactions using the associated emoji. - * - * Generated from protobuf field optional int32 reaction_count = 2; - */ - protected $reaction_count = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Emoji $emoji - * Emoji associated with the reactions. - * @type int $reaction_count - * The total number of reactions using the associated emoji. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); - parent::__construct($data); - } - - /** - * Emoji associated with the reactions. - * - * Generated from protobuf field .google.chat.v1.Emoji emoji = 1; - * @return \Google\Apps\Chat\V1\Emoji|null - */ - public function getEmoji() - { - return $this->emoji; - } - - public function hasEmoji() - { - return isset($this->emoji); - } - - public function clearEmoji() - { - unset($this->emoji); - } - - /** - * Emoji associated with the reactions. - * - * Generated from protobuf field .google.chat.v1.Emoji emoji = 1; - * @param \Google\Apps\Chat\V1\Emoji $var - * @return $this - */ - public function setEmoji($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Emoji::class); - $this->emoji = $var; - - return $this; - } - - /** - * The total number of reactions using the associated emoji. - * - * Generated from protobuf field optional int32 reaction_count = 2; - * @return int - */ - public function getReactionCount() - { - return isset($this->reaction_count) ? $this->reaction_count : 0; - } - - public function hasReactionCount() - { - return isset($this->reaction_count); - } - - public function clearReactionCount() - { - unset($this->reaction_count); - } - - /** - * The total number of reactions using the associated emoji. - * - * Generated from protobuf field optional int32 reaction_count = 2; - * @param int $var - * @return $this - */ - public function setReactionCount($var) - { - GPBUtil::checkInt32($var); - $this->reaction_count = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/FindDirectMessageRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/FindDirectMessageRequest.php deleted file mode 100644 index d8347a58af0b..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/FindDirectMessageRequest.php +++ /dev/null @@ -1,111 +0,0 @@ -google.chat.v1.FindDirectMessageRequest - */ -class FindDirectMessageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the user to find direct message with. - * Format: `users/{user}`, where `{user}` is either the `id` for the - * [person](https://developers.google.com/people/api/rest/v1/people) from the - * People API, or the `id` for the - * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) - * in the Directory API. For example, if the People API profile ID is - * `123456789`, you can find a direct message with that person by using - * `users/123456789` as the `name`. When [authenticated as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can use the email as an alias for `{user}`. For example, - * `users/example@gmail.com` where `example@gmail.com` is the email of the - * Google Chat user. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Required. Resource name of the user to find direct message with. - * Format: `users/{user}`, where `{user}` is either the `id` for the - * [person](https://developers.google.com/people/api/rest/v1/people) from the - * People API, or the `id` for the - * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) - * in the Directory API. For example, if the People API profile ID is - * `123456789`, you can find a direct message with that person by using - * `users/123456789` as the `name`. When [authenticated as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can use the email as an alias for `{user}`. For example, - * `users/example@gmail.com` where `example@gmail.com` is the email of the - * Google Chat user. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the user to find direct message with. - * Format: `users/{user}`, where `{user}` is either the `id` for the - * [person](https://developers.google.com/people/api/rest/v1/people) from the - * People API, or the `id` for the - * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) - * in the Directory API. For example, if the People API profile ID is - * `123456789`, you can find a direct message with that person by using - * `users/123456789` as the `name`. When [authenticated as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can use the email as an alias for `{user}`. For example, - * `users/example@gmail.com` where `example@gmail.com` is the email of the - * Google Chat user. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Required. Resource name of the user to find direct message with. - * Format: `users/{user}`, where `{user}` is either the `id` for the - * [person](https://developers.google.com/people/api/rest/v1/people) from the - * People API, or the `id` for the - * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) - * in the Directory API. For example, if the People API profile ID is - * `123456789`, you can find a direct message with that person by using - * `users/123456789` as the `name`. When [authenticated as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can use the email as an alias for `{user}`. For example, - * `users/example@gmail.com` where `example@gmail.com` is the email of the - * Google Chat user. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetAttachmentRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetAttachmentRequest.php deleted file mode 100644 index 4e3a33a77b87..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetAttachmentRequest.php +++ /dev/null @@ -1,86 +0,0 @@ -google.chat.v1.GetAttachmentRequest - */ -class GetAttachmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the attachment, in the form - * `spaces/{space}/messages/{message}/attachments/{attachment}`. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the attachment, in the form - * `spaces/{space}/messages/{message}/attachments/{attachment}`. Please see - * {@see ChatServiceClient::attachmentName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\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. Resource name of the attachment, in the form - * `spaces/{space}/messages/{message}/attachments/{attachment}`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the attachment, in the form - * `spaces/{space}/messages/{message}/attachments/{attachment}`. - * - * 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. Resource name of the attachment, in the form - * `spaces/{space}/messages/{message}/attachments/{attachment}`. - * - * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMembershipRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMembershipRequest.php deleted file mode 100644 index 55823f0ea600..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMembershipRequest.php +++ /dev/null @@ -1,195 +0,0 @@ -google.chat.v1.GetMembershipRequest - */ -class GetMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the membership to retrieve. - * To get the app's own membership [by using user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can optionally use `spaces/{space}/members/app`. - * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` - * When [authenticated as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can use the user's email as an alias for `{member}`. For example, - * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the - * email of the Google Chat user. - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` - * [OAuth 2.0 - * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Getting app memberships in a space isn't supported when using admin access. - * - * Generated from protobuf field bool use_admin_access = 3; - */ - protected $use_admin_access = false; - - /** - * @param string $name Required. Resource name of the membership to retrieve. - * - * To get the app's own membership [by using user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can optionally use `spaces/{space}/members/app`. - * - * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` - * - * When [authenticated as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can use the user's email as an alias for `{member}`. For example, - * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the - * email of the Google Chat user. Please see - * {@see ChatServiceClient::membershipName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\GetMembershipRequest - * - * @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. Resource name of the membership to retrieve. - * To get the app's own membership [by using user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can optionally use `spaces/{space}/members/app`. - * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` - * When [authenticated as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can use the user's email as an alias for `{member}`. For example, - * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the - * email of the Google Chat user. - * @type bool $use_admin_access - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` - * [OAuth 2.0 - * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Getting app memberships in a space isn't supported when using admin access. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the membership to retrieve. - * To get the app's own membership [by using user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can optionally use `spaces/{space}/members/app`. - * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` - * When [authenticated as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can use the user's email as an alias for `{member}`. For example, - * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the - * email of the Google Chat user. - * - * 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. Resource name of the membership to retrieve. - * To get the app's own membership [by using user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can optionally use `spaces/{space}/members/app`. - * Format: `spaces/{space}/members/{member}` or `spaces/{space}/members/app` - * When [authenticated as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * you can use the user's email as an alias for `{member}`. For example, - * `spaces/{space}/members/example@gmail.com` where `example@gmail.com` is the - * email of the Google Chat user. - * - * 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; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` - * [OAuth 2.0 - * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Getting app memberships in a space isn't supported when using admin access. - * - * Generated from protobuf field bool use_admin_access = 3; - * @return bool - */ - public function getUseAdminAccess() - { - return $this->use_admin_access; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` or `chat.admin.memberships.readonly` - * [OAuth 2.0 - * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Getting app memberships in a space isn't supported when using admin access. - * - * Generated from protobuf field bool use_admin_access = 3; - * @param bool $var - * @return $this - */ - public function setUseAdminAccess($var) - { - GPBUtil::checkBool($var); - $this->use_admin_access = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMessageRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMessageRequest.php deleted file mode 100644 index 99403d2bead6..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetMessageRequest.php +++ /dev/null @@ -1,108 +0,0 @@ -google.chat.v1.GetMessageRequest - */ -class GetMessageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the message. - * Format: `spaces/{space}/messages/{message}` - * If you've set a custom ID for your message, you can use the value from the - * `clientAssignedMessageId` field for `{message}`. For details, see [Name a - * message] - * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the message. - * - * Format: `spaces/{space}/messages/{message}` - * - * If you've set a custom ID for your message, you can use the value from the - * `clientAssignedMessageId` field for `{message}`. For details, see [Name a - * message] - * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). Please see - * {@see ChatServiceClient::messageName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\GetMessageRequest - * - * @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. Resource name of the message. - * Format: `spaces/{space}/messages/{message}` - * If you've set a custom ID for your message, you can use the value from the - * `clientAssignedMessageId` field for `{message}`. For details, see [Name a - * message] - * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the message. - * Format: `spaces/{space}/messages/{message}` - * If you've set a custom ID for your message, you can use the value from the - * `clientAssignedMessageId` field for `{message}`. For details, see [Name a - * message] - * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * 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. Resource name of the message. - * Format: `spaces/{space}/messages/{message}` - * If you've set a custom ID for your message, you can use the value from the - * `clientAssignedMessageId` field for `{message}`. For details, see [Name a - * message] - * (https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceEventRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceEventRequest.php deleted file mode 100644 index 892b3632ebb6..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceEventRequest.php +++ /dev/null @@ -1,87 +0,0 @@ -google.chat.v1.GetSpaceEventRequest - */ -class GetSpaceEventRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the space event. - * Format: `spaces/{space}/spaceEvents/{spaceEvent}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. The resource name of the space event. - * - * Format: `spaces/{space}/spaceEvents/{spaceEvent}` - * Please see {@see ChatServiceClient::spaceEventName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\GetSpaceEventRequest - * - * @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 resource name of the space event. - * Format: `spaces/{space}/spaceEvents/{spaceEvent}` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\SpaceEvent::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the space event. - * Format: `spaces/{space}/spaceEvents/{spaceEvent}` - * - * 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 resource name of the space event. - * Format: `spaces/{space}/spaceEvents/{spaceEvent}` - * - * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceReadStateRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceReadStateRequest.php deleted file mode 100644 index 388b0ec0c154..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceReadStateRequest.php +++ /dev/null @@ -1,127 +0,0 @@ -google.chat.v1.GetSpaceReadStateRequest - */ -class GetSpaceReadStateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the space read state to retrieve. - * Only supports getting read state for the calling user. - * To refer to the calling user, set one of the following: - * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/spaceReadState`. - * - Their user id. For example, - * `users/123456789/spaces/{space}/spaceReadState`. - * Format: users/{user}/spaces/{space}/spaceReadState - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the space read state to retrieve. - * - * Only supports getting read state for the calling user. - * - * To refer to the calling user, set one of the following: - * - * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - * - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/spaceReadState`. - * - * - Their user id. For example, - * `users/123456789/spaces/{space}/spaceReadState`. - * - * Format: users/{user}/spaces/{space}/spaceReadState - * Please see {@see ChatServiceClient::spaceReadStateName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\GetSpaceReadStateRequest - * - * @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. Resource name of the space read state to retrieve. - * Only supports getting read state for the calling user. - * To refer to the calling user, set one of the following: - * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/spaceReadState`. - * - Their user id. For example, - * `users/123456789/spaces/{space}/spaceReadState`. - * Format: users/{user}/spaces/{space}/spaceReadState - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\SpaceReadState::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the space read state to retrieve. - * Only supports getting read state for the calling user. - * To refer to the calling user, set one of the following: - * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/spaceReadState`. - * - Their user id. For example, - * `users/123456789/spaces/{space}/spaceReadState`. - * Format: users/{user}/spaces/{space}/spaceReadState - * - * 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. Resource name of the space read state to retrieve. - * Only supports getting read state for the calling user. - * To refer to the calling user, set one of the following: - * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/spaceReadState`. - * - Their user id. For example, - * `users/123456789/spaces/{space}/spaceReadState`. - * Format: users/{user}/spaces/{space}/spaceReadState - * - * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceRequest.php deleted file mode 100644 index 6b3ee5dbaefd..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetSpaceRequest.php +++ /dev/null @@ -1,145 +0,0 @@ -google.chat.v1.GetSpaceRequest - */ -class GetSpaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the space, in the form `spaces/{space}`. - * Format: `spaces/{space}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 - * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * - * Generated from protobuf field bool use_admin_access = 2; - */ - protected $use_admin_access = false; - - /** - * @param string $name Required. Resource name of the space, in the form `spaces/{space}`. - * - * Format: `spaces/{space}` - * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\GetSpaceRequest - * - * @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. Resource name of the space, in the form `spaces/{space}`. - * Format: `spaces/{space}` - * @type bool $use_admin_access - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 - * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the space, in the form `spaces/{space}`. - * Format: `spaces/{space}` - * - * 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. Resource name of the space, in the form `spaces/{space}`. - * Format: `spaces/{space}` - * - * 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; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 - * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * - * Generated from protobuf field bool use_admin_access = 2; - * @return bool - */ - public function getUseAdminAccess() - { - return $this->use_admin_access; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.spaces` or `chat.admin.spaces.readonly` [OAuth 2.0 - * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * - * Generated from protobuf field bool use_admin_access = 2; - * @param bool $var - * @return $this - */ - public function setUseAdminAccess($var) - { - GPBUtil::checkBool($var); - $this->use_admin_access = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetThreadReadStateRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetThreadReadStateRequest.php deleted file mode 100644 index 66ef60d6afb3..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/GetThreadReadStateRequest.php +++ /dev/null @@ -1,132 +0,0 @@ -google.chat.v1.GetThreadReadStateRequest - */ -class GetThreadReadStateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the thread read state to retrieve. - * Only supports getting read state for the calling user. - * To refer to the calling user, set one of the following: - * - The `me` alias. For example, - * `users/me/spaces/{space}/threads/{thread}/threadReadState`. - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. - * - Their user id. For example, - * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. - * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $name = ''; - - /** - * @param string $name Required. Resource name of the thread read state to retrieve. - * - * Only supports getting read state for the calling user. - * - * To refer to the calling user, set one of the following: - * - * - The `me` alias. For example, - * `users/me/spaces/{space}/threads/{thread}/threadReadState`. - * - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. - * - * - Their user id. For example, - * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. - * - * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState - * Please see {@see ChatServiceClient::threadReadStateName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\GetThreadReadStateRequest - * - * @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. Resource name of the thread read state to retrieve. - * Only supports getting read state for the calling user. - * To refer to the calling user, set one of the following: - * - The `me` alias. For example, - * `users/me/spaces/{space}/threads/{thread}/threadReadState`. - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. - * - Their user id. For example, - * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. - * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\ThreadReadState::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the thread read state to retrieve. - * Only supports getting read state for the calling user. - * To refer to the calling user, set one of the following: - * - The `me` alias. For example, - * `users/me/spaces/{space}/threads/{thread}/threadReadState`. - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. - * - Their user id. For example, - * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. - * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState - * - * 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. Resource name of the thread read state to retrieve. - * Only supports getting read state for the calling user. - * To refer to the calling user, set one of the following: - * - The `me` alias. For example, - * `users/me/spaces/{space}/threads/{thread}/threadReadState`. - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/threads/{thread}/threadReadState`. - * - Their user id. For example, - * `users/123456789/spaces/{space}/threads/{thread}/threadReadState`. - * Format: users/{user}/spaces/{space}/threads/{thread}/threadReadState - * - * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Group.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Group.php deleted file mode 100644 index abd3dff79c75..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Group.php +++ /dev/null @@ -1,83 +0,0 @@ -google.chat.v1.Group - */ -class Group extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name for a Google Group. - * Represents a - * [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in - * Cloud Identity Groups API. - * Format: groups/{group} - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name for a Google Group. - * Represents a - * [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in - * Cloud Identity Groups API. - * Format: groups/{group} - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Group::initOnce(); - parent::__construct($data); - } - - /** - * Resource name for a Google Group. - * Represents a - * [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in - * Cloud Identity Groups API. - * Format: groups/{group} - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name for a Google Group. - * Represents a - * [group](https://cloud.google.com/identity/docs/reference/rest/v1/groups) in - * Cloud Identity Groups API. - * Format: groups/{group} - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/HistoryState.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/HistoryState.php deleted file mode 100644 index 2dadcbc53b5f..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/HistoryState.php +++ /dev/null @@ -1,65 +0,0 @@ -google.chat.v1.HistoryState - */ -class HistoryState -{ - /** - * Default value. Do not use. - * - * Generated from protobuf enum HISTORY_STATE_UNSPECIFIED = 0; - */ - const HISTORY_STATE_UNSPECIFIED = 0; - /** - * History off. [Messages and threads are kept for 24 - * hours](https://support.google.com/chat/answer/7664687). - * - * Generated from protobuf enum HISTORY_OFF = 1; - */ - const HISTORY_OFF = 1; - /** - * History on. The organization's [Vault retention - * rules](https://support.google.com/vault/answer/7657597) specify for - * how long messages and threads are kept. - * - * Generated from protobuf enum HISTORY_ON = 2; - */ - const HISTORY_ON = 2; - - private static $valueToName = [ - self::HISTORY_STATE_UNSPECIFIED => 'HISTORY_STATE_UNSPECIFIED', - self::HISTORY_OFF => 'HISTORY_OFF', - self::HISTORY_ON => 'HISTORY_ON', - ]; - - 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsRequest.php deleted file mode 100644 index 6cdec7cabeab..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsRequest.php +++ /dev/null @@ -1,512 +0,0 @@ -google.chat.v1.ListMembershipsRequest - */ -class ListMembershipsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the space for which to fetch a membership - * list. - * Format: spaces/{space} - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of memberships to return. The service might - * return fewer than this value. - * If unspecified, at most 100 memberships are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * Negative values return an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous call to list memberships. - * Provide this parameter to retrieve the subsequent page. - * When paginating, all other parameters provided should match the call that - * provided the page token. Passing different values to the other parameters - * might lead to unexpected results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A query filter. - * You can filter memberships by a member's role - * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) - * and type - * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). - * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. - * To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also - * filter for `member.type` using the `!=` operator. - * To filter by both role and type, use the `AND` operator. To filter by - * either role or type, use the `OR` operator. - * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required - * when `use_admin_access` is set to true. Other member type filters will be - * rejected. - * For example, the following queries are valid: - * ``` - * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" - * member.type = "HUMAN" AND role = "ROLE_MANAGER" - * member.type != "BOT" - * ``` - * The following queries are invalid: - * ``` - * member.type = "HUMAN" AND member.type = "BOT" - * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - /** - * Optional. When `true`, also returns memberships associated with a - * [Google Group][google.chat.v1.Membership.group_member], in - * addition to other types of memberships. If a - * [filter][google.chat.v1.ListMembershipsRequest.filter] is set, - * [Google Group][google.chat.v1.Membership.group_member] - * memberships that don't match the filter criteria aren't returned. - * - * Generated from protobuf field bool show_groups = 6 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $show_groups = false; - /** - * Optional. When `true`, also returns memberships associated with - * [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in - * addition to other types of memberships. If a - * filter is set, - * [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships - * that don't match the filter criteria aren't returned. - * Currently requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * Generated from protobuf field bool show_invited = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $show_invited = false; - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires either the `chat.admin.memberships.readonly` or - * `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Listing app memberships in a space isn't supported when using admin access. - * - * Generated from protobuf field bool use_admin_access = 8; - */ - protected $use_admin_access = false; - - /** - * @param string $parent Required. The resource name of the space for which to fetch a membership - * list. - * - * Format: spaces/{space} - * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\ListMembershipsRequest - * - * @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 space for which to fetch a membership - * list. - * Format: spaces/{space} - * @type int $page_size - * Optional. The maximum number of memberships to return. The service might - * return fewer than this value. - * If unspecified, at most 100 memberships are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * Negative values return an `INVALID_ARGUMENT` error. - * @type string $page_token - * Optional. A page token, received from a previous call to list memberships. - * Provide this parameter to retrieve the subsequent page. - * When paginating, all other parameters provided should match the call that - * provided the page token. Passing different values to the other parameters - * might lead to unexpected results. - * @type string $filter - * Optional. A query filter. - * You can filter memberships by a member's role - * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) - * and type - * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). - * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. - * To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also - * filter for `member.type` using the `!=` operator. - * To filter by both role and type, use the `AND` operator. To filter by - * either role or type, use the `OR` operator. - * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required - * when `use_admin_access` is set to true. Other member type filters will be - * rejected. - * For example, the following queries are valid: - * ``` - * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" - * member.type = "HUMAN" AND role = "ROLE_MANAGER" - * member.type != "BOT" - * ``` - * The following queries are invalid: - * ``` - * member.type = "HUMAN" AND member.type = "BOT" - * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * @type bool $show_groups - * Optional. When `true`, also returns memberships associated with a - * [Google Group][google.chat.v1.Membership.group_member], in - * addition to other types of memberships. If a - * [filter][google.chat.v1.ListMembershipsRequest.filter] is set, - * [Google Group][google.chat.v1.Membership.group_member] - * memberships that don't match the filter criteria aren't returned. - * @type bool $show_invited - * Optional. When `true`, also returns memberships associated with - * [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in - * addition to other types of memberships. If a - * filter is set, - * [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships - * that don't match the filter criteria aren't returned. - * Currently requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * @type bool $use_admin_access - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires either the `chat.admin.memberships.readonly` or - * `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Listing app memberships in a space isn't supported when using admin access. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the space for which to fetch a membership - * list. - * Format: spaces/{space} - * - * 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 space for which to fetch a membership - * list. - * Format: spaces/{space} - * - * 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. The maximum number of memberships to return. The service might - * return fewer than this value. - * If unspecified, at most 100 memberships are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * Negative values return an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of memberships to return. The service might - * return fewer than this value. - * If unspecified, at most 100 memberships are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * Negative values return an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. A page token, received from a previous call to list memberships. - * Provide this parameter to retrieve the subsequent page. - * When paginating, all other parameters provided should match the call that - * provided the page token. Passing different values to the other parameters - * might lead to unexpected results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous call to list memberships. - * Provide this parameter to retrieve the subsequent page. - * When paginating, all other parameters provided should match the call that - * provided the page token. Passing different values to the other parameters - * might lead to unexpected results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A query filter. - * You can filter memberships by a member's role - * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) - * and type - * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). - * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. - * To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also - * filter for `member.type` using the `!=` operator. - * To filter by both role and type, use the `AND` operator. To filter by - * either role or type, use the `OR` operator. - * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required - * when `use_admin_access` is set to true. Other member type filters will be - * rejected. - * For example, the following queries are valid: - * ``` - * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" - * member.type = "HUMAN" AND role = "ROLE_MANAGER" - * member.type != "BOT" - * ``` - * The following queries are invalid: - * ``` - * member.type = "HUMAN" AND member.type = "BOT" - * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A query filter. - * You can filter memberships by a member's role - * ([`role`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members#membershiprole)) - * and type - * ([`member.type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/User#type)). - * To filter by role, set `role` to `ROLE_MEMBER` or `ROLE_MANAGER`. - * To filter by type, set `member.type` to `HUMAN` or `BOT`. You can also - * filter for `member.type` using the `!=` operator. - * To filter by both role and type, use the `AND` operator. To filter by - * either role or type, use the `OR` operator. - * Either `member.type = "HUMAN"` or `member.type != "BOT"` is required - * when `use_admin_access` is set to true. Other member type filters will be - * rejected. - * For example, the following queries are valid: - * ``` - * role = "ROLE_MANAGER" OR role = "ROLE_MEMBER" - * member.type = "HUMAN" AND role = "ROLE_MANAGER" - * member.type != "BOT" - * ``` - * The following queries are invalid: - * ``` - * member.type = "HUMAN" AND member.type = "BOT" - * role = "ROLE_MANAGER" AND role = "ROLE_MEMBER" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional. When `true`, also returns memberships associated with a - * [Google Group][google.chat.v1.Membership.group_member], in - * addition to other types of memberships. If a - * [filter][google.chat.v1.ListMembershipsRequest.filter] is set, - * [Google Group][google.chat.v1.Membership.group_member] - * memberships that don't match the filter criteria aren't returned. - * - * Generated from protobuf field bool show_groups = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getShowGroups() - { - return $this->show_groups; - } - - /** - * Optional. When `true`, also returns memberships associated with a - * [Google Group][google.chat.v1.Membership.group_member], in - * addition to other types of memberships. If a - * [filter][google.chat.v1.ListMembershipsRequest.filter] is set, - * [Google Group][google.chat.v1.Membership.group_member] - * memberships that don't match the filter criteria aren't returned. - * - * Generated from protobuf field bool show_groups = 6 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setShowGroups($var) - { - GPBUtil::checkBool($var); - $this->show_groups = $var; - - return $this; - } - - /** - * Optional. When `true`, also returns memberships associated with - * [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in - * addition to other types of memberships. If a - * filter is set, - * [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships - * that don't match the filter criteria aren't returned. - * Currently requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * Generated from protobuf field bool show_invited = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getShowInvited() - { - return $this->show_invited; - } - - /** - * Optional. When `true`, also returns memberships associated with - * [invited][google.chat.v1.Membership.MembershipState.INVITED] members, in - * addition to other types of memberships. If a - * filter is set, - * [invited][google.chat.v1.Membership.MembershipState.INVITED] memberships - * that don't match the filter criteria aren't returned. - * Currently requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * Generated from protobuf field bool show_invited = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setShowInvited($var) - { - GPBUtil::checkBool($var); - $this->show_invited = $var; - - return $this; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires either the `chat.admin.memberships.readonly` or - * `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Listing app memberships in a space isn't supported when using admin access. - * - * Generated from protobuf field bool use_admin_access = 8; - * @return bool - */ - public function getUseAdminAccess() - { - return $this->use_admin_access; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires either the `chat.admin.memberships.readonly` or - * `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Listing app memberships in a space isn't supported when using admin access. - * - * Generated from protobuf field bool use_admin_access = 8; - * @param bool $var - * @return $this - */ - public function setUseAdminAccess($var) - { - GPBUtil::checkBool($var); - $this->use_admin_access = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsResponse.php deleted file mode 100644 index 683786ade983..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMembershipsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.chat.v1.ListMembershipsResponse - */ -class ListMembershipsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Unordered list. List of memberships in the requested (or first) page. - * - * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 1 [(.google.api.field_behavior) = UNORDERED_LIST]; - */ - private $memberships; - /** - * A token that you can send as `pageToken` to retrieve the next page of - * results. If empty, 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 array<\Google\Apps\Chat\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $memberships - * Unordered list. List of memberships in the requested (or first) page. - * @type string $next_page_token - * A token that you can send as `pageToken` to retrieve the next page of - * results. If empty, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Unordered list. List of memberships in the requested (or first) page. - * - * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 1 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMemberships() - { - return $this->memberships; - } - - /** - * Unordered list. List of memberships in the requested (or first) page. - * - * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 1 [(.google.api.field_behavior) = UNORDERED_LIST]; - * @param array<\Google\Apps\Chat\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMemberships($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Membership::class); - $this->memberships = $arr; - - return $this; - } - - /** - * A token that you can send as `pageToken` to retrieve the next page of - * results. If empty, 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 that you can send as `pageToken` to retrieve the next page of - * results. If empty, 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesRequest.php deleted file mode 100644 index ab83af2f4080..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesRequest.php +++ /dev/null @@ -1,421 +0,0 @@ -google.chat.v1.ListMessagesRequest - */ -class ListMessagesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The resource name of the space to list messages from. - * Format: `spaces/{space}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * The maximum number of messages returned. The service might return fewer - * messages than this value. - * If unspecified, at most 25 are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * Negative values return an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * Optional, if resuming from a previous query. - * A page token received from a previous list messages call. Provide this - * parameter to retrieve the subsequent page. - * When paginating, all other parameters provided should match the call that - * provided the page token. Passing different values to the other parameters - * might lead to unexpected results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * A query filter. - * You can filter messages by date (`create_time`) and thread (`thread.name`). - * To filter messages by the date they were created, specify the `create_time` - * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) - * format and double quotation marks. For example, - * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to - * list messages that were created after a timestamp, or the less than - * operator `<` to list messages that were created before a timestamp. To - * filter messages within a time interval, use the `AND` operator between two - * timestamps. - * To filter by thread, specify the `thread.name`, formatted as - * `spaces/{space}/threads/{thread}`. You can only specify one - * `thread.name` per query. - * To filter by both thread and date, use the `AND` operator in your query. - * For example, the following queries are valid: - * ``` - * create_time > "2012-04-21T11:30:00-04:00" - * create_time > "2012-04-21T11:30:00-04:00" AND - * thread.name = spaces/AAAAAAAAAAA/threads/123 - * create_time > "2012-04-21T11:30:00+00:00" AND - * create_time < "2013-01-01T00:00:00+00:00" AND - * thread.name = spaces/AAAAAAAAAAA/threads/123 - * thread.name = spaces/AAAAAAAAAAA/threads/123 - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 4; - */ - protected $filter = ''; - /** - * Optional, if resuming from a previous query. - * How the list of messages is ordered. Specify a value to order by an - * ordering operation. Valid ordering operation values are as follows: - * - `ASC` for ascending. - * - `DESC` for descending. - * The default ordering is `create_time ASC`. - * - * Generated from protobuf field string order_by = 5; - */ - protected $order_by = ''; - /** - * Whether to include deleted messages. Deleted messages include deleted time - * and metadata about their deletion, but message content is unavailable. - * - * Generated from protobuf field bool show_deleted = 6; - */ - protected $show_deleted = false; - - /** - * @param string $parent Required. The resource name of the space to list messages from. - * - * Format: `spaces/{space}` - * Please see {@see ChatServiceClient::spaceName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\ListMessagesRequest - * - * @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 space to list messages from. - * Format: `spaces/{space}` - * @type int $page_size - * The maximum number of messages returned. The service might return fewer - * messages than this value. - * If unspecified, at most 25 are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * Negative values return an `INVALID_ARGUMENT` error. - * @type string $page_token - * Optional, if resuming from a previous query. - * A page token received from a previous list messages call. Provide this - * parameter to retrieve the subsequent page. - * When paginating, all other parameters provided should match the call that - * provided the page token. Passing different values to the other parameters - * might lead to unexpected results. - * @type string $filter - * A query filter. - * You can filter messages by date (`create_time`) and thread (`thread.name`). - * To filter messages by the date they were created, specify the `create_time` - * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) - * format and double quotation marks. For example, - * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to - * list messages that were created after a timestamp, or the less than - * operator `<` to list messages that were created before a timestamp. To - * filter messages within a time interval, use the `AND` operator between two - * timestamps. - * To filter by thread, specify the `thread.name`, formatted as - * `spaces/{space}/threads/{thread}`. You can only specify one - * `thread.name` per query. - * To filter by both thread and date, use the `AND` operator in your query. - * For example, the following queries are valid: - * ``` - * create_time > "2012-04-21T11:30:00-04:00" - * create_time > "2012-04-21T11:30:00-04:00" AND - * thread.name = spaces/AAAAAAAAAAA/threads/123 - * create_time > "2012-04-21T11:30:00+00:00" AND - * create_time < "2013-01-01T00:00:00+00:00" AND - * thread.name = spaces/AAAAAAAAAAA/threads/123 - * thread.name = spaces/AAAAAAAAAAA/threads/123 - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * @type string $order_by - * Optional, if resuming from a previous query. - * How the list of messages is ordered. Specify a value to order by an - * ordering operation. Valid ordering operation values are as follows: - * - `ASC` for ascending. - * - `DESC` for descending. - * The default ordering is `create_time ASC`. - * @type bool $show_deleted - * Whether to include deleted messages. Deleted messages include deleted time - * and metadata about their deletion, but message content is unavailable. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Required. The resource name of the space to list messages from. - * Format: `spaces/{space}` - * - * 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 space to list messages from. - * Format: `spaces/{space}` - * - * 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 messages returned. The service might return fewer - * messages than this value. - * If unspecified, at most 25 are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * Negative values return an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of messages returned. The service might return fewer - * messages than this value. - * If unspecified, at most 25 are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * Negative values return an `INVALID_ARGUMENT` error. - * - * 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; - } - - /** - * Optional, if resuming from a previous query. - * A page token received from a previous list messages call. Provide this - * parameter to retrieve the subsequent page. - * When paginating, all other parameters provided should match the call that - * provided the page token. Passing different values to the other parameters - * might lead to unexpected results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional, if resuming from a previous query. - * A page token received from a previous list messages call. Provide this - * parameter to retrieve the subsequent page. - * When paginating, all other parameters provided should match the call that - * provided the page token. Passing different values to the other parameters - * might lead to unexpected results. - * - * 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; - } - - /** - * A query filter. - * You can filter messages by date (`create_time`) and thread (`thread.name`). - * To filter messages by the date they were created, specify the `create_time` - * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) - * format and double quotation marks. For example, - * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to - * list messages that were created after a timestamp, or the less than - * operator `<` to list messages that were created before a timestamp. To - * filter messages within a time interval, use the `AND` operator between two - * timestamps. - * To filter by thread, specify the `thread.name`, formatted as - * `spaces/{space}/threads/{thread}`. You can only specify one - * `thread.name` per query. - * To filter by both thread and date, use the `AND` operator in your query. - * For example, the following queries are valid: - * ``` - * create_time > "2012-04-21T11:30:00-04:00" - * create_time > "2012-04-21T11:30:00-04:00" AND - * thread.name = spaces/AAAAAAAAAAA/threads/123 - * create_time > "2012-04-21T11:30:00+00:00" AND - * create_time < "2013-01-01T00:00:00+00:00" AND - * thread.name = spaces/AAAAAAAAAAA/threads/123 - * thread.name = spaces/AAAAAAAAAAA/threads/123 - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 4; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * A query filter. - * You can filter messages by date (`create_time`) and thread (`thread.name`). - * To filter messages by the date they were created, specify the `create_time` - * with a timestamp in [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) - * format and double quotation marks. For example, - * `"2023-04-21T11:30:00-04:00"`. You can use the greater than operator `>` to - * list messages that were created after a timestamp, or the less than - * operator `<` to list messages that were created before a timestamp. To - * filter messages within a time interval, use the `AND` operator between two - * timestamps. - * To filter by thread, specify the `thread.name`, formatted as - * `spaces/{space}/threads/{thread}`. You can only specify one - * `thread.name` per query. - * To filter by both thread and date, use the `AND` operator in your query. - * For example, the following queries are valid: - * ``` - * create_time > "2012-04-21T11:30:00-04:00" - * create_time > "2012-04-21T11:30:00-04:00" AND - * thread.name = spaces/AAAAAAAAAAA/threads/123 - * create_time > "2012-04-21T11:30:00+00:00" AND - * create_time < "2013-01-01T00:00:00+00:00" AND - * thread.name = spaces/AAAAAAAAAAA/threads/123 - * thread.name = spaces/AAAAAAAAAAA/threads/123 - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 4; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - - /** - * Optional, if resuming from a previous query. - * How the list of messages is ordered. Specify a value to order by an - * ordering operation. Valid ordering operation values are as follows: - * - `ASC` for ascending. - * - `DESC` for descending. - * The default ordering is `create_time ASC`. - * - * Generated from protobuf field string order_by = 5; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional, if resuming from a previous query. - * How the list of messages is ordered. Specify a value to order by an - * ordering operation. Valid ordering operation values are as follows: - * - `ASC` for ascending. - * - `DESC` for descending. - * The default ordering is `create_time ASC`. - * - * Generated from protobuf field string order_by = 5; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - - /** - * Whether to include deleted messages. Deleted messages include deleted time - * and metadata about their deletion, but message content is unavailable. - * - * Generated from protobuf field bool show_deleted = 6; - * @return bool - */ - public function getShowDeleted() - { - return $this->show_deleted; - } - - /** - * Whether to include deleted messages. Deleted messages include deleted time - * and metadata about their deletion, but message content is unavailable. - * - * Generated from protobuf field bool show_deleted = 6; - * @param bool $var - * @return $this - */ - public function setShowDeleted($var) - { - GPBUtil::checkBool($var); - $this->show_deleted = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesResponse.php deleted file mode 100644 index 2b34fab21efd..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListMessagesResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.chat.v1.ListMessagesResponse - */ -class ListMessagesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of messages. - * - * Generated from protobuf field repeated .google.chat.v1.Message messages = 1; - */ - private $messages; - /** - * You can send a token as `pageToken` to retrieve the next page of - * results. If empty, 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 array<\Google\Apps\Chat\V1\Message>|\Google\Protobuf\Internal\RepeatedField $messages - * List of messages. - * @type string $next_page_token - * You can send a token as `pageToken` to retrieve the next page of - * results. If empty, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * List of messages. - * - * Generated from protobuf field repeated .google.chat.v1.Message messages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMessages() - { - return $this->messages; - } - - /** - * List of messages. - * - * Generated from protobuf field repeated .google.chat.v1.Message messages = 1; - * @param array<\Google\Apps\Chat\V1\Message>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Message::class); - $this->messages = $arr; - - return $this; - } - - /** - * You can send a token as `pageToken` to retrieve the next page of - * results. If empty, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * You can send a token as `pageToken` to retrieve the next page of - * results. If empty, 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsRequest.php deleted file mode 100644 index 57ee4da7a254..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsRequest.php +++ /dev/null @@ -1,349 +0,0 @@ -google.chat.v1.ListReactionsRequest - */ -class ListReactionsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The message users reacted to. - * Format: `spaces/{space}/messages/{message}` - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of reactions returned. The service can return - * fewer reactions than this value. If unspecified, the default value is 25. - * The maximum value is 200; values above 200 are changed to 200. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. (If resuming from a previous query.) - * A page token received from a previous list reactions call. Provide this - * to retrieve the subsequent page. - * When paginating, the filter value should match the call that provided the - * page token. Passing a different value might lead to unexpected results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A query filter. - * You can filter reactions by - * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) - * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and - * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) - * (`user.name`). - * To filter reactions for multiple emojis or users, join similar fields - * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = - * "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. - * To filter reactions by emoji and user, use the `AND` operator, such as - * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. - * If your query uses both `AND` and `OR`, group them with parentheses. - * For example, the following queries are valid: - * ``` - * user.name = "users/{user}" - * emoji.unicode = "🙂" - * emoji.custom_emoji.uid = "{uid}" - * emoji.unicode = "🙂" OR emoji.unicode = "👍" - * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" - * emoji.unicode = "🙂" AND user.name = "users/{user}" - * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") - * AND user.name = "users/{user}" - * ``` - * The following queries are invalid: - * ``` - * emoji.unicode = "🙂" AND emoji.unicode = "👍" - * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" - * emoji.unicode = "🙂" OR user.name = "users/{user}" - * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR - * user.name = "users/{user}" - * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" - * AND user.name = "users/{user}" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. The message users reacted to. - * - * Format: `spaces/{space}/messages/{message}` - * Please see {@see ChatServiceClient::messageName()} for help formatting this field. - * - * @return \Google\Apps\Chat\V1\ListReactionsRequest - * - * @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 message users reacted to. - * Format: `spaces/{space}/messages/{message}` - * @type int $page_size - * Optional. The maximum number of reactions returned. The service can return - * fewer reactions than this value. If unspecified, the default value is 25. - * The maximum value is 200; values above 200 are changed to 200. - * @type string $page_token - * Optional. (If resuming from a previous query.) - * A page token received from a previous list reactions call. Provide this - * to retrieve the subsequent page. - * When paginating, the filter value should match the call that provided the - * page token. Passing a different value might lead to unexpected results. - * @type string $filter - * Optional. A query filter. - * You can filter reactions by - * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) - * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and - * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) - * (`user.name`). - * To filter reactions for multiple emojis or users, join similar fields - * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = - * "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. - * To filter reactions by emoji and user, use the `AND` operator, such as - * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. - * If your query uses both `AND` and `OR`, group them with parentheses. - * For example, the following queries are valid: - * ``` - * user.name = "users/{user}" - * emoji.unicode = "🙂" - * emoji.custom_emoji.uid = "{uid}" - * emoji.unicode = "🙂" OR emoji.unicode = "👍" - * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" - * emoji.unicode = "🙂" AND user.name = "users/{user}" - * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") - * AND user.name = "users/{user}" - * ``` - * The following queries are invalid: - * ``` - * emoji.unicode = "🙂" AND emoji.unicode = "👍" - * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" - * emoji.unicode = "🙂" OR user.name = "users/{user}" - * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR - * user.name = "users/{user}" - * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" - * AND user.name = "users/{user}" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); - parent::__construct($data); - } - - /** - * Required. The message users reacted to. - * Format: `spaces/{space}/messages/{message}` - * - * 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 message users reacted to. - * Format: `spaces/{space}/messages/{message}` - * - * 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. The maximum number of reactions returned. The service can return - * fewer reactions than this value. If unspecified, the default value is 25. - * The maximum value is 200; values above 200 are changed to 200. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of reactions returned. The service can return - * fewer reactions than this value. If unspecified, the default value is 25. - * The maximum value is 200; values above 200 are changed to 200. - * - * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * Optional. (If resuming from a previous query.) - * A page token received from a previous list reactions call. Provide this - * to retrieve the subsequent page. - * When paginating, the filter value should match the call that provided the - * page token. Passing a different value might lead to unexpected results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. (If resuming from a previous query.) - * A page token received from a previous list reactions call. Provide this - * to retrieve the subsequent page. - * When paginating, the filter value should match the call that provided the - * page token. Passing a different value might lead to unexpected results. - * - * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A query filter. - * You can filter reactions by - * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) - * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and - * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) - * (`user.name`). - * To filter reactions for multiple emojis or users, join similar fields - * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = - * "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. - * To filter reactions by emoji and user, use the `AND` operator, such as - * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. - * If your query uses both `AND` and `OR`, group them with parentheses. - * For example, the following queries are valid: - * ``` - * user.name = "users/{user}" - * emoji.unicode = "🙂" - * emoji.custom_emoji.uid = "{uid}" - * emoji.unicode = "🙂" OR emoji.unicode = "👍" - * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" - * emoji.unicode = "🙂" AND user.name = "users/{user}" - * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") - * AND user.name = "users/{user}" - * ``` - * The following queries are invalid: - * ``` - * emoji.unicode = "🙂" AND emoji.unicode = "👍" - * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" - * emoji.unicode = "🙂" OR user.name = "users/{user}" - * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR - * user.name = "users/{user}" - * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" - * AND user.name = "users/{user}" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A query filter. - * You can filter reactions by - * [emoji](https://developers.google.com/workspace/chat/api/reference/rest/v1/Emoji) - * (either `emoji.unicode` or `emoji.custom_emoji.uid`) and - * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) - * (`user.name`). - * To filter reactions for multiple emojis or users, join similar fields - * with the `OR` operator, such as `emoji.unicode = "🙂" OR emoji.unicode = - * "👍"` and `user.name = "users/AAAAAA" OR user.name = "users/BBBBBB"`. - * To filter reactions by emoji and user, use the `AND` operator, such as - * `emoji.unicode = "🙂" AND user.name = "users/AAAAAA"`. - * If your query uses both `AND` and `OR`, group them with parentheses. - * For example, the following queries are valid: - * ``` - * user.name = "users/{user}" - * emoji.unicode = "🙂" - * emoji.custom_emoji.uid = "{uid}" - * emoji.unicode = "🙂" OR emoji.unicode = "👍" - * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" - * emoji.unicode = "🙂" AND user.name = "users/{user}" - * (emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}") - * AND user.name = "users/{user}" - * ``` - * The following queries are invalid: - * ``` - * emoji.unicode = "🙂" AND emoji.unicode = "👍" - * emoji.unicode = "🙂" AND emoji.custom_emoji.uid = "{uid}" - * emoji.unicode = "🙂" OR user.name = "users/{user}" - * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" OR - * user.name = "users/{user}" - * emoji.unicode = "🙂" OR emoji.custom_emoji.uid = "{uid}" - * AND user.name = "users/{user}" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsResponse.php deleted file mode 100644 index 429f5e5b5565..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListReactionsResponse.php +++ /dev/null @@ -1,105 +0,0 @@ -google.chat.v1.ListReactionsResponse - */ -class ListReactionsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of reactions in the requested (or first) page. - * - * Generated from protobuf field repeated .google.chat.v1.Reaction reactions = 1; - */ - private $reactions; - /** - * Continuation token to retrieve the next page of results. It's empty - * for the last page of results. - * - * 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 array<\Google\Apps\Chat\V1\Reaction>|\Google\Protobuf\Internal\RepeatedField $reactions - * List of reactions in the requested (or first) page. - * @type string $next_page_token - * Continuation token to retrieve the next page of results. It's empty - * for the last page of results. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); - parent::__construct($data); - } - - /** - * List of reactions in the requested (or first) page. - * - * Generated from protobuf field repeated .google.chat.v1.Reaction reactions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReactions() - { - return $this->reactions; - } - - /** - * List of reactions in the requested (or first) page. - * - * Generated from protobuf field repeated .google.chat.v1.Reaction reactions = 1; - * @param array<\Google\Apps\Chat\V1\Reaction>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReactions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Reaction::class); - $this->reactions = $arr; - - return $this; - } - - /** - * Continuation token to retrieve the next page of results. It's empty - * for the last page of results. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * Continuation token to retrieve the next page of results. It's empty - * for the last page of results. - * - * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsRequest.php deleted file mode 100644 index d4cf55391b8b..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsRequest.php +++ /dev/null @@ -1,444 +0,0 @@ -google.chat.v1.ListSpaceEventsRequest - */ -class ListSpaceEventsRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the [Google Chat - * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) - * where the events occurred. - * Format: `spaces/{space}`. - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Optional. The maximum number of space events returned. The service might - * return fewer than this value. - * Negative values return an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field int32 page_size = 5; - */ - protected $page_size = 0; - /** - * A page token, received from a previous list space events call. Provide this - * to retrieve the subsequent page. - * When paginating, all other parameters provided to list space events must - * match the call that provided the page token. Passing different values to - * the other parameters might lead to unexpected results. - * - * Generated from protobuf field string page_token = 6; - */ - protected $page_token = ''; - /** - * Required. A query filter. - * You must specify at least one event type (`event_type`) - * using the has `:` operator. To filter by multiple event types, use the `OR` - * operator. Omit batch event types in your filter. The request automatically - * returns any related batch events. For example, if you filter by new - * reactions - * (`google.workspace.chat.reaction.v1.created`), the server also returns - * batch new reactions events - * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported - * event types, see the [`SpaceEvents` reference - * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). - * Optionally, you can also filter by start time (`start_time`) and - * end time (`end_time`): - * * `start_time`: Exclusive timestamp from which to start listing space - * events. - * You can list events that occurred up to 28 days ago. If unspecified, lists - * space events from the past 28 days. - * * `end_time`: Inclusive timestamp until which space events are listed. - * If unspecified, lists events up to the time of the request. - * To specify a start or end time, use the equals `=` operator and format in - * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both - * `start_time` and `end_time`, use the `AND` operator. - * For example, the following queries are valid: - * ``` - * start_time="2023-08-23T19:20:33+00:00" AND - * end_time="2023-08-23T19:21:54+00:00" - * ``` - * ``` - * start_time="2023-08-23T19:20:33+00:00" AND - * (event_types:"google.workspace.chat.space.v1.updated" OR - * event_types:"google.workspace.chat.message.v1.created") - * ``` - * The following queries are invalid: - * ``` - * start_time="2023-08-23T19:20:33+00:00" OR - * end_time="2023-08-23T19:21:54+00:00" - * ``` - * ``` - * event_types:"google.workspace.chat.space.v1.updated" AND - * event_types:"google.workspace.chat.message.v1.created" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 8 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filter = ''; - - /** - * @param string $parent Required. Resource name of the [Google Chat - * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) - * where the events occurred. - * - * Format: `spaces/{space}`. Please see - * {@see ChatServiceClient::spaceName()} for help formatting this field. - * @param string $filter Required. A query filter. - * - * You must specify at least one event type (`event_type`) - * using the has `:` operator. To filter by multiple event types, use the `OR` - * operator. Omit batch event types in your filter. The request automatically - * returns any related batch events. For example, if you filter by new - * reactions - * (`google.workspace.chat.reaction.v1.created`), the server also returns - * batch new reactions events - * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported - * event types, see the [`SpaceEvents` reference - * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). - * - * Optionally, you can also filter by start time (`start_time`) and - * end time (`end_time`): - * - * * `start_time`: Exclusive timestamp from which to start listing space - * events. - * You can list events that occurred up to 28 days ago. If unspecified, lists - * space events from the past 28 days. - * * `end_time`: Inclusive timestamp until which space events are listed. - * If unspecified, lists events up to the time of the request. - * - * To specify a start or end time, use the equals `=` operator and format in - * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both - * `start_time` and `end_time`, use the `AND` operator. - * - * For example, the following queries are valid: - * - * ``` - * start_time="2023-08-23T19:20:33+00:00" AND - * end_time="2023-08-23T19:21:54+00:00" - * ``` - * ``` - * start_time="2023-08-23T19:20:33+00:00" AND - * (event_types:"google.workspace.chat.space.v1.updated" OR - * event_types:"google.workspace.chat.message.v1.created") - * ``` - * - * The following queries are invalid: - * - * ``` - * start_time="2023-08-23T19:20:33+00:00" OR - * end_time="2023-08-23T19:21:54+00:00" - * ``` - * ``` - * event_types:"google.workspace.chat.space.v1.updated" AND - * event_types:"google.workspace.chat.message.v1.created" - * ``` - * - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * @return \Google\Apps\Chat\V1\ListSpaceEventsRequest - * - * @experimental - */ - public static function build(string $parent, string $filter): self - { - return (new self()) - ->setParent($parent) - ->setFilter($filter); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the [Google Chat - * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) - * where the events occurred. - * Format: `spaces/{space}`. - * @type int $page_size - * Optional. The maximum number of space events returned. The service might - * return fewer than this value. - * Negative values return an `INVALID_ARGUMENT` error. - * @type string $page_token - * A page token, received from a previous list space events call. Provide this - * to retrieve the subsequent page. - * When paginating, all other parameters provided to list space events must - * match the call that provided the page token. Passing different values to - * the other parameters might lead to unexpected results. - * @type string $filter - * Required. A query filter. - * You must specify at least one event type (`event_type`) - * using the has `:` operator. To filter by multiple event types, use the `OR` - * operator. Omit batch event types in your filter. The request automatically - * returns any related batch events. For example, if you filter by new - * reactions - * (`google.workspace.chat.reaction.v1.created`), the server also returns - * batch new reactions events - * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported - * event types, see the [`SpaceEvents` reference - * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). - * Optionally, you can also filter by start time (`start_time`) and - * end time (`end_time`): - * * `start_time`: Exclusive timestamp from which to start listing space - * events. - * You can list events that occurred up to 28 days ago. If unspecified, lists - * space events from the past 28 days. - * * `end_time`: Inclusive timestamp until which space events are listed. - * If unspecified, lists events up to the time of the request. - * To specify a start or end time, use the equals `=` operator and format in - * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both - * `start_time` and `end_time`, use the `AND` operator. - * For example, the following queries are valid: - * ``` - * start_time="2023-08-23T19:20:33+00:00" AND - * end_time="2023-08-23T19:21:54+00:00" - * ``` - * ``` - * start_time="2023-08-23T19:20:33+00:00" AND - * (event_types:"google.workspace.chat.space.v1.updated" OR - * event_types:"google.workspace.chat.message.v1.created") - * ``` - * The following queries are invalid: - * ``` - * start_time="2023-08-23T19:20:33+00:00" OR - * end_time="2023-08-23T19:21:54+00:00" - * ``` - * ``` - * event_types:"google.workspace.chat.space.v1.updated" AND - * event_types:"google.workspace.chat.message.v1.created" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\SpaceEvent::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the [Google Chat - * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) - * where the events occurred. - * Format: `spaces/{space}`. - * - * 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. Resource name of the [Google Chat - * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) - * where the events occurred. - * Format: `spaces/{space}`. - * - * 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. The maximum number of space events returned. The service might - * return fewer than this value. - * Negative values return an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field int32 page_size = 5; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of space events returned. The service might - * return fewer than this value. - * Negative values return an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field int32 page_size = 5; - * @param int $var - * @return $this - */ - public function setPageSize($var) - { - GPBUtil::checkInt32($var); - $this->page_size = $var; - - return $this; - } - - /** - * A page token, received from a previous list space events call. Provide this - * to retrieve the subsequent page. - * When paginating, all other parameters provided to list space events must - * match the call that provided the page token. Passing different values to - * the other parameters might lead to unexpected results. - * - * Generated from protobuf field string page_token = 6; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A page token, received from a previous list space events call. Provide this - * to retrieve the subsequent page. - * When paginating, all other parameters provided to list space events must - * match the call that provided the page token. Passing different values to - * the other parameters might lead to unexpected results. - * - * Generated from protobuf field string page_token = 6; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Required. A query filter. - * You must specify at least one event type (`event_type`) - * using the has `:` operator. To filter by multiple event types, use the `OR` - * operator. Omit batch event types in your filter. The request automatically - * returns any related batch events. For example, if you filter by new - * reactions - * (`google.workspace.chat.reaction.v1.created`), the server also returns - * batch new reactions events - * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported - * event types, see the [`SpaceEvents` reference - * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). - * Optionally, you can also filter by start time (`start_time`) and - * end time (`end_time`): - * * `start_time`: Exclusive timestamp from which to start listing space - * events. - * You can list events that occurred up to 28 days ago. If unspecified, lists - * space events from the past 28 days. - * * `end_time`: Inclusive timestamp until which space events are listed. - * If unspecified, lists events up to the time of the request. - * To specify a start or end time, use the equals `=` operator and format in - * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both - * `start_time` and `end_time`, use the `AND` operator. - * For example, the following queries are valid: - * ``` - * start_time="2023-08-23T19:20:33+00:00" AND - * end_time="2023-08-23T19:21:54+00:00" - * ``` - * ``` - * start_time="2023-08-23T19:20:33+00:00" AND - * (event_types:"google.workspace.chat.space.v1.updated" OR - * event_types:"google.workspace.chat.message.v1.created") - * ``` - * The following queries are invalid: - * ``` - * start_time="2023-08-23T19:20:33+00:00" OR - * end_time="2023-08-23T19:21:54+00:00" - * ``` - * ``` - * event_types:"google.workspace.chat.space.v1.updated" AND - * event_types:"google.workspace.chat.message.v1.created" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 8 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Required. A query filter. - * You must specify at least one event type (`event_type`) - * using the has `:` operator. To filter by multiple event types, use the `OR` - * operator. Omit batch event types in your filter. The request automatically - * returns any related batch events. For example, if you filter by new - * reactions - * (`google.workspace.chat.reaction.v1.created`), the server also returns - * batch new reactions events - * (`google.workspace.chat.reaction.v1.batchCreated`). For a list of supported - * event types, see the [`SpaceEvents` reference - * documentation](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.event_type). - * Optionally, you can also filter by start time (`start_time`) and - * end time (`end_time`): - * * `start_time`: Exclusive timestamp from which to start listing space - * events. - * You can list events that occurred up to 28 days ago. If unspecified, lists - * space events from the past 28 days. - * * `end_time`: Inclusive timestamp until which space events are listed. - * If unspecified, lists events up to the time of the request. - * To specify a start or end time, use the equals `=` operator and format in - * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339). To filter by both - * `start_time` and `end_time`, use the `AND` operator. - * For example, the following queries are valid: - * ``` - * start_time="2023-08-23T19:20:33+00:00" AND - * end_time="2023-08-23T19:21:54+00:00" - * ``` - * ``` - * start_time="2023-08-23T19:20:33+00:00" AND - * (event_types:"google.workspace.chat.space.v1.updated" OR - * event_types:"google.workspace.chat.message.v1.created") - * ``` - * The following queries are invalid: - * ``` - * start_time="2023-08-23T19:20:33+00:00" OR - * end_time="2023-08-23T19:21:54+00:00" - * ``` - * ``` - * event_types:"google.workspace.chat.space.v1.updated" AND - * event_types:"google.workspace.chat.message.v1.created" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 8 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsResponse.php deleted file mode 100644 index 9ed151c8bdda..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpaceEventsResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.chat.v1.ListSpaceEventsResponse - */ -class ListSpaceEventsResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Results are returned in chronological order (oldest event first). - * Note: The `permissionSettings` field is not returned in the Space - * object for list requests. - * - * Generated from protobuf field repeated .google.chat.v1.SpaceEvent space_events = 1; - */ - private $space_events; - /** - * Continuation token used to fetch more events. - * 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 array<\Google\Apps\Chat\V1\SpaceEvent>|\Google\Protobuf\Internal\RepeatedField $space_events - * Results are returned in chronological order (oldest event first). - * Note: The `permissionSettings` field is not returned in the Space - * object for list requests. - * @type string $next_page_token - * Continuation token used to fetch more events. - * If this field is omitted, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\SpaceEvent::initOnce(); - parent::__construct($data); - } - - /** - * Results are returned in chronological order (oldest event first). - * Note: The `permissionSettings` field is not returned in the Space - * object for list requests. - * - * Generated from protobuf field repeated .google.chat.v1.SpaceEvent space_events = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpaceEvents() - { - return $this->space_events; - } - - /** - * Results are returned in chronological order (oldest event first). - * Note: The `permissionSettings` field is not returned in the Space - * object for list requests. - * - * Generated from protobuf field repeated .google.chat.v1.SpaceEvent space_events = 1; - * @param array<\Google\Apps\Chat\V1\SpaceEvent>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpaceEvents($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\SpaceEvent::class); - $this->space_events = $arr; - - return $this; - } - - /** - * Continuation token used to fetch more events. - * 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; - } - - /** - * Continuation token used to fetch more events. - * 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesRequest.php deleted file mode 100644 index b1764b3e4d93..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesRequest.php +++ /dev/null @@ -1,219 +0,0 @@ -google.chat.v1.ListSpacesRequest - */ -class ListSpacesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. The maximum number of spaces to return. The service might return - * fewer than this value. - * If unspecified, at most 100 spaces are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * Negative values return an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_size = 0; - /** - * Optional. A page token, received from a previous list spaces call. - * Provide this parameter to retrieve the subsequent page. - * When paginating, the filter value should match the call that provided the - * page token. Passing a different value may lead to unexpected results. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $page_token = ''; - /** - * Optional. A query filter. - * You can filter spaces by the space type - * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). - * To filter by space type, you must specify valid enum value, such as - * `SPACE` or `GROUP_CHAT` (the `space_type` can't be - * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` - * operator. - * For example, the following queries are valid: - * ``` - * space_type = "SPACE" - * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $filter = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $page_size - * Optional. The maximum number of spaces to return. The service might return - * fewer than this value. - * If unspecified, at most 100 spaces are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * Negative values return an `INVALID_ARGUMENT` error. - * @type string $page_token - * Optional. A page token, received from a previous list spaces call. - * Provide this parameter to retrieve the subsequent page. - * When paginating, the filter value should match the call that provided the - * page token. Passing a different value may lead to unexpected results. - * @type string $filter - * Optional. A query filter. - * You can filter spaces by the space type - * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). - * To filter by space type, you must specify valid enum value, such as - * `SPACE` or `GROUP_CHAT` (the `space_type` can't be - * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` - * operator. - * For example, the following queries are valid: - * ``` - * space_type = "SPACE" - * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Optional. The maximum number of spaces to return. The service might return - * fewer than this value. - * If unspecified, at most 100 spaces are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * Negative values return an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * Optional. The maximum number of spaces to return. The service might return - * fewer than this value. - * If unspecified, at most 100 spaces are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * Negative values return an `INVALID_ARGUMENT` error. - * - * Generated from protobuf field int32 page_size = 1 [(.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 page token, received from a previous list spaces call. - * Provide this parameter to retrieve the subsequent page. - * When paginating, the filter value should match the call that provided the - * page token. Passing a different value may lead to unexpected results. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * Optional. A page token, received from a previous list spaces call. - * Provide this parameter to retrieve the subsequent page. - * When paginating, the filter value should match the call that provided the - * page token. Passing a different value may lead to unexpected results. - * - * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setPageToken($var) - { - GPBUtil::checkString($var, True); - $this->page_token = $var; - - return $this; - } - - /** - * Optional. A query filter. - * You can filter spaces by the space type - * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). - * To filter by space type, you must specify valid enum value, such as - * `SPACE` or `GROUP_CHAT` (the `space_type` can't be - * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` - * operator. - * For example, the following queries are valid: - * ``` - * space_type = "SPACE" - * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getFilter() - { - return $this->filter; - } - - /** - * Optional. A query filter. - * You can filter spaces by the space type - * ([`space_type`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#spacetype)). - * To filter by space type, you must specify valid enum value, such as - * `SPACE` or `GROUP_CHAT` (the `space_type` can't be - * `SPACE_TYPE_UNSPECIFIED`). To query for multiple space types, use the `OR` - * operator. - * For example, the following queries are valid: - * ``` - * space_type = "SPACE" - * spaceType = "GROUP_CHAT" OR spaceType = "DIRECT_MESSAGE" - * ``` - * Invalid queries are rejected by the server with an `INVALID_ARGUMENT` - * error. - * - * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setFilter($var) - { - GPBUtil::checkString($var, True); - $this->filter = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesResponse.php deleted file mode 100644 index 866249c6ff30..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ListSpacesResponse.php +++ /dev/null @@ -1,113 +0,0 @@ -google.chat.v1.ListSpacesResponse - */ -class ListSpacesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * List of spaces in the requested (or first) page. - * Note: The `permissionSettings` field is not returned in the Space - * object for list requests. - * - * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; - */ - private $spaces; - /** - * You can send a token as `pageToken` to retrieve the next page of - * results. If empty, 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 array<\Google\Apps\Chat\V1\Space>|\Google\Protobuf\Internal\RepeatedField $spaces - * List of spaces in the requested (or first) page. - * Note: The `permissionSettings` field is not returned in the Space - * object for list requests. - * @type string $next_page_token - * You can send a token as `pageToken` to retrieve the next page of - * results. If empty, there are no subsequent pages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * List of spaces in the requested (or first) page. - * Note: The `permissionSettings` field is not returned in the Space - * object for list requests. - * - * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpaces() - { - return $this->spaces; - } - - /** - * List of spaces in the requested (or first) page. - * Note: The `permissionSettings` field is not returned in the Space - * object for list requests. - * - * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; - * @param array<\Google\Apps\Chat\V1\Space>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Space::class); - $this->spaces = $arr; - - return $this; - } - - /** - * You can send a token as `pageToken` to retrieve the next page of - * results. If empty, there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - * @return string - */ - public function getNextPageToken() - { - return $this->next_page_token; - } - - /** - * You can send a token as `pageToken` to retrieve the next page of - * results. If empty, 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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MatchedUrl.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MatchedUrl.php deleted file mode 100644 index 2500f22c05fc..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MatchedUrl.php +++ /dev/null @@ -1,69 +0,0 @@ -google.chat.v1.MatchedUrl - */ -class MatchedUrl extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. The URL that was matched. - * - * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * Output only. The URL that was matched. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\MatchedUrl::initOnce(); - parent::__construct($data); - } - - /** - * Output only. The URL that was matched. - * - * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * Output only. The URL that was matched. - * - * Generated from protobuf field string url = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership.php deleted file mode 100644 index f62c182830dc..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership.php +++ /dev/null @@ -1,342 +0,0 @@ -google.chat.v1.Membership - */ -class Membership extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the membership, assigned by the server. - * Format: `spaces/{space}/members/{member}` - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. State of the membership. - * - * Generated from protobuf field .google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $state = 0; - /** - * Optional. User's role within a Chat space, which determines their permitted - * actions in the space. - * This field can only be used as input in `UpdateMembership`. - * - * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $role = 0; - /** - * Optional. Immutable. The creation time of the membership, such as when a - * member joined or was invited to join a space. This field is output only, - * except when used to import historical memberships in import mode spaces. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $create_time = null; - /** - * Optional. Immutable. The deletion time of the membership, such as when a - * member left or was removed from a space. This field is output only, except - * when used to import historical memberships in import mode spaces. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $delete_time = null; - protected $memberType; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the membership, assigned by the server. - * Format: `spaces/{space}/members/{member}` - * @type int $state - * Output only. State of the membership. - * @type int $role - * Optional. User's role within a Chat space, which determines their permitted - * actions in the space. - * This field can only be used as input in `UpdateMembership`. - * @type \Google\Apps\Chat\V1\User $member - * The Google Chat user or app the membership corresponds to. - * If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the output populates the - * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) - * `name` and `type`. - * @type \Google\Apps\Chat\V1\Group $group_member - * The Google Group the membership corresponds to. - * @type \Google\Protobuf\Timestamp $create_time - * Optional. Immutable. The creation time of the membership, such as when a - * member joined or was invited to join a space. This field is output only, - * except when used to import historical memberships in import mode spaces. - * @type \Google\Protobuf\Timestamp $delete_time - * Optional. Immutable. The deletion time of the membership, such as when a - * member left or was removed from a space. This field is output only, except - * when used to import historical memberships in import mode spaces. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the membership, assigned by the server. - * Format: `spaces/{space}/members/{member}` - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the membership, assigned by the server. - * Format: `spaces/{space}/members/{member}` - * - * Generated from protobuf field string name = 1 [(.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. State of the membership. - * - * Generated from protobuf field .google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getState() - { - return $this->state; - } - - /** - * Output only. State of the membership. - * - * Generated from protobuf field .google.chat.v1.Membership.MembershipState state = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setState($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Membership\MembershipState::class); - $this->state = $var; - - return $this; - } - - /** - * Optional. User's role within a Chat space, which determines their permitted - * actions in the space. - * This field can only be used as input in `UpdateMembership`. - * - * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getRole() - { - return $this->role; - } - - /** - * Optional. User's role within a Chat space, which determines their permitted - * actions in the space. - * This field can only be used as input in `UpdateMembership`. - * - * Generated from protobuf field .google.chat.v1.Membership.MembershipRole role = 7 [(.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setRole($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Membership\MembershipRole::class); - $this->role = $var; - - return $this; - } - - /** - * The Google Chat user or app the membership corresponds to. - * If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the output populates the - * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) - * `name` and `type`. - * - * Generated from protobuf field .google.chat.v1.User member = 3; - * @return \Google\Apps\Chat\V1\User|null - */ - public function getMember() - { - return $this->readOneof(3); - } - - public function hasMember() - { - return $this->hasOneof(3); - } - - /** - * The Google Chat user or app the membership corresponds to. - * If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the output populates the - * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) - * `name` and `type`. - * - * Generated from protobuf field .google.chat.v1.User member = 3; - * @param \Google\Apps\Chat\V1\User $var - * @return $this - */ - public function setMember($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The Google Group the membership corresponds to. - * - * Generated from protobuf field .google.chat.v1.Group group_member = 5; - * @return \Google\Apps\Chat\V1\Group|null - */ - public function getGroupMember() - { - return $this->readOneof(5); - } - - public function hasGroupMember() - { - return $this->hasOneof(5); - } - - /** - * The Google Group the membership corresponds to. - * - * Generated from protobuf field .google.chat.v1.Group group_member = 5; - * @param \Google\Apps\Chat\V1\Group $var - * @return $this - */ - public function setGroupMember($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Group::class); - $this->writeOneof(5, $var); - - return $this; - } - - /** - * Optional. Immutable. The creation time of the membership, such as when a - * member joined or was invited to join a space. This field is output only, - * except when used to import historical memberships in import mode spaces. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Immutable. The creation time of the membership, such as when a - * member joined or was invited to join a space. This field is output only, - * except when used to import historical memberships in import mode spaces. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 4 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setCreateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->create_time = $var; - - return $this; - } - - /** - * Optional. Immutable. The deletion time of the membership, such as when a - * member left or was removed from a space. This field is output only, except - * when used to import historical memberships in import mode spaces. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Immutable. The deletion time of the membership, such as when a - * member left or was removed from a space. This field is output only, except - * when used to import historical memberships in import mode spaces. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 8 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setDeleteTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->delete_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getMemberType() - { - return $this->whichOneof("memberType"); - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipRole.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipRole.php deleted file mode 100644 index ca249bb5f6a2..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipRole.php +++ /dev/null @@ -1,73 +0,0 @@ -google.chat.v1.Membership.MembershipRole - */ -class MembershipRole -{ - /** - * Default value. For [users][google.chat.v1.Membership.member]: they - * aren't a member of the space, but can be invited. For - * [Google Groups][google.chat.v1.Membership.group_member]: they're always - * assigned this role (other enum values might be used in the future). - * - * Generated from protobuf enum MEMBERSHIP_ROLE_UNSPECIFIED = 0; - */ - const MEMBERSHIP_ROLE_UNSPECIFIED = 0; - /** - * A member of the space. The user has basic permissions, like sending - * messages to the space. In 1:1 and unnamed group conversations, everyone - * has this role. - * - * Generated from protobuf enum ROLE_MEMBER = 1; - */ - const ROLE_MEMBER = 1; - /** - * A space manager. The user has all basic permissions plus administrative - * permissions that let them manage the space, like adding or removing - * members. Only supported in - * [SpaceType.SPACE][google.chat.v1.Space.SpaceType]. - * - * Generated from protobuf enum ROLE_MANAGER = 2; - */ - const ROLE_MANAGER = 2; - - private static $valueToName = [ - self::MEMBERSHIP_ROLE_UNSPECIFIED => 'MEMBERSHIP_ROLE_UNSPECIFIED', - self::ROLE_MEMBER => 'ROLE_MEMBER', - self::ROLE_MANAGER => 'ROLE_MANAGER', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MembershipRole::class, \Google\Apps\Chat\V1\Membership_MembershipRole::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipState.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipState.php deleted file mode 100644 index bf40d277a30c..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Membership/MembershipState.php +++ /dev/null @@ -1,73 +0,0 @@ -google.chat.v1.Membership.MembershipState - */ -class MembershipState -{ - /** - * Default value. Don't use. - * - * Generated from protobuf enum MEMBERSHIP_STATE_UNSPECIFIED = 0; - */ - const MEMBERSHIP_STATE_UNSPECIFIED = 0; - /** - * The user is added to the space, and can participate in the space. - * - * Generated from protobuf enum JOINED = 1; - */ - const JOINED = 1; - /** - * The user is invited to join the space, but hasn't joined it. - * - * Generated from protobuf enum INVITED = 2; - */ - const INVITED = 2; - /** - * The user doesn't belong to the space and doesn't have a pending - * invitation to join the space. - * - * Generated from protobuf enum NOT_A_MEMBER = 3; - */ - const NOT_A_MEMBER = 3; - - private static $valueToName = [ - self::MEMBERSHIP_STATE_UNSPECIFIED => 'MEMBERSHIP_STATE_UNSPECIFIED', - self::JOINED => 'JOINED', - self::INVITED => 'INVITED', - self::NOT_A_MEMBER => 'NOT_A_MEMBER', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MembershipState::class, \Google\Apps\Chat\V1\Membership_MembershipState::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchCreatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchCreatedEventData.php deleted file mode 100644 index 699e47e35da3..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchCreatedEventData.php +++ /dev/null @@ -1,68 +0,0 @@ -google.chat.v1.MembershipBatchCreatedEventData - */ -class MembershipBatchCreatedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * A list of new memberships. - * - * Generated from protobuf field repeated .google.chat.v1.MembershipCreatedEventData memberships = 1; - */ - private $memberships; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Chat\V1\MembershipCreatedEventData>|\Google\Protobuf\Internal\RepeatedField $memberships - * A list of new memberships. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * A list of new memberships. - * - * Generated from protobuf field repeated .google.chat.v1.MembershipCreatedEventData memberships = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMemberships() - { - return $this->memberships; - } - - /** - * A list of new memberships. - * - * Generated from protobuf field repeated .google.chat.v1.MembershipCreatedEventData memberships = 1; - * @param array<\Google\Apps\Chat\V1\MembershipCreatedEventData>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMemberships($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\MembershipCreatedEventData::class); - $this->memberships = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchDeletedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchDeletedEventData.php deleted file mode 100644 index 55b38cfbba73..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchDeletedEventData.php +++ /dev/null @@ -1,68 +0,0 @@ -google.chat.v1.MembershipBatchDeletedEventData - */ -class MembershipBatchDeletedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * A list of deleted memberships. - * - * Generated from protobuf field repeated .google.chat.v1.MembershipDeletedEventData memberships = 1; - */ - private $memberships; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Chat\V1\MembershipDeletedEventData>|\Google\Protobuf\Internal\RepeatedField $memberships - * A list of deleted memberships. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * A list of deleted memberships. - * - * Generated from protobuf field repeated .google.chat.v1.MembershipDeletedEventData memberships = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMemberships() - { - return $this->memberships; - } - - /** - * A list of deleted memberships. - * - * Generated from protobuf field repeated .google.chat.v1.MembershipDeletedEventData memberships = 1; - * @param array<\Google\Apps\Chat\V1\MembershipDeletedEventData>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMemberships($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\MembershipDeletedEventData::class); - $this->memberships = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchUpdatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchUpdatedEventData.php deleted file mode 100644 index a69226399552..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipBatchUpdatedEventData.php +++ /dev/null @@ -1,68 +0,0 @@ -google.chat.v1.MembershipBatchUpdatedEventData - */ -class MembershipBatchUpdatedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * A list of updated memberships. - * - * Generated from protobuf field repeated .google.chat.v1.MembershipUpdatedEventData memberships = 1; - */ - private $memberships; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Chat\V1\MembershipUpdatedEventData>|\Google\Protobuf\Internal\RepeatedField $memberships - * A list of updated memberships. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * A list of updated memberships. - * - * Generated from protobuf field repeated .google.chat.v1.MembershipUpdatedEventData memberships = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMemberships() - { - return $this->memberships; - } - - /** - * A list of updated memberships. - * - * Generated from protobuf field repeated .google.chat.v1.MembershipUpdatedEventData memberships = 1; - * @param array<\Google\Apps\Chat\V1\MembershipUpdatedEventData>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMemberships($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\MembershipUpdatedEventData::class); - $this->memberships = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipCreatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipCreatedEventData.php deleted file mode 100644 index f7eda903edad..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipCreatedEventData.php +++ /dev/null @@ -1,78 +0,0 @@ -google.chat.v1.MembershipCreatedEventData - */ -class MembershipCreatedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * The new membership. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 1; - */ - protected $membership = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Membership $membership - * The new membership. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * The new membership. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 1; - * @return \Google\Apps\Chat\V1\Membership|null - */ - public function getMembership() - { - return $this->membership; - } - - public function hasMembership() - { - return isset($this->membership); - } - - public function clearMembership() - { - unset($this->membership); - } - - /** - * The new membership. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 1; - * @param \Google\Apps\Chat\V1\Membership $var - * @return $this - */ - public function setMembership($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); - $this->membership = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipDeletedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipDeletedEventData.php deleted file mode 100644 index ec28249ca189..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipDeletedEventData.php +++ /dev/null @@ -1,78 +0,0 @@ -google.chat.v1.MembershipDeletedEventData - */ -class MembershipDeletedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * The deleted membership. Only the `name` and `state` fields are populated. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 1; - */ - protected $membership = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Membership $membership - * The deleted membership. Only the `name` and `state` fields are populated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * The deleted membership. Only the `name` and `state` fields are populated. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 1; - * @return \Google\Apps\Chat\V1\Membership|null - */ - public function getMembership() - { - return $this->membership; - } - - public function hasMembership() - { - return isset($this->membership); - } - - public function clearMembership() - { - unset($this->membership); - } - - /** - * The deleted membership. Only the `name` and `state` fields are populated. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 1; - * @param \Google\Apps\Chat\V1\Membership $var - * @return $this - */ - public function setMembership($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); - $this->membership = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipUpdatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipUpdatedEventData.php deleted file mode 100644 index df395bd6d237..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MembershipUpdatedEventData.php +++ /dev/null @@ -1,78 +0,0 @@ -google.chat.v1.MembershipUpdatedEventData - */ -class MembershipUpdatedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * The updated membership. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 1; - */ - protected $membership = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Membership $membership - * The updated membership. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * The updated membership. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 1; - * @return \Google\Apps\Chat\V1\Membership|null - */ - public function getMembership() - { - return $this->membership; - } - - public function hasMembership() - { - return isset($this->membership); - } - - public function clearMembership() - { - unset($this->membership); - } - - /** - * The updated membership. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 1; - * @param \Google\Apps\Chat\V1\Membership $var - * @return $this - */ - public function setMembership($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); - $this->membership = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Message.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Message.php deleted file mode 100644 index 4a893b5e16de..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Message.php +++ /dev/null @@ -1,1426 +0,0 @@ -google.chat.v1.Message - */ -class Message extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the message. - * Format: `spaces/{space}/messages/{message}` - * Where `{space}` is the ID of the space where the message is posted and - * `{message}` is a system-assigned ID for the message. For example, - * `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. - * If you set a custom ID when you create a message, you can use this ID to - * specify the message in a request by replacing `{message}` with the value - * from the `clientAssignedMessageId` field. For example, - * `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name - * a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The user who created the message. - * If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the output populates the - * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) - * `name` and `type`. - * - * Generated from protobuf field .google.chat.v1.User sender = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $sender = null; - /** - * Optional. Immutable. For spaces created in Chat, the time at which the - * message was created. This field is output only, except when used in import - * mode spaces. - * For import mode spaces, set this field to the historical timestamp at which - * the message was created in the source in order to preserve the original - * creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $create_time = null; - /** - * Output only. The time at which the message was last edited by a user. If - * the message has never been edited, this field is empty. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_update_time = null; - /** - * Output only. The time at which the message was deleted in - * Google Chat. If the message is never deleted, this field is empty. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 26 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $delete_time = null; - /** - * Plain-text body of the message. The first link to an image, video, or web - * page generates a - * [preview chip](https://developers.google.com/workspace/chat/preview-links). - * You can also [@mention a Google Chat - * user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), - * or everyone in the space. - * To learn about creating text messages, see [Send a - * message](https://developers.google.com/workspace/chat/create-messages). - * - * Generated from protobuf field string text = 4; - */ - protected $text = ''; - /** - * Output only. Contains the message `text` with markups added to communicate - * formatting. This field might not capture all formatting visible in the UI, - * but includes the following: - * * [Markup - * syntax](https://developers.google.com/workspace/chat/format-messages) - * for bold, italic, strikethrough, monospace, monospace block, and bulleted - * list. - * * [User - * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) - * using the format ``. - * * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the - * first string is the URL and the second is the rendered text—for example, - * ``. - * * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. - * This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning - * face emoji. - * For more information, see [View text formatting sent in a - * message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) - * - * Generated from protobuf field string formatted_text = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $formatted_text = ''; - /** - * Deprecated: Use `cards_v2` instead. - * Rich, formatted, and interactive cards that you can use to display UI - * elements such as: formatted texts, buttons, and clickable images. Cards are - * normally displayed below the plain-text body of the message. `cards` and - * `cards_v2` can have a maximum size of 32 KB. - * - * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true]; - * @deprecated - */ - private $cards; - /** - * An array of - * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). - * Only Chat apps can create cards. If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the messages can't contain cards. - * To learn how to create a message that contains cards, see [Send a - * message](https://developers.google.com/workspace/chat/create-messages). - * [Card builder](https://addons.gsuite.google.com/uikit/builder) - * - * Generated from protobuf field repeated .google.chat.v1.CardWithId cards_v2 = 22; - */ - private $cards_v2; - /** - * Output only. Annotations associated with the `text` in this message. - * - * Generated from protobuf field repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $annotations; - /** - * The thread the message belongs to. For example usage, see - * [Start or reply to a message - * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). - * - * Generated from protobuf field .google.chat.v1.Thread thread = 11; - */ - protected $thread = null; - /** - * If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the output populates the - * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) - * `name`. - * - * Generated from protobuf field .google.chat.v1.Space space = 12; - */ - protected $space = null; - /** - * A plain-text description of the message's cards, used when the actual cards - * can't be displayed—for example, mobile notifications. - * - * Generated from protobuf field string fallback_text = 13; - */ - protected $fallback_text = ''; - /** - * Input only. Parameters that a Chat app can use to configure how its - * response is posted. - * - * Generated from protobuf field .google.chat.v1.ActionResponse action_response = 14 [(.google.api.field_behavior) = INPUT_ONLY]; - */ - protected $action_response = null; - /** - * Output only. Plain-text body of the message with all Chat app mentions - * stripped out. - * - * Generated from protobuf field string argument_text = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $argument_text = ''; - /** - * Output only. Slash command information, if applicable. - * - * Generated from protobuf field .google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $slash_command = null; - /** - * User-uploaded attachment. - * - * Generated from protobuf field repeated .google.chat.v1.Attachment attachment = 18; - */ - private $attachment; - /** - * Output only. A URL in `spaces.messages.text` that matches a link preview - * pattern. For more information, see [Preview - * links](https://developers.google.com/workspace/chat/preview-links). - * - * Generated from protobuf field .google.chat.v1.MatchedUrl matched_url = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $matched_url = null; - /** - * Output only. When `true`, the message is a response in a reply thread. When - * `false`, the message is visible in the space's top-level conversation as - * either the first message of a thread or a message with no threaded replies. - * If the space doesn't support reply in threads, this field is always - * `false`. - * - * Generated from protobuf field bool thread_reply = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $thread_reply = false; - /** - * Optional. A custom ID for the message. You can use field to identify a - * message, or to get, delete, or update a message. To set a custom ID, - * specify the - * [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) - * field when you create the message. For details, see [Name a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * Generated from protobuf field string client_assigned_message_id = 32; - */ - protected $client_assigned_message_id = ''; - /** - * Output only. The list of emoji reaction summaries on the message. - * - * Generated from protobuf field repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $emoji_reaction_summaries; - /** - * Immutable. Input for creating a message, otherwise output only. The user - * that can view the message. When set, the message is private and only - * visible to the specified user and the Chat app. To include this field in - * your request, you must call the Chat API using [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * and omit the following: - * * [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments) - * * [Accessory - * widgets](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget) - * For details, see [Send a message - * privately](https://developers.google.com/workspace/chat/create-messages#private). - * - * Generated from protobuf field .google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $private_message_viewer = null; - /** - * Output only. Information about a deleted message. A message is deleted when - * `delete_time` is set. - * - * Generated from protobuf field .google.chat.v1.DeletionMetadata deletion_metadata = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $deletion_metadata = null; - /** - * Output only. Information about a message that's quoted by a Google Chat - * user in a space. Google Chat users can quote a message to reply to it. - * - * Generated from protobuf field .google.chat.v1.QuotedMessageMetadata quoted_message_metadata = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $quoted_message_metadata = null; - /** - * Output only. GIF images that are attached to the message. - * - * Generated from protobuf field repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - private $attached_gifs; - /** - * One or more interactive widgets that appear at the bottom of a message. - * You can add accessory widgets to messages that contain text, cards, or both - * text and cards. Not supported for messages that contain dialogs. For - * details, see [Add interactive widgets at the bottom of a - * message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). - * Creating a message with accessory widgets requires [app - * authentication] - * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * - * Generated from protobuf field repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44; - */ - private $accessory_widgets; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the message. - * Format: `spaces/{space}/messages/{message}` - * Where `{space}` is the ID of the space where the message is posted and - * `{message}` is a system-assigned ID for the message. For example, - * `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. - * If you set a custom ID when you create a message, you can use this ID to - * specify the message in a request by replacing `{message}` with the value - * from the `clientAssignedMessageId` field. For example, - * `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name - * a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * @type \Google\Apps\Chat\V1\User $sender - * Output only. The user who created the message. - * If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the output populates the - * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) - * `name` and `type`. - * @type \Google\Protobuf\Timestamp $create_time - * Optional. Immutable. For spaces created in Chat, the time at which the - * message was created. This field is output only, except when used in import - * mode spaces. - * For import mode spaces, set this field to the historical timestamp at which - * the message was created in the source in order to preserve the original - * creation time. - * @type \Google\Protobuf\Timestamp $last_update_time - * Output only. The time at which the message was last edited by a user. If - * the message has never been edited, this field is empty. - * @type \Google\Protobuf\Timestamp $delete_time - * Output only. The time at which the message was deleted in - * Google Chat. If the message is never deleted, this field is empty. - * @type string $text - * Plain-text body of the message. The first link to an image, video, or web - * page generates a - * [preview chip](https://developers.google.com/workspace/chat/preview-links). - * You can also [@mention a Google Chat - * user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), - * or everyone in the space. - * To learn about creating text messages, see [Send a - * message](https://developers.google.com/workspace/chat/create-messages). - * @type string $formatted_text - * Output only. Contains the message `text` with markups added to communicate - * formatting. This field might not capture all formatting visible in the UI, - * but includes the following: - * * [Markup - * syntax](https://developers.google.com/workspace/chat/format-messages) - * for bold, italic, strikethrough, monospace, monospace block, and bulleted - * list. - * * [User - * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) - * using the format ``. - * * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the - * first string is the URL and the second is the rendered text—for example, - * ``. - * * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. - * This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning - * face emoji. - * For more information, see [View text formatting sent in a - * message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) - * @type array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card>|\Google\Protobuf\Internal\RepeatedField $cards - * Deprecated: Use `cards_v2` instead. - * Rich, formatted, and interactive cards that you can use to display UI - * elements such as: formatted texts, buttons, and clickable images. Cards are - * normally displayed below the plain-text body of the message. `cards` and - * `cards_v2` can have a maximum size of 32 KB. - * @type array<\Google\Apps\Chat\V1\CardWithId>|\Google\Protobuf\Internal\RepeatedField $cards_v2 - * An array of - * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). - * Only Chat apps can create cards. If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the messages can't contain cards. - * To learn how to create a message that contains cards, see [Send a - * message](https://developers.google.com/workspace/chat/create-messages). - * [Card builder](https://addons.gsuite.google.com/uikit/builder) - * @type array<\Google\Apps\Chat\V1\Annotation>|\Google\Protobuf\Internal\RepeatedField $annotations - * Output only. Annotations associated with the `text` in this message. - * @type \Google\Apps\Chat\V1\Thread $thread - * The thread the message belongs to. For example usage, see - * [Start or reply to a message - * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). - * @type \Google\Apps\Chat\V1\Space $space - * If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the output populates the - * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) - * `name`. - * @type string $fallback_text - * A plain-text description of the message's cards, used when the actual cards - * can't be displayed—for example, mobile notifications. - * @type \Google\Apps\Chat\V1\ActionResponse $action_response - * Input only. Parameters that a Chat app can use to configure how its - * response is posted. - * @type string $argument_text - * Output only. Plain-text body of the message with all Chat app mentions - * stripped out. - * @type \Google\Apps\Chat\V1\SlashCommand $slash_command - * Output only. Slash command information, if applicable. - * @type array<\Google\Apps\Chat\V1\Attachment>|\Google\Protobuf\Internal\RepeatedField $attachment - * User-uploaded attachment. - * @type \Google\Apps\Chat\V1\MatchedUrl $matched_url - * Output only. A URL in `spaces.messages.text` that matches a link preview - * pattern. For more information, see [Preview - * links](https://developers.google.com/workspace/chat/preview-links). - * @type bool $thread_reply - * Output only. When `true`, the message is a response in a reply thread. When - * `false`, the message is visible in the space's top-level conversation as - * either the first message of a thread or a message with no threaded replies. - * If the space doesn't support reply in threads, this field is always - * `false`. - * @type string $client_assigned_message_id - * Optional. A custom ID for the message. You can use field to identify a - * message, or to get, delete, or update a message. To set a custom ID, - * specify the - * [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) - * field when you create the message. For details, see [Name a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * @type array<\Google\Apps\Chat\V1\EmojiReactionSummary>|\Google\Protobuf\Internal\RepeatedField $emoji_reaction_summaries - * Output only. The list of emoji reaction summaries on the message. - * @type \Google\Apps\Chat\V1\User $private_message_viewer - * Immutable. Input for creating a message, otherwise output only. The user - * that can view the message. When set, the message is private and only - * visible to the specified user and the Chat app. To include this field in - * your request, you must call the Chat API using [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * and omit the following: - * * [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments) - * * [Accessory - * widgets](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget) - * For details, see [Send a message - * privately](https://developers.google.com/workspace/chat/create-messages#private). - * @type \Google\Apps\Chat\V1\DeletionMetadata $deletion_metadata - * Output only. Information about a deleted message. A message is deleted when - * `delete_time` is set. - * @type \Google\Apps\Chat\V1\QuotedMessageMetadata $quoted_message_metadata - * Output only. Information about a message that's quoted by a Google Chat - * user in a space. Google Chat users can quote a message to reply to it. - * @type array<\Google\Apps\Chat\V1\AttachedGif>|\Google\Protobuf\Internal\RepeatedField $attached_gifs - * Output only. GIF images that are attached to the message. - * @type array<\Google\Apps\Chat\V1\AccessoryWidget>|\Google\Protobuf\Internal\RepeatedField $accessory_widgets - * One or more interactive widgets that appear at the bottom of a message. - * You can add accessory widgets to messages that contain text, cards, or both - * text and cards. Not supported for messages that contain dialogs. For - * details, see [Add interactive widgets at the bottom of a - * message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). - * Creating a message with accessory widgets requires [app - * authentication] - * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the message. - * Format: `spaces/{space}/messages/{message}` - * Where `{space}` is the ID of the space where the message is posted and - * `{message}` is a system-assigned ID for the message. For example, - * `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. - * If you set a custom ID when you create a message, you can use this ID to - * specify the message in a request by replacing `{message}` with the value - * from the `clientAssignedMessageId` field. For example, - * `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name - * a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the message. - * Format: `spaces/{space}/messages/{message}` - * Where `{space}` is the ID of the space where the message is posted and - * `{message}` is a system-assigned ID for the message. For example, - * `spaces/AAAAAAAAAAA/messages/BBBBBBBBBBB.BBBBBBBBBBB`. - * If you set a custom ID when you create a message, you can use this ID to - * specify the message in a request by replacing `{message}` with the value - * from the `clientAssignedMessageId` field. For example, - * `spaces/AAAAAAAAAAA/messages/client-custom-name`. For details, see [Name - * a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The user who created the message. - * If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the output populates the - * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) - * `name` and `type`. - * - * Generated from protobuf field .google.chat.v1.User sender = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Apps\Chat\V1\User|null - */ - public function getSender() - { - return $this->sender; - } - - public function hasSender() - { - return isset($this->sender); - } - - public function clearSender() - { - unset($this->sender); - } - - /** - * Output only. The user who created the message. - * If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the output populates the - * [user](https://developers.google.com/workspace/chat/api/reference/rest/v1/User) - * `name` and `type`. - * - * Generated from protobuf field .google.chat.v1.User sender = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Apps\Chat\V1\User $var - * @return $this - */ - public function setSender($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); - $this->sender = $var; - - return $this; - } - - /** - * Optional. Immutable. For spaces created in Chat, the time at which the - * message was created. This field is output only, except when used in import - * mode spaces. - * For import mode spaces, set this field to the historical timestamp at which - * the message was created in the source in order to preserve the original - * creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Immutable. For spaces created in Chat, the time at which the - * message was created. This field is output only, except when used in import - * mode spaces. - * For import mode spaces, set this field to the historical timestamp at which - * the message was created in the source in order to preserve the original - * creation time. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @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 message was last edited by a user. If - * the message has never been edited, this field is empty. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastUpdateTime() - { - return $this->last_update_time; - } - - public function hasLastUpdateTime() - { - return isset($this->last_update_time); - } - - public function clearLastUpdateTime() - { - unset($this->last_update_time); - } - - /** - * Output only. The time at which the message was last edited by a user. If - * the message has never been edited, this field is empty. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 23 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_update_time = $var; - - return $this; - } - - /** - * Output only. The time at which the message was deleted in - * Google Chat. If the message is never deleted, this field is empty. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 26 [(.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 message was deleted in - * Google Chat. If the message is never deleted, this field is empty. - * - * Generated from protobuf field .google.protobuf.Timestamp delete_time = 26 [(.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; - } - - /** - * Plain-text body of the message. The first link to an image, video, or web - * page generates a - * [preview chip](https://developers.google.com/workspace/chat/preview-links). - * You can also [@mention a Google Chat - * user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), - * or everyone in the space. - * To learn about creating text messages, see [Send a - * message](https://developers.google.com/workspace/chat/create-messages). - * - * Generated from protobuf field string text = 4; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Plain-text body of the message. The first link to an image, video, or web - * page generates a - * [preview chip](https://developers.google.com/workspace/chat/preview-links). - * You can also [@mention a Google Chat - * user](https://developers.google.com/workspace/chat/format-messages#messages-@mention), - * or everyone in the space. - * To learn about creating text messages, see [Send a - * message](https://developers.google.com/workspace/chat/create-messages). - * - * Generated from protobuf field string text = 4; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * Output only. Contains the message `text` with markups added to communicate - * formatting. This field might not capture all formatting visible in the UI, - * but includes the following: - * * [Markup - * syntax](https://developers.google.com/workspace/chat/format-messages) - * for bold, italic, strikethrough, monospace, monospace block, and bulleted - * list. - * * [User - * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) - * using the format ``. - * * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the - * first string is the URL and the second is the rendered text—for example, - * ``. - * * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. - * This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning - * face emoji. - * For more information, see [View text formatting sent in a - * message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) - * - * Generated from protobuf field string formatted_text = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getFormattedText() - { - return $this->formatted_text; - } - - /** - * Output only. Contains the message `text` with markups added to communicate - * formatting. This field might not capture all formatting visible in the UI, - * but includes the following: - * * [Markup - * syntax](https://developers.google.com/workspace/chat/format-messages) - * for bold, italic, strikethrough, monospace, monospace block, and bulleted - * list. - * * [User - * mentions](https://developers.google.com/workspace/chat/format-messages#messages-@mention) - * using the format ``. - * * Custom hyperlinks using the format `<{url}|{rendered_text}>` where the - * first string is the URL and the second is the rendered text—for example, - * ``. - * * Custom emoji using the format `:{emoji_name}:`—for example, `:smile:`. - * This doesn't apply to Unicode emoji, such as `U+1F600` for a grinning - * face emoji. - * For more information, see [View text formatting sent in a - * message](https://developers.google.com/workspace/chat/format-messages#view_text_formatting_sent_in_a_message) - * - * Generated from protobuf field string formatted_text = 43 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setFormattedText($var) - { - GPBUtil::checkString($var, True); - $this->formatted_text = $var; - - return $this; - } - - /** - * Deprecated: Use `cards_v2` instead. - * Rich, formatted, and interactive cards that you can use to display UI - * elements such as: formatted texts, buttons, and clickable images. Cards are - * normally displayed below the plain-text body of the message. `cards` and - * `cards_v2` can have a maximum size of 32 KB. - * - * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true]; - * @return \Google\Protobuf\Internal\RepeatedField - * @deprecated - */ - public function getCards() - { - @trigger_error('cards is deprecated.', E_USER_DEPRECATED); - return $this->cards; - } - - /** - * Deprecated: Use `cards_v2` instead. - * Rich, formatted, and interactive cards that you can use to display UI - * elements such as: formatted texts, buttons, and clickable images. Cards are - * normally displayed below the plain-text body of the message. `cards` and - * `cards_v2` can have a maximum size of 32 KB. - * - * Generated from protobuf field repeated .google.chat.v1.ContextualAddOnMarkup.Card cards = 5 [deprecated = true]; - * @param array<\Google\Apps\Chat\V1\ContextualAddOnMarkup\Card>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - * @deprecated - */ - public function setCards($var) - { - @trigger_error('cards is deprecated.', E_USER_DEPRECATED); - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ContextualAddOnMarkup\Card::class); - $this->cards = $arr; - - return $this; - } - - /** - * An array of - * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). - * Only Chat apps can create cards. If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the messages can't contain cards. - * To learn how to create a message that contains cards, see [Send a - * message](https://developers.google.com/workspace/chat/create-messages). - * [Card builder](https://addons.gsuite.google.com/uikit/builder) - * - * Generated from protobuf field repeated .google.chat.v1.CardWithId cards_v2 = 22; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getCardsV2() - { - return $this->cards_v2; - } - - /** - * An array of - * [cards](https://developers.google.com/workspace/chat/api/reference/rest/v1/cards). - * Only Chat apps can create cards. If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the messages can't contain cards. - * To learn how to create a message that contains cards, see [Send a - * message](https://developers.google.com/workspace/chat/create-messages). - * [Card builder](https://addons.gsuite.google.com/uikit/builder) - * - * Generated from protobuf field repeated .google.chat.v1.CardWithId cards_v2 = 22; - * @param array<\Google\Apps\Chat\V1\CardWithId>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setCardsV2($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\CardWithId::class); - $this->cards_v2 = $arr; - - return $this; - } - - /** - * Output only. Annotations associated with the `text` in this message. - * - * Generated from protobuf field repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAnnotations() - { - return $this->annotations; - } - - /** - * Output only. Annotations associated with the `text` in this message. - * - * Generated from protobuf field repeated .google.chat.v1.Annotation annotations = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Apps\Chat\V1\Annotation>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAnnotations($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Annotation::class); - $this->annotations = $arr; - - return $this; - } - - /** - * The thread the message belongs to. For example usage, see - * [Start or reply to a message - * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). - * - * Generated from protobuf field .google.chat.v1.Thread thread = 11; - * @return \Google\Apps\Chat\V1\Thread|null - */ - public function getThread() - { - return $this->thread; - } - - public function hasThread() - { - return isset($this->thread); - } - - public function clearThread() - { - unset($this->thread); - } - - /** - * The thread the message belongs to. For example usage, see - * [Start or reply to a message - * thread](https://developers.google.com/workspace/chat/create-messages#create-message-thread). - * - * Generated from protobuf field .google.chat.v1.Thread thread = 11; - * @param \Google\Apps\Chat\V1\Thread $var - * @return $this - */ - public function setThread($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Thread::class); - $this->thread = $var; - - return $this; - } - - /** - * If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the output populates the - * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) - * `name`. - * - * Generated from protobuf field .google.chat.v1.Space space = 12; - * @return \Google\Apps\Chat\V1\Space|null - */ - public function getSpace() - { - return $this->space; - } - - public function hasSpace() - { - return isset($this->space); - } - - public function clearSpace() - { - unset($this->space); - } - - /** - * If your Chat app [authenticates as a - * user](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * the output populates the - * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces) - * `name`. - * - * Generated from protobuf field .google.chat.v1.Space space = 12; - * @param \Google\Apps\Chat\V1\Space $var - * @return $this - */ - public function setSpace($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); - $this->space = $var; - - return $this; - } - - /** - * A plain-text description of the message's cards, used when the actual cards - * can't be displayed—for example, mobile notifications. - * - * Generated from protobuf field string fallback_text = 13; - * @return string - */ - public function getFallbackText() - { - return $this->fallback_text; - } - - /** - * A plain-text description of the message's cards, used when the actual cards - * can't be displayed—for example, mobile notifications. - * - * Generated from protobuf field string fallback_text = 13; - * @param string $var - * @return $this - */ - public function setFallbackText($var) - { - GPBUtil::checkString($var, True); - $this->fallback_text = $var; - - return $this; - } - - /** - * Input only. Parameters that a Chat app can use to configure how its - * response is posted. - * - * Generated from protobuf field .google.chat.v1.ActionResponse action_response = 14 [(.google.api.field_behavior) = INPUT_ONLY]; - * @return \Google\Apps\Chat\V1\ActionResponse|null - */ - public function getActionResponse() - { - return $this->action_response; - } - - public function hasActionResponse() - { - return isset($this->action_response); - } - - public function clearActionResponse() - { - unset($this->action_response); - } - - /** - * Input only. Parameters that a Chat app can use to configure how its - * response is posted. - * - * Generated from protobuf field .google.chat.v1.ActionResponse action_response = 14 [(.google.api.field_behavior) = INPUT_ONLY]; - * @param \Google\Apps\Chat\V1\ActionResponse $var - * @return $this - */ - public function setActionResponse($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ActionResponse::class); - $this->action_response = $var; - - return $this; - } - - /** - * Output only. Plain-text body of the message with all Chat app mentions - * stripped out. - * - * Generated from protobuf field string argument_text = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getArgumentText() - { - return $this->argument_text; - } - - /** - * Output only. Plain-text body of the message with all Chat app mentions - * stripped out. - * - * Generated from protobuf field string argument_text = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setArgumentText($var) - { - GPBUtil::checkString($var, True); - $this->argument_text = $var; - - return $this; - } - - /** - * Output only. Slash command information, if applicable. - * - * Generated from protobuf field .google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Apps\Chat\V1\SlashCommand|null - */ - public function getSlashCommand() - { - return $this->slash_command; - } - - public function hasSlashCommand() - { - return isset($this->slash_command); - } - - public function clearSlashCommand() - { - unset($this->slash_command); - } - - /** - * Output only. Slash command information, if applicable. - * - * Generated from protobuf field .google.chat.v1.SlashCommand slash_command = 17 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Apps\Chat\V1\SlashCommand $var - * @return $this - */ - public function setSlashCommand($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SlashCommand::class); - $this->slash_command = $var; - - return $this; - } - - /** - * User-uploaded attachment. - * - * Generated from protobuf field repeated .google.chat.v1.Attachment attachment = 18; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttachment() - { - return $this->attachment; - } - - /** - * User-uploaded attachment. - * - * Generated from protobuf field repeated .google.chat.v1.Attachment attachment = 18; - * @param array<\Google\Apps\Chat\V1\Attachment>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttachment($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Attachment::class); - $this->attachment = $arr; - - return $this; - } - - /** - * Output only. A URL in `spaces.messages.text` that matches a link preview - * pattern. For more information, see [Preview - * links](https://developers.google.com/workspace/chat/preview-links). - * - * Generated from protobuf field .google.chat.v1.MatchedUrl matched_url = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Apps\Chat\V1\MatchedUrl|null - */ - public function getMatchedUrl() - { - return $this->matched_url; - } - - public function hasMatchedUrl() - { - return isset($this->matched_url); - } - - public function clearMatchedUrl() - { - unset($this->matched_url); - } - - /** - * Output only. A URL in `spaces.messages.text` that matches a link preview - * pattern. For more information, see [Preview - * links](https://developers.google.com/workspace/chat/preview-links). - * - * Generated from protobuf field .google.chat.v1.MatchedUrl matched_url = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Apps\Chat\V1\MatchedUrl $var - * @return $this - */ - public function setMatchedUrl($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MatchedUrl::class); - $this->matched_url = $var; - - return $this; - } - - /** - * Output only. When `true`, the message is a response in a reply thread. When - * `false`, the message is visible in the space's top-level conversation as - * either the first message of a thread or a message with no threaded replies. - * If the space doesn't support reply in threads, this field is always - * `false`. - * - * Generated from protobuf field bool thread_reply = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getThreadReply() - { - return $this->thread_reply; - } - - /** - * Output only. When `true`, the message is a response in a reply thread. When - * `false`, the message is visible in the space's top-level conversation as - * either the first message of a thread or a message with no threaded replies. - * If the space doesn't support reply in threads, this field is always - * `false`. - * - * Generated from protobuf field bool thread_reply = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setThreadReply($var) - { - GPBUtil::checkBool($var); - $this->thread_reply = $var; - - return $this; - } - - /** - * Optional. A custom ID for the message. You can use field to identify a - * message, or to get, delete, or update a message. To set a custom ID, - * specify the - * [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) - * field when you create the message. For details, see [Name a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * Generated from protobuf field string client_assigned_message_id = 32; - * @return string - */ - public function getClientAssignedMessageId() - { - return $this->client_assigned_message_id; - } - - /** - * Optional. A custom ID for the message. You can use field to identify a - * message, or to get, delete, or update a message. To set a custom ID, - * specify the - * [`messageId`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages/create#body.QUERY_PARAMETERS.message_id) - * field when you create the message. For details, see [Name a - * message](https://developers.google.com/workspace/chat/create-messages#name_a_created_message). - * - * Generated from protobuf field string client_assigned_message_id = 32; - * @param string $var - * @return $this - */ - public function setClientAssignedMessageId($var) - { - GPBUtil::checkString($var, True); - $this->client_assigned_message_id = $var; - - return $this; - } - - /** - * Output only. The list of emoji reaction summaries on the message. - * - * Generated from protobuf field repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getEmojiReactionSummaries() - { - return $this->emoji_reaction_summaries; - } - - /** - * Output only. The list of emoji reaction summaries on the message. - * - * Generated from protobuf field repeated .google.chat.v1.EmojiReactionSummary emoji_reaction_summaries = 33 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Apps\Chat\V1\EmojiReactionSummary>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setEmojiReactionSummaries($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\EmojiReactionSummary::class); - $this->emoji_reaction_summaries = $arr; - - return $this; - } - - /** - * Immutable. Input for creating a message, otherwise output only. The user - * that can view the message. When set, the message is private and only - * visible to the specified user and the Chat app. To include this field in - * your request, you must call the Chat API using [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * and omit the following: - * * [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments) - * * [Accessory - * widgets](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget) - * For details, see [Send a message - * privately](https://developers.google.com/workspace/chat/create-messages#private). - * - * Generated from protobuf field .google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE]; - * @return \Google\Apps\Chat\V1\User|null - */ - public function getPrivateMessageViewer() - { - return $this->private_message_viewer; - } - - public function hasPrivateMessageViewer() - { - return isset($this->private_message_viewer); - } - - public function clearPrivateMessageViewer() - { - unset($this->private_message_viewer); - } - - /** - * Immutable. Input for creating a message, otherwise output only. The user - * that can view the message. When set, the message is private and only - * visible to the specified user and the Chat app. To include this field in - * your request, you must call the Chat API using [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * and omit the following: - * * [Attachments](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.attachments) - * * [Accessory - * widgets](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages#Message.AccessoryWidget) - * For details, see [Send a message - * privately](https://developers.google.com/workspace/chat/create-messages#private). - * - * Generated from protobuf field .google.chat.v1.User private_message_viewer = 36 [(.google.api.field_behavior) = IMMUTABLE]; - * @param \Google\Apps\Chat\V1\User $var - * @return $this - */ - public function setPrivateMessageViewer($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); - $this->private_message_viewer = $var; - - return $this; - } - - /** - * Output only. Information about a deleted message. A message is deleted when - * `delete_time` is set. - * - * Generated from protobuf field .google.chat.v1.DeletionMetadata deletion_metadata = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Apps\Chat\V1\DeletionMetadata|null - */ - public function getDeletionMetadata() - { - return $this->deletion_metadata; - } - - public function hasDeletionMetadata() - { - return isset($this->deletion_metadata); - } - - public function clearDeletionMetadata() - { - unset($this->deletion_metadata); - } - - /** - * Output only. Information about a deleted message. A message is deleted when - * `delete_time` is set. - * - * Generated from protobuf field .google.chat.v1.DeletionMetadata deletion_metadata = 38 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Apps\Chat\V1\DeletionMetadata $var - * @return $this - */ - public function setDeletionMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DeletionMetadata::class); - $this->deletion_metadata = $var; - - return $this; - } - - /** - * Output only. Information about a message that's quoted by a Google Chat - * user in a space. Google Chat users can quote a message to reply to it. - * - * Generated from protobuf field .google.chat.v1.QuotedMessageMetadata quoted_message_metadata = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Apps\Chat\V1\QuotedMessageMetadata|null - */ - public function getQuotedMessageMetadata() - { - return $this->quoted_message_metadata; - } - - public function hasQuotedMessageMetadata() - { - return isset($this->quoted_message_metadata); - } - - public function clearQuotedMessageMetadata() - { - unset($this->quoted_message_metadata); - } - - /** - * Output only. Information about a message that's quoted by a Google Chat - * user in a space. Google Chat users can quote a message to reply to it. - * - * Generated from protobuf field .google.chat.v1.QuotedMessageMetadata quoted_message_metadata = 39 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Apps\Chat\V1\QuotedMessageMetadata $var - * @return $this - */ - public function setQuotedMessageMetadata($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\QuotedMessageMetadata::class); - $this->quoted_message_metadata = $var; - - return $this; - } - - /** - * Output only. GIF images that are attached to the message. - * - * Generated from protobuf field repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAttachedGifs() - { - return $this->attached_gifs; - } - - /** - * Output only. GIF images that are attached to the message. - * - * Generated from protobuf field repeated .google.chat.v1.AttachedGif attached_gifs = 42 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param array<\Google\Apps\Chat\V1\AttachedGif>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAttachedGifs($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\AttachedGif::class); - $this->attached_gifs = $arr; - - return $this; - } - - /** - * One or more interactive widgets that appear at the bottom of a message. - * You can add accessory widgets to messages that contain text, cards, or both - * text and cards. Not supported for messages that contain dialogs. For - * details, see [Add interactive widgets at the bottom of a - * message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). - * Creating a message with accessory widgets requires [app - * authentication] - * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * - * Generated from protobuf field repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getAccessoryWidgets() - { - return $this->accessory_widgets; - } - - /** - * One or more interactive widgets that appear at the bottom of a message. - * You can add accessory widgets to messages that contain text, cards, or both - * text and cards. Not supported for messages that contain dialogs. For - * details, see [Add interactive widgets at the bottom of a - * message](https://developers.google.com/workspace/chat/create-messages#add-accessory-widgets). - * Creating a message with accessory widgets requires [app - * authentication] - * (https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * - * Generated from protobuf field repeated .google.chat.v1.AccessoryWidget accessory_widgets = 44; - * @param array<\Google\Apps\Chat\V1\AccessoryWidget>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setAccessoryWidgets($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\AccessoryWidget::class); - $this->accessory_widgets = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchCreatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchCreatedEventData.php deleted file mode 100644 index df1973205c35..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchCreatedEventData.php +++ /dev/null @@ -1,68 +0,0 @@ -google.chat.v1.MessageBatchCreatedEventData - */ -class MessageBatchCreatedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * A list of new messages. - * - * Generated from protobuf field repeated .google.chat.v1.MessageCreatedEventData messages = 1; - */ - private $messages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Chat\V1\MessageCreatedEventData>|\Google\Protobuf\Internal\RepeatedField $messages - * A list of new messages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * A list of new messages. - * - * Generated from protobuf field repeated .google.chat.v1.MessageCreatedEventData messages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMessages() - { - return $this->messages; - } - - /** - * A list of new messages. - * - * Generated from protobuf field repeated .google.chat.v1.MessageCreatedEventData messages = 1; - * @param array<\Google\Apps\Chat\V1\MessageCreatedEventData>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\MessageCreatedEventData::class); - $this->messages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchDeletedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchDeletedEventData.php deleted file mode 100644 index 0264ff4cfea5..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchDeletedEventData.php +++ /dev/null @@ -1,68 +0,0 @@ -google.chat.v1.MessageBatchDeletedEventData - */ -class MessageBatchDeletedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * A list of deleted messages. - * - * Generated from protobuf field repeated .google.chat.v1.MessageDeletedEventData messages = 1; - */ - private $messages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Chat\V1\MessageDeletedEventData>|\Google\Protobuf\Internal\RepeatedField $messages - * A list of deleted messages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * A list of deleted messages. - * - * Generated from protobuf field repeated .google.chat.v1.MessageDeletedEventData messages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMessages() - { - return $this->messages; - } - - /** - * A list of deleted messages. - * - * Generated from protobuf field repeated .google.chat.v1.MessageDeletedEventData messages = 1; - * @param array<\Google\Apps\Chat\V1\MessageDeletedEventData>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\MessageDeletedEventData::class); - $this->messages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchUpdatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchUpdatedEventData.php deleted file mode 100644 index 2085b91f0887..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageBatchUpdatedEventData.php +++ /dev/null @@ -1,68 +0,0 @@ -google.chat.v1.MessageBatchUpdatedEventData - */ -class MessageBatchUpdatedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * A list of updated messages. - * - * Generated from protobuf field repeated .google.chat.v1.MessageUpdatedEventData messages = 1; - */ - private $messages; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Chat\V1\MessageUpdatedEventData>|\Google\Protobuf\Internal\RepeatedField $messages - * A list of updated messages. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * A list of updated messages. - * - * Generated from protobuf field repeated .google.chat.v1.MessageUpdatedEventData messages = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMessages() - { - return $this->messages; - } - - /** - * A list of updated messages. - * - * Generated from protobuf field repeated .google.chat.v1.MessageUpdatedEventData messages = 1; - * @param array<\Google\Apps\Chat\V1\MessageUpdatedEventData>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMessages($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\MessageUpdatedEventData::class); - $this->messages = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageCreatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageCreatedEventData.php deleted file mode 100644 index 9fd83ebb9454..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageCreatedEventData.php +++ /dev/null @@ -1,78 +0,0 @@ -google.chat.v1.MessageCreatedEventData - */ -class MessageCreatedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * The new message. - * - * Generated from protobuf field .google.chat.v1.Message message = 1; - */ - protected $message = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Message $message - * The new message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * The new message. - * - * Generated from protobuf field .google.chat.v1.Message message = 1; - * @return \Google\Apps\Chat\V1\Message|null - */ - public function getMessage() - { - return $this->message; - } - - public function hasMessage() - { - return isset($this->message); - } - - public function clearMessage() - { - unset($this->message); - } - - /** - * The new message. - * - * Generated from protobuf field .google.chat.v1.Message message = 1; - * @param \Google\Apps\Chat\V1\Message $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Message::class); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageDeletedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageDeletedEventData.php deleted file mode 100644 index 979e52ff7474..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageDeletedEventData.php +++ /dev/null @@ -1,82 +0,0 @@ -google.chat.v1.MessageDeletedEventData - */ -class MessageDeletedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * The deleted message. Only the `name`, `createTime`, `deleteTime`, and - * `deletionMetadata` fields are populated. - * - * Generated from protobuf field .google.chat.v1.Message message = 1; - */ - protected $message = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Message $message - * The deleted message. Only the `name`, `createTime`, `deleteTime`, and - * `deletionMetadata` fields are populated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * The deleted message. Only the `name`, `createTime`, `deleteTime`, and - * `deletionMetadata` fields are populated. - * - * Generated from protobuf field .google.chat.v1.Message message = 1; - * @return \Google\Apps\Chat\V1\Message|null - */ - public function getMessage() - { - return $this->message; - } - - public function hasMessage() - { - return isset($this->message); - } - - public function clearMessage() - { - unset($this->message); - } - - /** - * The deleted message. Only the `name`, `createTime`, `deleteTime`, and - * `deletionMetadata` fields are populated. - * - * Generated from protobuf field .google.chat.v1.Message message = 1; - * @param \Google\Apps\Chat\V1\Message $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Message::class); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageUpdatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageUpdatedEventData.php deleted file mode 100644 index 515273c038c8..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/MessageUpdatedEventData.php +++ /dev/null @@ -1,78 +0,0 @@ -google.chat.v1.MessageUpdatedEventData - */ -class MessageUpdatedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * The updated message. - * - * Generated from protobuf field .google.chat.v1.Message message = 1; - */ - protected $message = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Message $message - * The updated message. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * The updated message. - * - * Generated from protobuf field .google.chat.v1.Message message = 1; - * @return \Google\Apps\Chat\V1\Message|null - */ - public function getMessage() - { - return $this->message; - } - - public function hasMessage() - { - return isset($this->message); - } - - public function clearMessage() - { - unset($this->message); - } - - /** - * The updated message. - * - * Generated from protobuf field .google.chat.v1.Message message = 1; - * @param \Google\Apps\Chat\V1\Message $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Message::class); - $this->message = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/QuotedMessageMetadata.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/QuotedMessageMetadata.php deleted file mode 100644 index 776a4ab987d7..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/QuotedMessageMetadata.php +++ /dev/null @@ -1,119 +0,0 @@ -google.chat.v1.QuotedMessageMetadata - */ -class QuotedMessageMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Resource name of the quoted message. - * Format: `spaces/{space}/messages/{message}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - */ - protected $name = ''; - /** - * Output only. The timestamp when the quoted message was created or when the - * quoted message was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_update_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Output only. Resource name of the quoted message. - * Format: `spaces/{space}/messages/{message}` - * @type \Google\Protobuf\Timestamp $last_update_time - * Output only. The timestamp when the quoted message was created or when the - * quoted message was last updated. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Resource name of the quoted message. - * Format: `spaces/{space}/messages/{message}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Output only. Resource name of the quoted message. - * Format: `spaces/{space}/messages/{message}` - * - * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The timestamp when the quoted message was created or when the - * quoted message was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastUpdateTime() - { - return $this->last_update_time; - } - - public function hasLastUpdateTime() - { - return isset($this->last_update_time); - } - - public function clearLastUpdateTime() - { - unset($this->last_update_time); - } - - /** - * Output only. The timestamp when the quoted message was created or when the - * quoted message was last updated. - * - * Generated from protobuf field .google.protobuf.Timestamp last_update_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastUpdateTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_update_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Reaction.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Reaction.php deleted file mode 100644 index 373aec899eaf..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Reaction.php +++ /dev/null @@ -1,159 +0,0 @@ -google.chat.v1.Reaction - */ -class Reaction extends \Google\Protobuf\Internal\Message -{ - /** - * The resource name of the reaction. - * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The user who created the reaction. - * - * Generated from protobuf field .google.chat.v1.User user = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $user = null; - /** - * The emoji used in the reaction. - * - * Generated from protobuf field .google.chat.v1.Emoji emoji = 3; - */ - protected $emoji = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * The resource name of the reaction. - * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` - * @type \Google\Apps\Chat\V1\User $user - * Output only. The user who created the reaction. - * @type \Google\Apps\Chat\V1\Emoji $emoji - * The emoji used in the reaction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Reaction::initOnce(); - parent::__construct($data); - } - - /** - * The resource name of the reaction. - * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The resource name of the reaction. - * Format: `spaces/{space}/messages/{message}/reactions/{reaction}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The user who created the reaction. - * - * Generated from protobuf field .google.chat.v1.User user = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Apps\Chat\V1\User|null - */ - public function getUser() - { - return $this->user; - } - - public function hasUser() - { - return isset($this->user); - } - - public function clearUser() - { - unset($this->user); - } - - /** - * Output only. The user who created the reaction. - * - * Generated from protobuf field .google.chat.v1.User user = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Apps\Chat\V1\User $var - * @return $this - */ - public function setUser($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); - $this->user = $var; - - return $this; - } - - /** - * The emoji used in the reaction. - * - * Generated from protobuf field .google.chat.v1.Emoji emoji = 3; - * @return \Google\Apps\Chat\V1\Emoji|null - */ - public function getEmoji() - { - return $this->emoji; - } - - public function hasEmoji() - { - return isset($this->emoji); - } - - public function clearEmoji() - { - unset($this->emoji); - } - - /** - * The emoji used in the reaction. - * - * Generated from protobuf field .google.chat.v1.Emoji emoji = 3; - * @param \Google\Apps\Chat\V1\Emoji $var - * @return $this - */ - public function setEmoji($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Emoji::class); - $this->emoji = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchCreatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchCreatedEventData.php deleted file mode 100644 index 35bcef50d126..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchCreatedEventData.php +++ /dev/null @@ -1,68 +0,0 @@ -google.chat.v1.ReactionBatchCreatedEventData - */ -class ReactionBatchCreatedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * A list of new reactions. - * - * Generated from protobuf field repeated .google.chat.v1.ReactionCreatedEventData reactions = 1; - */ - private $reactions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Chat\V1\ReactionCreatedEventData>|\Google\Protobuf\Internal\RepeatedField $reactions - * A list of new reactions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * A list of new reactions. - * - * Generated from protobuf field repeated .google.chat.v1.ReactionCreatedEventData reactions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReactions() - { - return $this->reactions; - } - - /** - * A list of new reactions. - * - * Generated from protobuf field repeated .google.chat.v1.ReactionCreatedEventData reactions = 1; - * @param array<\Google\Apps\Chat\V1\ReactionCreatedEventData>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReactions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ReactionCreatedEventData::class); - $this->reactions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchDeletedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchDeletedEventData.php deleted file mode 100644 index cfa937973a8b..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionBatchDeletedEventData.php +++ /dev/null @@ -1,68 +0,0 @@ -google.chat.v1.ReactionBatchDeletedEventData - */ -class ReactionBatchDeletedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * A list of deleted reactions. - * - * Generated from protobuf field repeated .google.chat.v1.ReactionDeletedEventData reactions = 1; - */ - private $reactions; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Chat\V1\ReactionDeletedEventData>|\Google\Protobuf\Internal\RepeatedField $reactions - * A list of deleted reactions. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * A list of deleted reactions. - * - * Generated from protobuf field repeated .google.chat.v1.ReactionDeletedEventData reactions = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getReactions() - { - return $this->reactions; - } - - /** - * A list of deleted reactions. - * - * Generated from protobuf field repeated .google.chat.v1.ReactionDeletedEventData reactions = 1; - * @param array<\Google\Apps\Chat\V1\ReactionDeletedEventData>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setReactions($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\ReactionDeletedEventData::class); - $this->reactions = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionCreatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionCreatedEventData.php deleted file mode 100644 index 12a3ca4640f4..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionCreatedEventData.php +++ /dev/null @@ -1,78 +0,0 @@ -google.chat.v1.ReactionCreatedEventData - */ -class ReactionCreatedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * The new reaction. - * - * Generated from protobuf field .google.chat.v1.Reaction reaction = 1; - */ - protected $reaction = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Reaction $reaction - * The new reaction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * The new reaction. - * - * Generated from protobuf field .google.chat.v1.Reaction reaction = 1; - * @return \Google\Apps\Chat\V1\Reaction|null - */ - public function getReaction() - { - return $this->reaction; - } - - public function hasReaction() - { - return isset($this->reaction); - } - - public function clearReaction() - { - unset($this->reaction); - } - - /** - * The new reaction. - * - * Generated from protobuf field .google.chat.v1.Reaction reaction = 1; - * @param \Google\Apps\Chat\V1\Reaction $var - * @return $this - */ - public function setReaction($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Reaction::class); - $this->reaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionDeletedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionDeletedEventData.php deleted file mode 100644 index e6d5a9e766d1..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ReactionDeletedEventData.php +++ /dev/null @@ -1,78 +0,0 @@ -google.chat.v1.ReactionDeletedEventData - */ -class ReactionDeletedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * The deleted reaction. - * - * Generated from protobuf field .google.chat.v1.Reaction reaction = 1; - */ - protected $reaction = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Reaction $reaction - * The deleted reaction. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * The deleted reaction. - * - * Generated from protobuf field .google.chat.v1.Reaction reaction = 1; - * @return \Google\Apps\Chat\V1\Reaction|null - */ - public function getReaction() - { - return $this->reaction; - } - - public function hasReaction() - { - return isset($this->reaction); - } - - public function clearReaction() - { - unset($this->reaction); - } - - /** - * The deleted reaction. - * - * Generated from protobuf field .google.chat.v1.Reaction reaction = 1; - * @param \Google\Apps\Chat\V1\Reaction $var - * @return $this - */ - public function setReaction($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Reaction::class); - $this->reaction = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata.php deleted file mode 100644 index 8b4b40d772e9..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata.php +++ /dev/null @@ -1,176 +0,0 @@ -google.chat.v1.RichLinkMetadata - */ -class RichLinkMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The URI of this link. - * - * Generated from protobuf field string uri = 1; - */ - protected $uri = ''; - /** - * The rich link type. - * - * Generated from protobuf field .google.chat.v1.RichLinkMetadata.RichLinkType rich_link_type = 2; - */ - protected $rich_link_type = 0; - protected $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $uri - * The URI of this link. - * @type int $rich_link_type - * The rich link type. - * @type \Google\Apps\Chat\V1\DriveLinkData $drive_link_data - * Data for a drive link. - * @type \Google\Apps\Chat\V1\ChatSpaceLinkData $chat_space_link_data - * Data for a chat space link. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); - parent::__construct($data); - } - - /** - * The URI of this link. - * - * Generated from protobuf field string uri = 1; - * @return string - */ - public function getUri() - { - return $this->uri; - } - - /** - * The URI of this link. - * - * Generated from protobuf field string uri = 1; - * @param string $var - * @return $this - */ - public function setUri($var) - { - GPBUtil::checkString($var, True); - $this->uri = $var; - - return $this; - } - - /** - * The rich link type. - * - * Generated from protobuf field .google.chat.v1.RichLinkMetadata.RichLinkType rich_link_type = 2; - * @return int - */ - public function getRichLinkType() - { - return $this->rich_link_type; - } - - /** - * The rich link type. - * - * Generated from protobuf field .google.chat.v1.RichLinkMetadata.RichLinkType rich_link_type = 2; - * @param int $var - * @return $this - */ - public function setRichLinkType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\RichLinkMetadata\RichLinkType::class); - $this->rich_link_type = $var; - - return $this; - } - - /** - * Data for a drive link. - * - * Generated from protobuf field .google.chat.v1.DriveLinkData drive_link_data = 3; - * @return \Google\Apps\Chat\V1\DriveLinkData|null - */ - public function getDriveLinkData() - { - return $this->readOneof(3); - } - - public function hasDriveLinkData() - { - return $this->hasOneof(3); - } - - /** - * Data for a drive link. - * - * Generated from protobuf field .google.chat.v1.DriveLinkData drive_link_data = 3; - * @param \Google\Apps\Chat\V1\DriveLinkData $var - * @return $this - */ - public function setDriveLinkData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\DriveLinkData::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * Data for a chat space link. - * - * Generated from protobuf field .google.chat.v1.ChatSpaceLinkData chat_space_link_data = 4; - * @return \Google\Apps\Chat\V1\ChatSpaceLinkData|null - */ - public function getChatSpaceLinkData() - { - return $this->readOneof(4); - } - - public function hasChatSpaceLinkData() - { - return $this->hasOneof(4); - } - - /** - * Data for a chat space link. - * - * Generated from protobuf field .google.chat.v1.ChatSpaceLinkData chat_space_link_data = 4; - * @param \Google\Apps\Chat\V1\ChatSpaceLinkData $var - * @return $this - */ - public function setChatSpaceLinkData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ChatSpaceLinkData::class); - $this->writeOneof(4, $var); - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata/RichLinkType.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata/RichLinkType.php deleted file mode 100644 index 9aa8967a83ff..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/RichLinkMetadata/RichLinkType.php +++ /dev/null @@ -1,64 +0,0 @@ -google.chat.v1.RichLinkMetadata.RichLinkType - */ -class RichLinkType -{ - /** - * Default value for the enum. Don't use. - * - * Generated from protobuf enum RICH_LINK_TYPE_UNSPECIFIED = 0; - */ - const RICH_LINK_TYPE_UNSPECIFIED = 0; - /** - * A Google Drive rich link type. - * - * Generated from protobuf enum DRIVE_FILE = 1; - */ - const DRIVE_FILE = 1; - /** - * A Chat space rich link type. For example, a space smart chip. - * - * Generated from protobuf enum CHAT_SPACE = 2; - */ - const CHAT_SPACE = 2; - - private static $valueToName = [ - self::RICH_LINK_TYPE_UNSPECIFIED => 'RICH_LINK_TYPE_UNSPECIFIED', - self::DRIVE_FILE => 'DRIVE_FILE', - self::CHAT_SPACE => 'CHAT_SPACE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(RichLinkType::class, \Google\Apps\Chat\V1\RichLinkMetadata_RichLinkType::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesRequest.php deleted file mode 100644 index 4be411a8272e..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesRequest.php +++ /dev/null @@ -1,539 +0,0 @@ -google.chat.v1.SearchSpacesRequest - */ -class SearchSpacesRequest extends \Google\Protobuf\Internal\Message -{ - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` - * [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * This method currently only supports admin access, thus only `true` is - * accepted for this field. - * - * Generated from protobuf field bool use_admin_access = 1; - */ - protected $use_admin_access = false; - /** - * The maximum number of spaces to return. The service may return fewer than - * this value. - * If unspecified, at most 100 spaces are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * - * Generated from protobuf field int32 page_size = 2; - */ - protected $page_size = 0; - /** - * A token, received from the previous search spaces call. Provide this - * parameter to retrieve the subsequent page. - * When paginating, all other parameters provided should match the call that - * provided the page token. Passing different values to the other parameters - * might lead to unexpected results. - * - * Generated from protobuf field string page_token = 3; - */ - protected $page_token = ''; - /** - * Required. A search query. - * You can search by using the following parameters: - * - `create_time` - * - `customer` - * - `display_name` - * - `external_user_allowed` - * - `last_active_time` - * - `space_history_state` - * - `space_type` - * `create_time` and `last_active_time` accept a timestamp in - * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported - * comparison operators are: `=`, `<`, `>`, `<=`, `>=`. - * `customer` is required and is used to indicate which customer - * to fetch spaces from. `customers/my_customer` is the only supported value. - * `display_name` only accepts the `HAS` (`:`) operator. The text to - * match is first tokenized into tokens and each token is prefix-matched - * case-insensitively and independently as a substring anywhere in the space's - * `display_name`. For example, `Fun Eve` matches `Fun event` or `The - * evening was fun`, but not `notFun event` or `even`. - * `external_user_allowed` accepts either `true` or `false`. - * `space_history_state` only accepts values from the [`historyState`] - * (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) - * field of a `space` resource. - * `space_type` is required and the only valid value is `SPACE`. - * Across different fields, only `AND` operators are supported. A valid - * example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid - * example is `space_type = "SPACE" OR display_name:"Hello"`. - * Among the same field, - * `space_type` doesn't support `AND` or `OR` operators. - * `display_name`, 'space_history_state', and 'external_user_allowed' only - * support `OR` operators. - * `last_active_time` and `create_time` support both `AND` and `OR` operators. - * `AND` can only be used to represent an interval, such as `last_active_time - * < "2022-01-01T00:00:00+00:00" AND last_active_time > - * "2023-01-01T00:00:00+00:00"`. - * The following example queries are valid: - * ``` - * customer = "customers/my_customer" AND space_type = "SPACE" - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * display_name:"Hello World" - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > - * "2022-01-01T00:00:00+00:00") - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (display_name:"Hello World" OR display_name:"Fun event") AND - * (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < - * "2022-01-01T00:00:00+00:00") - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (create_time > "2019-01-01T00:00:00+00:00" AND create_time < - * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND - * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") - * ``` - * - * Generated from protobuf field string query = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $query = ''; - /** - * Optional. How the list of spaces is ordered. - * Supported attributes to order by are: - * - `membership_count.joined_direct_human_user_count` — Denotes the count of - * human users that have directly joined a space. - * - `last_active_time` — Denotes the time when last eligible item is added to - * any topic of this space. - * - `create_time` — Denotes the time of the space creation. - * Valid ordering operation values are: - * - `ASC` for ascending. Default value. - * - `DESC` for descending. - * The supported syntax are: - * - `membership_count.joined_direct_human_user_count DESC` - * - `membership_count.joined_direct_human_user_count ASC` - * - `last_active_time DESC` - * - `last_active_time ASC` - * - `create_time DESC` - * - `create_time ASC` - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $order_by = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $use_admin_access - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` - * [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * This method currently only supports admin access, thus only `true` is - * accepted for this field. - * @type int $page_size - * The maximum number of spaces to return. The service may return fewer than - * this value. - * If unspecified, at most 100 spaces are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * @type string $page_token - * A token, received from the previous search spaces call. Provide this - * parameter to retrieve the subsequent page. - * When paginating, all other parameters provided should match the call that - * provided the page token. Passing different values to the other parameters - * might lead to unexpected results. - * @type string $query - * Required. A search query. - * You can search by using the following parameters: - * - `create_time` - * - `customer` - * - `display_name` - * - `external_user_allowed` - * - `last_active_time` - * - `space_history_state` - * - `space_type` - * `create_time` and `last_active_time` accept a timestamp in - * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported - * comparison operators are: `=`, `<`, `>`, `<=`, `>=`. - * `customer` is required and is used to indicate which customer - * to fetch spaces from. `customers/my_customer` is the only supported value. - * `display_name` only accepts the `HAS` (`:`) operator. The text to - * match is first tokenized into tokens and each token is prefix-matched - * case-insensitively and independently as a substring anywhere in the space's - * `display_name`. For example, `Fun Eve` matches `Fun event` or `The - * evening was fun`, but not `notFun event` or `even`. - * `external_user_allowed` accepts either `true` or `false`. - * `space_history_state` only accepts values from the [`historyState`] - * (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) - * field of a `space` resource. - * `space_type` is required and the only valid value is `SPACE`. - * Across different fields, only `AND` operators are supported. A valid - * example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid - * example is `space_type = "SPACE" OR display_name:"Hello"`. - * Among the same field, - * `space_type` doesn't support `AND` or `OR` operators. - * `display_name`, 'space_history_state', and 'external_user_allowed' only - * support `OR` operators. - * `last_active_time` and `create_time` support both `AND` and `OR` operators. - * `AND` can only be used to represent an interval, such as `last_active_time - * < "2022-01-01T00:00:00+00:00" AND last_active_time > - * "2023-01-01T00:00:00+00:00"`. - * The following example queries are valid: - * ``` - * customer = "customers/my_customer" AND space_type = "SPACE" - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * display_name:"Hello World" - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > - * "2022-01-01T00:00:00+00:00") - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (display_name:"Hello World" OR display_name:"Fun event") AND - * (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < - * "2022-01-01T00:00:00+00:00") - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (create_time > "2019-01-01T00:00:00+00:00" AND create_time < - * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND - * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") - * ``` - * @type string $order_by - * Optional. How the list of spaces is ordered. - * Supported attributes to order by are: - * - `membership_count.joined_direct_human_user_count` — Denotes the count of - * human users that have directly joined a space. - * - `last_active_time` — Denotes the time when last eligible item is added to - * any topic of this space. - * - `create_time` — Denotes the time of the space creation. - * Valid ordering operation values are: - * - `ASC` for ascending. Default value. - * - `DESC` for descending. - * The supported syntax are: - * - `membership_count.joined_direct_human_user_count DESC` - * - `membership_count.joined_direct_human_user_count ASC` - * - `last_active_time DESC` - * - `last_active_time ASC` - * - `create_time DESC` - * - `create_time ASC` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` - * [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * This method currently only supports admin access, thus only `true` is - * accepted for this field. - * - * Generated from protobuf field bool use_admin_access = 1; - * @return bool - */ - public function getUseAdminAccess() - { - return $this->use_admin_access; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires either the `chat.admin.spaces.readonly` or `chat.admin.spaces` - * [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * This method currently only supports admin access, thus only `true` is - * accepted for this field. - * - * Generated from protobuf field bool use_admin_access = 1; - * @param bool $var - * @return $this - */ - public function setUseAdminAccess($var) - { - GPBUtil::checkBool($var); - $this->use_admin_access = $var; - - return $this; - } - - /** - * The maximum number of spaces to return. The service may return fewer than - * this value. - * If unspecified, at most 100 spaces are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * - * Generated from protobuf field int32 page_size = 2; - * @return int - */ - public function getPageSize() - { - return $this->page_size; - } - - /** - * The maximum number of spaces to return. The service may return fewer than - * this value. - * If unspecified, at most 100 spaces are returned. - * The maximum value is 1000. If you use a value more than 1000, it's - * automatically changed to 1000. - * - * 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, received from the previous search spaces call. Provide this - * parameter to retrieve the subsequent page. - * When paginating, all other parameters provided should match the call that - * provided the page token. Passing different values to the other parameters - * might lead to unexpected results. - * - * Generated from protobuf field string page_token = 3; - * @return string - */ - public function getPageToken() - { - return $this->page_token; - } - - /** - * A token, received from the previous search spaces call. Provide this - * parameter to retrieve the subsequent page. - * When paginating, all other parameters provided should match the call that - * provided the page token. Passing different values to the other parameters - * might lead to unexpected results. - * - * 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; - } - - /** - * Required. A search query. - * You can search by using the following parameters: - * - `create_time` - * - `customer` - * - `display_name` - * - `external_user_allowed` - * - `last_active_time` - * - `space_history_state` - * - `space_type` - * `create_time` and `last_active_time` accept a timestamp in - * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported - * comparison operators are: `=`, `<`, `>`, `<=`, `>=`. - * `customer` is required and is used to indicate which customer - * to fetch spaces from. `customers/my_customer` is the only supported value. - * `display_name` only accepts the `HAS` (`:`) operator. The text to - * match is first tokenized into tokens and each token is prefix-matched - * case-insensitively and independently as a substring anywhere in the space's - * `display_name`. For example, `Fun Eve` matches `Fun event` or `The - * evening was fun`, but not `notFun event` or `even`. - * `external_user_allowed` accepts either `true` or `false`. - * `space_history_state` only accepts values from the [`historyState`] - * (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) - * field of a `space` resource. - * `space_type` is required and the only valid value is `SPACE`. - * Across different fields, only `AND` operators are supported. A valid - * example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid - * example is `space_type = "SPACE" OR display_name:"Hello"`. - * Among the same field, - * `space_type` doesn't support `AND` or `OR` operators. - * `display_name`, 'space_history_state', and 'external_user_allowed' only - * support `OR` operators. - * `last_active_time` and `create_time` support both `AND` and `OR` operators. - * `AND` can only be used to represent an interval, such as `last_active_time - * < "2022-01-01T00:00:00+00:00" AND last_active_time > - * "2023-01-01T00:00:00+00:00"`. - * The following example queries are valid: - * ``` - * customer = "customers/my_customer" AND space_type = "SPACE" - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * display_name:"Hello World" - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > - * "2022-01-01T00:00:00+00:00") - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (display_name:"Hello World" OR display_name:"Fun event") AND - * (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < - * "2022-01-01T00:00:00+00:00") - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (create_time > "2019-01-01T00:00:00+00:00" AND create_time < - * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND - * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") - * ``` - * - * Generated from protobuf field string query = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getQuery() - { - return $this->query; - } - - /** - * Required. A search query. - * You can search by using the following parameters: - * - `create_time` - * - `customer` - * - `display_name` - * - `external_user_allowed` - * - `last_active_time` - * - `space_history_state` - * - `space_type` - * `create_time` and `last_active_time` accept a timestamp in - * [RFC-3339](https://www.rfc-editor.org/rfc/rfc3339) format and the supported - * comparison operators are: `=`, `<`, `>`, `<=`, `>=`. - * `customer` is required and is used to indicate which customer - * to fetch spaces from. `customers/my_customer` is the only supported value. - * `display_name` only accepts the `HAS` (`:`) operator. The text to - * match is first tokenized into tokens and each token is prefix-matched - * case-insensitively and independently as a substring anywhere in the space's - * `display_name`. For example, `Fun Eve` matches `Fun event` or `The - * evening was fun`, but not `notFun event` or `even`. - * `external_user_allowed` accepts either `true` or `false`. - * `space_history_state` only accepts values from the [`historyState`] - * (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) - * field of a `space` resource. - * `space_type` is required and the only valid value is `SPACE`. - * Across different fields, only `AND` operators are supported. A valid - * example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid - * example is `space_type = "SPACE" OR display_name:"Hello"`. - * Among the same field, - * `space_type` doesn't support `AND` or `OR` operators. - * `display_name`, 'space_history_state', and 'external_user_allowed' only - * support `OR` operators. - * `last_active_time` and `create_time` support both `AND` and `OR` operators. - * `AND` can only be used to represent an interval, such as `last_active_time - * < "2022-01-01T00:00:00+00:00" AND last_active_time > - * "2023-01-01T00:00:00+00:00"`. - * The following example queries are valid: - * ``` - * customer = "customers/my_customer" AND space_type = "SPACE" - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * display_name:"Hello World" - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > - * "2022-01-01T00:00:00+00:00") - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (display_name:"Hello World" OR display_name:"Fun event") AND - * (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < - * "2022-01-01T00:00:00+00:00") - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (create_time > "2019-01-01T00:00:00+00:00" AND create_time < - * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND - * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") - * ``` - * - * Generated from protobuf field string query = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setQuery($var) - { - GPBUtil::checkString($var, True); - $this->query = $var; - - return $this; - } - - /** - * Optional. How the list of spaces is ordered. - * Supported attributes to order by are: - * - `membership_count.joined_direct_human_user_count` — Denotes the count of - * human users that have directly joined a space. - * - `last_active_time` — Denotes the time when last eligible item is added to - * any topic of this space. - * - `create_time` — Denotes the time of the space creation. - * Valid ordering operation values are: - * - `ASC` for ascending. Default value. - * - `DESC` for descending. - * The supported syntax are: - * - `membership_count.joined_direct_human_user_count DESC` - * - `membership_count.joined_direct_human_user_count ASC` - * - `last_active_time DESC` - * - `last_active_time ASC` - * - `create_time DESC` - * - `create_time ASC` - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getOrderBy() - { - return $this->order_by; - } - - /** - * Optional. How the list of spaces is ordered. - * Supported attributes to order by are: - * - `membership_count.joined_direct_human_user_count` — Denotes the count of - * human users that have directly joined a space. - * - `last_active_time` — Denotes the time when last eligible item is added to - * any topic of this space. - * - `create_time` — Denotes the time of the space creation. - * Valid ordering operation values are: - * - `ASC` for ascending. Default value. - * - `DESC` for descending. - * The supported syntax are: - * - `membership_count.joined_direct_human_user_count DESC` - * - `membership_count.joined_direct_human_user_count ASC` - * - `last_active_time DESC` - * - `last_active_time ASC` - * - `create_time DESC` - * - `create_time ASC` - * - * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setOrderBy($var) - { - GPBUtil::checkString($var, True); - $this->order_by = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesResponse.php deleted file mode 100644 index abebcdd76299..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SearchSpacesResponse.php +++ /dev/null @@ -1,143 +0,0 @@ -google.chat.v1.SearchSpacesResponse - */ -class SearchSpacesResponse extends \Google\Protobuf\Internal\Message -{ - /** - * A page of the requested spaces. - * - * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; - */ - private $spaces; - /** - * A token that can be used to retrieve the next page. If this field is empty, - * there are no subsequent pages. - * - * Generated from protobuf field string next_page_token = 2; - */ - protected $next_page_token = ''; - /** - * The total number of spaces that match the query, across all pages. If the - * result is over 10,000 spaces, this value is an estimate. - * - * Generated from protobuf field int32 total_size = 3; - */ - protected $total_size = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Chat\V1\Space>|\Google\Protobuf\Internal\RepeatedField $spaces - * A page of the requested spaces. - * @type string $next_page_token - * A token that can be used to retrieve the next page. If this field is empty, - * there are no subsequent pages. - * @type int $total_size - * The total number of spaces that match the query, across all pages. If the - * result is over 10,000 spaces, this value is an estimate. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * A page of the requested spaces. - * - * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpaces() - { - return $this->spaces; - } - - /** - * A page of the requested spaces. - * - * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; - * @param array<\Google\Apps\Chat\V1\Space>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Space::class); - $this->spaces = $arr; - - return $this; - } - - /** - * A token that can be used to retrieve the next page. If this field is empty, - * 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 that can be used to retrieve the next page. If this field is empty, - * 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; - } - - /** - * The total number of spaces that match the query, across all pages. If the - * result is over 10,000 spaces, this value is an estimate. - * - * Generated from protobuf field int32 total_size = 3; - * @return int - */ - public function getTotalSize() - { - return $this->total_size; - } - - /** - * The total number of spaces that match the query, across all pages. If the - * result is over 10,000 spaces, this value is an estimate. - * - * Generated from protobuf field int32 total_size = 3; - * @param int $var - * @return $this - */ - public function setTotalSize($var) - { - GPBUtil::checkInt32($var); - $this->total_size = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SetUpSpaceRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SetUpSpaceRequest.php deleted file mode 100644 index 7f7313f13d2c..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SetUpSpaceRequest.php +++ /dev/null @@ -1,317 +0,0 @@ -google.chat.v1.SetUpSpaceRequest - */ -class SetUpSpaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The `Space.spaceType` field is required. - * To create a space, set `Space.spaceType` to `SPACE` and set - * `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when - * setting up a space, try a different `displayName`. An existing space - * within the Google Workspace organization might already use this display - * name. - * To create a group chat, set `Space.spaceType` to - * `GROUP_CHAT`. Don't set `Space.displayName`. - * To create a 1:1 conversation between humans, - * set `Space.spaceType` to `DIRECT_MESSAGE` and set - * `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or - * `Space.spaceDetails`. - * To create an 1:1 conversation between a human and the calling Chat app, set - * `Space.spaceType` to `DIRECT_MESSAGE` and - * `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or - * `Space.spaceDetails`. - * If a `DIRECT_MESSAGE` space already exists, that space is returned instead - * of creating a new space. - * - * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $space = null; - /** - * Optional. A unique identifier for this request. - * A random UUID is recommended. - * Specifying an existing request ID returns the space created with that ID - * instead of creating a new space. - * Specifying an existing request ID from the same Chat app with a different - * authenticated user returns an error. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $request_id = ''; - /** - * Optional. The Google Chat users or groups to invite to join the space. Omit - * the calling user, as they are added automatically. - * The set currently allows up to 20 memberships (in addition to the caller). - * For human membership, the `Membership.member` field must contain a `user` - * with `name` populated (format: `users/{user}`) and `type` set to - * `User.Type.HUMAN`. You can only add human users when setting up a space - * (adding Chat apps is only supported for direct message setup with the - * calling app). You can also add members using the user's email as an alias - * for {user}. For example, the `user.name` can be `users/example@gmail.com`. - * To invite Gmail users or users from external Google Workspace domains, - * user's email must be used for `{user}`. - * For Google group membership, the `Membership.group_member` field must - * contain a `group` with `name` populated (format `groups/{group}`). You - * can only add Google groups when setting `Space.spaceType` to `SPACE`. - * Optional when setting `Space.spaceType` to `SPACE`. - * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at - * least two memberships. - * Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human - * user, along with exactly one membership. - * Must be empty when creating a 1:1 conversation between a human and the - * calling Chat app (when setting `Space.spaceType` to - * `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). - * - * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - private $memberships; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Space $space - * Required. The `Space.spaceType` field is required. - * To create a space, set `Space.spaceType` to `SPACE` and set - * `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when - * setting up a space, try a different `displayName`. An existing space - * within the Google Workspace organization might already use this display - * name. - * To create a group chat, set `Space.spaceType` to - * `GROUP_CHAT`. Don't set `Space.displayName`. - * To create a 1:1 conversation between humans, - * set `Space.spaceType` to `DIRECT_MESSAGE` and set - * `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or - * `Space.spaceDetails`. - * To create an 1:1 conversation between a human and the calling Chat app, set - * `Space.spaceType` to `DIRECT_MESSAGE` and - * `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or - * `Space.spaceDetails`. - * If a `DIRECT_MESSAGE` space already exists, that space is returned instead - * of creating a new space. - * @type string $request_id - * Optional. A unique identifier for this request. - * A random UUID is recommended. - * Specifying an existing request ID returns the space created with that ID - * instead of creating a new space. - * Specifying an existing request ID from the same Chat app with a different - * authenticated user returns an error. - * @type array<\Google\Apps\Chat\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $memberships - * Optional. The Google Chat users or groups to invite to join the space. Omit - * the calling user, as they are added automatically. - * The set currently allows up to 20 memberships (in addition to the caller). - * For human membership, the `Membership.member` field must contain a `user` - * with `name` populated (format: `users/{user}`) and `type` set to - * `User.Type.HUMAN`. You can only add human users when setting up a space - * (adding Chat apps is only supported for direct message setup with the - * calling app). You can also add members using the user's email as an alias - * for {user}. For example, the `user.name` can be `users/example@gmail.com`. - * To invite Gmail users or users from external Google Workspace domains, - * user's email must be used for `{user}`. - * For Google group membership, the `Membership.group_member` field must - * contain a `group` with `name` populated (format `groups/{group}`). You - * can only add Google groups when setting `Space.spaceType` to `SPACE`. - * Optional when setting `Space.spaceType` to `SPACE`. - * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at - * least two memberships. - * Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human - * user, along with exactly one membership. - * Must be empty when creating a 1:1 conversation between a human and the - * calling Chat app (when setting `Space.spaceType` to - * `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\SpaceSetup::initOnce(); - parent::__construct($data); - } - - /** - * Required. The `Space.spaceType` field is required. - * To create a space, set `Space.spaceType` to `SPACE` and set - * `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when - * setting up a space, try a different `displayName`. An existing space - * within the Google Workspace organization might already use this display - * name. - * To create a group chat, set `Space.spaceType` to - * `GROUP_CHAT`. Don't set `Space.displayName`. - * To create a 1:1 conversation between humans, - * set `Space.spaceType` to `DIRECT_MESSAGE` and set - * `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or - * `Space.spaceDetails`. - * To create an 1:1 conversation between a human and the calling Chat app, set - * `Space.spaceType` to `DIRECT_MESSAGE` and - * `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or - * `Space.spaceDetails`. - * If a `DIRECT_MESSAGE` space already exists, that space is returned instead - * of creating a new space. - * - * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Apps\Chat\V1\Space|null - */ - public function getSpace() - { - return $this->space; - } - - public function hasSpace() - { - return isset($this->space); - } - - public function clearSpace() - { - unset($this->space); - } - - /** - * Required. The `Space.spaceType` field is required. - * To create a space, set `Space.spaceType` to `SPACE` and set - * `Space.displayName`. If you receive the error message `ALREADY_EXISTS` when - * setting up a space, try a different `displayName`. An existing space - * within the Google Workspace organization might already use this display - * name. - * To create a group chat, set `Space.spaceType` to - * `GROUP_CHAT`. Don't set `Space.displayName`. - * To create a 1:1 conversation between humans, - * set `Space.spaceType` to `DIRECT_MESSAGE` and set - * `Space.singleUserBotDm` to `false`. Don't set `Space.displayName` or - * `Space.spaceDetails`. - * To create an 1:1 conversation between a human and the calling Chat app, set - * `Space.spaceType` to `DIRECT_MESSAGE` and - * `Space.singleUserBotDm` to `true`. Don't set `Space.displayName` or - * `Space.spaceDetails`. - * If a `DIRECT_MESSAGE` space already exists, that space is returned instead - * of creating a new space. - * - * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Apps\Chat\V1\Space $var - * @return $this - */ - public function setSpace($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); - $this->space = $var; - - return $this; - } - - /** - * Optional. A unique identifier for this request. - * A random UUID is recommended. - * Specifying an existing request ID returns the space created with that ID - * instead of creating a new space. - * Specifying an existing request ID from the same Chat app with a different - * authenticated user returns an error. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getRequestId() - { - return $this->request_id; - } - - /** - * Optional. A unique identifier for this request. - * A random UUID is recommended. - * Specifying an existing request ID returns the space created with that ID - * instead of creating a new space. - * Specifying an existing request ID from the same Chat app with a different - * authenticated user returns an error. - * - * Generated from protobuf field string request_id = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setRequestId($var) - { - GPBUtil::checkString($var, True); - $this->request_id = $var; - - return $this; - } - - /** - * Optional. The Google Chat users or groups to invite to join the space. Omit - * the calling user, as they are added automatically. - * The set currently allows up to 20 memberships (in addition to the caller). - * For human membership, the `Membership.member` field must contain a `user` - * with `name` populated (format: `users/{user}`) and `type` set to - * `User.Type.HUMAN`. You can only add human users when setting up a space - * (adding Chat apps is only supported for direct message setup with the - * calling app). You can also add members using the user's email as an alias - * for {user}. For example, the `user.name` can be `users/example@gmail.com`. - * To invite Gmail users or users from external Google Workspace domains, - * user's email must be used for `{user}`. - * For Google group membership, the `Membership.group_member` field must - * contain a `group` with `name` populated (format `groups/{group}`). You - * can only add Google groups when setting `Space.spaceType` to `SPACE`. - * Optional when setting `Space.spaceType` to `SPACE`. - * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at - * least two memberships. - * Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human - * user, along with exactly one membership. - * Must be empty when creating a 1:1 conversation between a human and the - * calling Chat app (when setting `Space.spaceType` to - * `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). - * - * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getMemberships() - { - return $this->memberships; - } - - /** - * Optional. The Google Chat users or groups to invite to join the space. Omit - * the calling user, as they are added automatically. - * The set currently allows up to 20 memberships (in addition to the caller). - * For human membership, the `Membership.member` field must contain a `user` - * with `name` populated (format: `users/{user}`) and `type` set to - * `User.Type.HUMAN`. You can only add human users when setting up a space - * (adding Chat apps is only supported for direct message setup with the - * calling app). You can also add members using the user's email as an alias - * for {user}. For example, the `user.name` can be `users/example@gmail.com`. - * To invite Gmail users or users from external Google Workspace domains, - * user's email must be used for `{user}`. - * For Google group membership, the `Membership.group_member` field must - * contain a `group` with `name` populated (format `groups/{group}`). You - * can only add Google groups when setting `Space.spaceType` to `SPACE`. - * Optional when setting `Space.spaceType` to `SPACE`. - * Required when setting `Space.spaceType` to `GROUP_CHAT`, along with at - * least two memberships. - * Required when setting `Space.spaceType` to `DIRECT_MESSAGE` with a human - * user, along with exactly one membership. - * Must be empty when creating a 1:1 conversation between a human and the - * calling Chat app (when setting `Space.spaceType` to - * `DIRECT_MESSAGE` and `Space.singleUserBotDm` to `true`). - * - * Generated from protobuf field repeated .google.chat.v1.Membership memberships = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param array<\Google\Apps\Chat\V1\Membership>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setMemberships($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Membership::class); - $this->memberships = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommand.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommand.php deleted file mode 100644 index 07f44423d3b2..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommand.php +++ /dev/null @@ -1,69 +0,0 @@ -google.chat.v1.SlashCommand - */ -class SlashCommand extends \Google\Protobuf\Internal\Message -{ - /** - * The ID of the slash command invoked. - * - * Generated from protobuf field int64 command_id = 1; - */ - protected $command_id = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int|string $command_id - * The ID of the slash command invoked. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\SlashCommand::initOnce(); - parent::__construct($data); - } - - /** - * The ID of the slash command invoked. - * - * Generated from protobuf field int64 command_id = 1; - * @return int|string - */ - public function getCommandId() - { - return $this->command_id; - } - - /** - * The ID of the slash command invoked. - * - * Generated from protobuf field int64 command_id = 1; - * @param int|string $var - * @return $this - */ - public function setCommandId($var) - { - GPBUtil::checkInt64($var); - $this->command_id = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata.php deleted file mode 100644 index 316532e5b3ee..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata.php +++ /dev/null @@ -1,213 +0,0 @@ -google.chat.v1.SlashCommandMetadata - */ -class SlashCommandMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The Chat app whose command was invoked. - * - * Generated from protobuf field .google.chat.v1.User bot = 1; - */ - protected $bot = null; - /** - * The type of slash command. - * - * Generated from protobuf field .google.chat.v1.SlashCommandMetadata.Type type = 2; - */ - protected $type = 0; - /** - * The name of the invoked slash command. - * - * Generated from protobuf field string command_name = 3; - */ - protected $command_name = ''; - /** - * The command ID of the invoked slash command. - * - * Generated from protobuf field int64 command_id = 4; - */ - protected $command_id = 0; - /** - * Indicates whether the slash command is for a dialog. - * - * Generated from protobuf field bool triggers_dialog = 5; - */ - protected $triggers_dialog = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\User $bot - * The Chat app whose command was invoked. - * @type int $type - * The type of slash command. - * @type string $command_name - * The name of the invoked slash command. - * @type int|string $command_id - * The command ID of the invoked slash command. - * @type bool $triggers_dialog - * Indicates whether the slash command is for a dialog. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); - parent::__construct($data); - } - - /** - * The Chat app whose command was invoked. - * - * Generated from protobuf field .google.chat.v1.User bot = 1; - * @return \Google\Apps\Chat\V1\User|null - */ - public function getBot() - { - return $this->bot; - } - - public function hasBot() - { - return isset($this->bot); - } - - public function clearBot() - { - unset($this->bot); - } - - /** - * The Chat app whose command was invoked. - * - * Generated from protobuf field .google.chat.v1.User bot = 1; - * @param \Google\Apps\Chat\V1\User $var - * @return $this - */ - public function setBot($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); - $this->bot = $var; - - return $this; - } - - /** - * The type of slash command. - * - * Generated from protobuf field .google.chat.v1.SlashCommandMetadata.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of slash command. - * - * Generated from protobuf field .google.chat.v1.SlashCommandMetadata.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\SlashCommandMetadata\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The name of the invoked slash command. - * - * Generated from protobuf field string command_name = 3; - * @return string - */ - public function getCommandName() - { - return $this->command_name; - } - - /** - * The name of the invoked slash command. - * - * Generated from protobuf field string command_name = 3; - * @param string $var - * @return $this - */ - public function setCommandName($var) - { - GPBUtil::checkString($var, True); - $this->command_name = $var; - - return $this; - } - - /** - * The command ID of the invoked slash command. - * - * Generated from protobuf field int64 command_id = 4; - * @return int|string - */ - public function getCommandId() - { - return $this->command_id; - } - - /** - * The command ID of the invoked slash command. - * - * Generated from protobuf field int64 command_id = 4; - * @param int|string $var - * @return $this - */ - public function setCommandId($var) - { - GPBUtil::checkInt64($var); - $this->command_id = $var; - - return $this; - } - - /** - * Indicates whether the slash command is for a dialog. - * - * Generated from protobuf field bool triggers_dialog = 5; - * @return bool - */ - public function getTriggersDialog() - { - return $this->triggers_dialog; - } - - /** - * Indicates whether the slash command is for a dialog. - * - * Generated from protobuf field bool triggers_dialog = 5; - * @param bool $var - * @return $this - */ - public function setTriggersDialog($var) - { - GPBUtil::checkBool($var); - $this->triggers_dialog = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata/Type.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata/Type.php deleted file mode 100644 index a85da5995578..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SlashCommandMetadata/Type.php +++ /dev/null @@ -1,62 +0,0 @@ -google.chat.v1.SlashCommandMetadata.Type - */ -class Type -{ - /** - * Default value for the enum. Don't use. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Add Chat app to space. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * Invoke slash command in space. - * - * Generated from protobuf enum INVOKE = 2; - */ - const INVOKE = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::ADD => 'ADD', - self::INVOKE => 'INVOKE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Apps\Chat\V1\SlashCommandMetadata_Type::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space.php deleted file mode 100644 index 9fe556109f1e..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space.php +++ /dev/null @@ -1,978 +0,0 @@ -google.chat.v1.Space - */ -class Space extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the space. - * Format: `spaces/{space}` - * Where `{space}` represents the system-assigned ID for the space. You can - * obtain the space ID by calling the - * [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) - * method or from the space URL. For example, if the space URL - * is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID - * is `AAAAAAAAA`. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. Deprecated: Use `space_type` instead. - * The type of a space. - * - * Generated from protobuf field .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - protected $type = 0; - /** - * The type of space. Required when creating a space or updating the space - * type of a space. Output only for other usage. - * - * Generated from protobuf field .google.chat.v1.Space.SpaceType space_type = 10; - */ - protected $space_type = 0; - /** - * Optional. Whether the space is a DM between a Chat app and a single - * human. - * - * Generated from protobuf field bool single_user_bot_dm = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $single_user_bot_dm = false; - /** - * Output only. Deprecated: Use `spaceThreadingState` instead. - * Whether messages are threaded in this space. - * - * Generated from protobuf field bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @deprecated - */ - protected $threaded = false; - /** - * The space's display name. Required when [creating a - * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) - * with a `spaceType` of `SPACE`. If you receive the error message - * `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a - * different `displayName`. An existing space within the Google Workspace - * organization might already use this display name. - * For direct messages, this field might be empty. - * Supports up to 128 characters. - * - * Generated from protobuf field string display_name = 3; - */ - protected $display_name = ''; - /** - * Immutable. Whether this space permits any Google Chat user as a member. - * Input when creating a space in a Google Workspace organization. Omit this - * field when creating spaces in the following conditions: - * * The authenticated user uses a consumer account (unmanaged user - * account). By default, a space created by a consumer account permits any - * Google Chat user. - * For existing spaces, this field is output only. - * - * Generated from protobuf field bool external_user_allowed = 8 [(.google.api.field_behavior) = IMMUTABLE]; - */ - protected $external_user_allowed = false; - /** - * Output only. The threading state in the Chat space. - * - * Generated from protobuf field .google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $space_threading_state = 0; - /** - * Details about the space including description and rules. - * - * Generated from protobuf field .google.chat.v1.Space.SpaceDetails space_details = 11; - */ - protected $space_details = null; - /** - * The message history state for messages and threads in this space. - * - * Generated from protobuf field .google.chat.v1.HistoryState space_history_state = 13; - */ - protected $space_history_state = 0; - /** - * Optional. Whether this space is created in `Import Mode` as part of a data - * migration into Google Workspace. While spaces are being imported, they - * aren't visible to users until the import is complete. - * - * Generated from protobuf field bool import_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $import_mode = false; - /** - * Optional. Immutable. For spaces created in Chat, the time the space was - * created. This field is output only, except when used in import mode spaces. - * For import mode spaces, set this field to the historical timestamp at which - * the space was created in the source in order to preserve the original - * creation time. - * Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - */ - protected $create_time = null; - /** - * Output only. Timestamp of the last message in the space. - * - * Generated from protobuf field .google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $last_active_time = null; - /** - * Output only. For direct message (DM) spaces with a Chat app, whether the - * space was created by a Google Workspace administrator. Administrators can - * install and set up a direct message with a Chat app on behalf of users in - * their organization. - * To support admin install, your Chat app must feature direct messaging. - * - * Generated from protobuf field bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $admin_installed = false; - /** - * Output only. The count of joined memberships grouped by member type. - * Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or - * `GROUP_CHAT`. - * - * Generated from protobuf field .google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $membership_count = null; - /** - * Optional. Specifies the [access - * setting](https://support.google.com/chat/answer/11971020) of the space. - * Only populated when the `space_type` is `SPACE`. - * - * Generated from protobuf field .google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $access_settings = null; - /** - * Output only. The URI for a user to access the space. - * - * Generated from protobuf field string space_uri = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $space_uri = ''; - /** - * Output only. The time when the space will be automatically deleted by the - * system if it remains in import mode. - * Each space created in import mode must exit this mode before this expire - * time using `spaces.completeImport`. - * This field is only populated for spaces that were created with import mode. - * - * Generated from protobuf field .google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $import_mode_expire_time = null; - protected $space_permission_settings; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the space. - * Format: `spaces/{space}` - * Where `{space}` represents the system-assigned ID for the space. You can - * obtain the space ID by calling the - * [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) - * method or from the space URL. For example, if the space URL - * is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID - * is `AAAAAAAAA`. - * @type int $type - * Output only. Deprecated: Use `space_type` instead. - * The type of a space. - * @type int $space_type - * The type of space. Required when creating a space or updating the space - * type of a space. Output only for other usage. - * @type bool $single_user_bot_dm - * Optional. Whether the space is a DM between a Chat app and a single - * human. - * @type bool $threaded - * Output only. Deprecated: Use `spaceThreadingState` instead. - * Whether messages are threaded in this space. - * @type string $display_name - * The space's display name. Required when [creating a - * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) - * with a `spaceType` of `SPACE`. If you receive the error message - * `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a - * different `displayName`. An existing space within the Google Workspace - * organization might already use this display name. - * For direct messages, this field might be empty. - * Supports up to 128 characters. - * @type bool $external_user_allowed - * Immutable. Whether this space permits any Google Chat user as a member. - * Input when creating a space in a Google Workspace organization. Omit this - * field when creating spaces in the following conditions: - * * The authenticated user uses a consumer account (unmanaged user - * account). By default, a space created by a consumer account permits any - * Google Chat user. - * For existing spaces, this field is output only. - * @type int $space_threading_state - * Output only. The threading state in the Chat space. - * @type \Google\Apps\Chat\V1\Space\SpaceDetails $space_details - * Details about the space including description and rules. - * @type int $space_history_state - * The message history state for messages and threads in this space. - * @type bool $import_mode - * Optional. Whether this space is created in `Import Mode` as part of a data - * migration into Google Workspace. While spaces are being imported, they - * aren't visible to users until the import is complete. - * @type \Google\Protobuf\Timestamp $create_time - * Optional. Immutable. For spaces created in Chat, the time the space was - * created. This field is output only, except when used in import mode spaces. - * For import mode spaces, set this field to the historical timestamp at which - * the space was created in the source in order to preserve the original - * creation time. - * Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. - * @type \Google\Protobuf\Timestamp $last_active_time - * Output only. Timestamp of the last message in the space. - * @type bool $admin_installed - * Output only. For direct message (DM) spaces with a Chat app, whether the - * space was created by a Google Workspace administrator. Administrators can - * install and set up a direct message with a Chat app on behalf of users in - * their organization. - * To support admin install, your Chat app must feature direct messaging. - * @type \Google\Apps\Chat\V1\Space\MembershipCount $membership_count - * Output only. The count of joined memberships grouped by member type. - * Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or - * `GROUP_CHAT`. - * @type \Google\Apps\Chat\V1\Space\AccessSettings $access_settings - * Optional. Specifies the [access - * setting](https://support.google.com/chat/answer/11971020) of the space. - * Only populated when the `space_type` is `SPACE`. - * @type string $space_uri - * Output only. The URI for a user to access the space. - * @type int $predefined_permission_settings - * Optional. Input only. Predefined space permission settings, input only - * when creating a space. If the field is not set, a collaboration space is - * created. After you create the space, settings are populated in the - * `PermissionSettings` field. - * @type \Google\Apps\Chat\V1\Space\PermissionSettings $permission_settings - * Optional. Space permission settings for existing spaces. Input for - * updating exact space permission settings, where existing permission - * settings are replaced. Output lists current permission settings. - * @type \Google\Protobuf\Timestamp $import_mode_expire_time - * Output only. The time when the space will be automatically deleted by the - * system if it remains in import mode. - * Each space created in import mode must exit this mode before this expire - * time using `spaces.completeImport`. - * This field is only populated for spaces that were created with import mode. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the space. - * Format: `spaces/{space}` - * Where `{space}` represents the system-assigned ID for the space. You can - * obtain the space ID by calling the - * [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) - * method or from the space URL. For example, if the space URL - * is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID - * is `AAAAAAAAA`. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the space. - * Format: `spaces/{space}` - * Where `{space}` represents the system-assigned ID for the space. You can - * obtain the space ID by calling the - * [`spaces.list()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/list) - * method or from the space URL. For example, if the space URL - * is `https://mail.google.com/mail/u/0/#chat/space/AAAAAAAAA`, the space ID - * is `AAAAAAAAA`. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. Deprecated: Use `space_type` instead. - * The type of a space. - * - * Generated from protobuf field .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - * @deprecated - */ - public function getType() - { - @trigger_error('type is deprecated.', E_USER_DEPRECATED); - return $this->type; - } - - /** - * Output only. Deprecated: Use `space_type` instead. - * The type of a space. - * - * Generated from protobuf field .google.chat.v1.Space.Type type = 2 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - * @deprecated - */ - public function setType($var) - { - @trigger_error('type is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\Type::class); - $this->type = $var; - - return $this; - } - - /** - * The type of space. Required when creating a space or updating the space - * type of a space. Output only for other usage. - * - * Generated from protobuf field .google.chat.v1.Space.SpaceType space_type = 10; - * @return int - */ - public function getSpaceType() - { - return $this->space_type; - } - - /** - * The type of space. Required when creating a space or updating the space - * type of a space. Output only for other usage. - * - * Generated from protobuf field .google.chat.v1.Space.SpaceType space_type = 10; - * @param int $var - * @return $this - */ - public function setSpaceType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\SpaceType::class); - $this->space_type = $var; - - return $this; - } - - /** - * Optional. Whether the space is a DM between a Chat app and a single - * human. - * - * Generated from protobuf field bool single_user_bot_dm = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getSingleUserBotDm() - { - return $this->single_user_bot_dm; - } - - /** - * Optional. Whether the space is a DM between a Chat app and a single - * human. - * - * Generated from protobuf field bool single_user_bot_dm = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setSingleUserBotDm($var) - { - GPBUtil::checkBool($var); - $this->single_user_bot_dm = $var; - - return $this; - } - - /** - * Output only. Deprecated: Use `spaceThreadingState` instead. - * Whether messages are threaded in this space. - * - * Generated from protobuf field bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - * @deprecated - */ - public function getThreaded() - { - @trigger_error('threaded is deprecated.', E_USER_DEPRECATED); - return $this->threaded; - } - - /** - * Output only. Deprecated: Use `spaceThreadingState` instead. - * Whether messages are threaded in this space. - * - * Generated from protobuf field bool threaded = 5 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - * @deprecated - */ - public function setThreaded($var) - { - @trigger_error('threaded is deprecated.', E_USER_DEPRECATED); - GPBUtil::checkBool($var); - $this->threaded = $var; - - return $this; - } - - /** - * The space's display name. Required when [creating a - * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) - * with a `spaceType` of `SPACE`. If you receive the error message - * `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a - * different `displayName`. An existing space within the Google Workspace - * organization might already use this display name. - * For direct messages, this field might be empty. - * Supports up to 128 characters. - * - * Generated from protobuf field string display_name = 3; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * The space's display name. Required when [creating a - * space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/create) - * with a `spaceType` of `SPACE`. If you receive the error message - * `ALREADY_EXISTS` when creating a space or updating the `displayName`, try a - * different `displayName`. An existing space within the Google Workspace - * organization might already use this display name. - * For direct messages, this field might be empty. - * Supports up to 128 characters. - * - * Generated from protobuf field string display_name = 3; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Immutable. Whether this space permits any Google Chat user as a member. - * Input when creating a space in a Google Workspace organization. Omit this - * field when creating spaces in the following conditions: - * * The authenticated user uses a consumer account (unmanaged user - * account). By default, a space created by a consumer account permits any - * Google Chat user. - * For existing spaces, this field is output only. - * - * Generated from protobuf field bool external_user_allowed = 8 [(.google.api.field_behavior) = IMMUTABLE]; - * @return bool - */ - public function getExternalUserAllowed() - { - return $this->external_user_allowed; - } - - /** - * Immutable. Whether this space permits any Google Chat user as a member. - * Input when creating a space in a Google Workspace organization. Omit this - * field when creating spaces in the following conditions: - * * The authenticated user uses a consumer account (unmanaged user - * account). By default, a space created by a consumer account permits any - * Google Chat user. - * For existing spaces, this field is output only. - * - * Generated from protobuf field bool external_user_allowed = 8 [(.google.api.field_behavior) = IMMUTABLE]; - * @param bool $var - * @return $this - */ - public function setExternalUserAllowed($var) - { - GPBUtil::checkBool($var); - $this->external_user_allowed = $var; - - return $this; - } - - /** - * Output only. The threading state in the Chat space. - * - * Generated from protobuf field .google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getSpaceThreadingState() - { - return $this->space_threading_state; - } - - /** - * Output only. The threading state in the Chat space. - * - * Generated from protobuf field .google.chat.v1.Space.SpaceThreadingState space_threading_state = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setSpaceThreadingState($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\SpaceThreadingState::class); - $this->space_threading_state = $var; - - return $this; - } - - /** - * Details about the space including description and rules. - * - * Generated from protobuf field .google.chat.v1.Space.SpaceDetails space_details = 11; - * @return \Google\Apps\Chat\V1\Space\SpaceDetails|null - */ - public function getSpaceDetails() - { - return $this->space_details; - } - - public function hasSpaceDetails() - { - return isset($this->space_details); - } - - public function clearSpaceDetails() - { - unset($this->space_details); - } - - /** - * Details about the space including description and rules. - * - * Generated from protobuf field .google.chat.v1.Space.SpaceDetails space_details = 11; - * @param \Google\Apps\Chat\V1\Space\SpaceDetails $var - * @return $this - */ - public function setSpaceDetails($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\SpaceDetails::class); - $this->space_details = $var; - - return $this; - } - - /** - * The message history state for messages and threads in this space. - * - * Generated from protobuf field .google.chat.v1.HistoryState space_history_state = 13; - * @return int - */ - public function getSpaceHistoryState() - { - return $this->space_history_state; - } - - /** - * The message history state for messages and threads in this space. - * - * Generated from protobuf field .google.chat.v1.HistoryState space_history_state = 13; - * @param int $var - * @return $this - */ - public function setSpaceHistoryState($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\HistoryState::class); - $this->space_history_state = $var; - - return $this; - } - - /** - * Optional. Whether this space is created in `Import Mode` as part of a data - * migration into Google Workspace. While spaces are being imported, they - * aren't visible to users until the import is complete. - * - * Generated from protobuf field bool import_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getImportMode() - { - return $this->import_mode; - } - - /** - * Optional. Whether this space is created in `Import Mode` as part of a data - * migration into Google Workspace. While spaces are being imported, they - * aren't visible to users until the import is complete. - * - * Generated from protobuf field bool import_mode = 16 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setImportMode($var) - { - GPBUtil::checkBool($var); - $this->import_mode = $var; - - return $this; - } - - /** - * Optional. Immutable. For spaces created in Chat, the time the space was - * created. This field is output only, except when used in import mode spaces. - * For import mode spaces, set this field to the historical timestamp at which - * the space was created in the source in order to preserve the original - * creation time. - * Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @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); - } - - /** - * Optional. Immutable. For spaces created in Chat, the time the space was - * created. This field is output only, except when used in import mode spaces. - * For import mode spaces, set this field to the historical timestamp at which - * the space was created in the source in order to preserve the original - * creation time. - * Only populated in the output when `spaceType` is `GROUP_CHAT` or `SPACE`. - * - * Generated from protobuf field .google.protobuf.Timestamp create_time = 17 [(.google.api.field_behavior) = IMMUTABLE, (.google.api.field_behavior) = OPTIONAL]; - * @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. Timestamp of the last message in the space. - * - * Generated from protobuf field .google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastActiveTime() - { - return $this->last_active_time; - } - - public function hasLastActiveTime() - { - return isset($this->last_active_time); - } - - public function clearLastActiveTime() - { - unset($this->last_active_time); - } - - /** - * Output only. Timestamp of the last message in the space. - * - * Generated from protobuf field .google.protobuf.Timestamp last_active_time = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastActiveTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_active_time = $var; - - return $this; - } - - /** - * Output only. For direct message (DM) spaces with a Chat app, whether the - * space was created by a Google Workspace administrator. Administrators can - * install and set up a direct message with a Chat app on behalf of users in - * their organization. - * To support admin install, your Chat app must feature direct messaging. - * - * Generated from protobuf field bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getAdminInstalled() - { - return $this->admin_installed; - } - - /** - * Output only. For direct message (DM) spaces with a Chat app, whether the - * space was created by a Google Workspace administrator. Administrators can - * install and set up a direct message with a Chat app on behalf of users in - * their organization. - * To support admin install, your Chat app must feature direct messaging. - * - * Generated from protobuf field bool admin_installed = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setAdminInstalled($var) - { - GPBUtil::checkBool($var); - $this->admin_installed = $var; - - return $this; - } - - /** - * Output only. The count of joined memberships grouped by member type. - * Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or - * `GROUP_CHAT`. - * - * Generated from protobuf field .google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Apps\Chat\V1\Space\MembershipCount|null - */ - public function getMembershipCount() - { - return $this->membership_count; - } - - public function hasMembershipCount() - { - return isset($this->membership_count); - } - - public function clearMembershipCount() - { - unset($this->membership_count); - } - - /** - * Output only. The count of joined memberships grouped by member type. - * Populated when the `space_type` is `SPACE`, `DIRECT_MESSAGE` or - * `GROUP_CHAT`. - * - * Generated from protobuf field .google.chat.v1.Space.MembershipCount membership_count = 20 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Apps\Chat\V1\Space\MembershipCount $var - * @return $this - */ - public function setMembershipCount($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\MembershipCount::class); - $this->membership_count = $var; - - return $this; - } - - /** - * Optional. Specifies the [access - * setting](https://support.google.com/chat/answer/11971020) of the space. - * Only populated when the `space_type` is `SPACE`. - * - * Generated from protobuf field .google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Apps\Chat\V1\Space\AccessSettings|null - */ - public function getAccessSettings() - { - return $this->access_settings; - } - - public function hasAccessSettings() - { - return isset($this->access_settings); - } - - public function clearAccessSettings() - { - unset($this->access_settings); - } - - /** - * Optional. Specifies the [access - * setting](https://support.google.com/chat/answer/11971020) of the space. - * Only populated when the `space_type` is `SPACE`. - * - * Generated from protobuf field .google.chat.v1.Space.AccessSettings access_settings = 23 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Apps\Chat\V1\Space\AccessSettings $var - * @return $this - */ - public function setAccessSettings($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\AccessSettings::class); - $this->access_settings = $var; - - return $this; - } - - /** - * Output only. The URI for a user to access the space. - * - * Generated from protobuf field string space_uri = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getSpaceUri() - { - return $this->space_uri; - } - - /** - * Output only. The URI for a user to access the space. - * - * Generated from protobuf field string space_uri = 25 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setSpaceUri($var) - { - GPBUtil::checkString($var, True); - $this->space_uri = $var; - - return $this; - } - - /** - * Optional. Input only. Predefined space permission settings, input only - * when creating a space. If the field is not set, a collaboration space is - * created. After you create the space, settings are populated in the - * `PermissionSettings` field. - * - * Generated from protobuf field .google.chat.v1.Space.PredefinedPermissionSettings predefined_permission_settings = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @return int - */ - public function getPredefinedPermissionSettings() - { - return $this->readOneof(26); - } - - public function hasPredefinedPermissionSettings() - { - return $this->hasOneof(26); - } - - /** - * Optional. Input only. Predefined space permission settings, input only - * when creating a space. If the field is not set, a collaboration space is - * created. After you create the space, settings are populated in the - * `PermissionSettings` field. - * - * Generated from protobuf field .google.chat.v1.Space.PredefinedPermissionSettings predefined_permission_settings = 26 [(.google.api.field_behavior) = INPUT_ONLY, (.google.api.field_behavior) = OPTIONAL]; - * @param int $var - * @return $this - */ - public function setPredefinedPermissionSettings($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\PredefinedPermissionSettings::class); - $this->writeOneof(26, $var); - - return $this; - } - - /** - * Optional. Space permission settings for existing spaces. Input for - * updating exact space permission settings, where existing permission - * settings are replaced. Output lists current permission settings. - * - * Generated from protobuf field .google.chat.v1.Space.PermissionSettings permission_settings = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Apps\Chat\V1\Space\PermissionSettings|null - */ - public function getPermissionSettings() - { - return $this->readOneof(27); - } - - public function hasPermissionSettings() - { - return $this->hasOneof(27); - } - - /** - * Optional. Space permission settings for existing spaces. Input for - * updating exact space permission settings, where existing permission - * settings are replaced. Output lists current permission settings. - * - * Generated from protobuf field .google.chat.v1.Space.PermissionSettings permission_settings = 27 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Apps\Chat\V1\Space\PermissionSettings $var - * @return $this - */ - public function setPermissionSettings($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSettings::class); - $this->writeOneof(27, $var); - - return $this; - } - - /** - * Output only. The time when the space will be automatically deleted by the - * system if it remains in import mode. - * Each space created in import mode must exit this mode before this expire - * time using `spaces.completeImport`. - * This field is only populated for spaces that were created with import mode. - * - * Generated from protobuf field .google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getImportModeExpireTime() - { - return $this->import_mode_expire_time; - } - - public function hasImportModeExpireTime() - { - return isset($this->import_mode_expire_time); - } - - public function clearImportModeExpireTime() - { - unset($this->import_mode_expire_time); - } - - /** - * Output only. The time when the space will be automatically deleted by the - * system if it remains in import mode. - * Each space created in import mode must exit this mode before this expire - * time using `spaces.completeImport`. - * This field is only populated for spaces that were created with import mode. - * - * Generated from protobuf field .google.protobuf.Timestamp import_mode_expire_time = 28 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setImportModeExpireTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->import_mode_expire_time = $var; - - return $this; - } - - /** - * @return string - */ - public function getSpacePermissionSettings() - { - return $this->whichOneof("space_permission_settings"); - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings.php deleted file mode 100644 index db62121be0a9..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings.php +++ /dev/null @@ -1,149 +0,0 @@ -google.chat.v1.Space.AccessSettings - */ -class AccessSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Output only. Indicates the access state of the space. - * - * Generated from protobuf field .google.chat.v1.Space.AccessSettings.AccessState access_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $access_state = 0; - /** - * Optional. The resource name of the [target - * audience](https://support.google.com/a/answer/9934697) who can discover - * the space, join the space, and preview the messages in the space. If - * unset, only users or Google Groups who have been individually invited or - * added to the space can access it. For details, see [Make a space - * discoverable to a target - * audience](https://developers.google.com/workspace/chat/space-target-audience). - * Format: `audiences/{audience}` - * To use the default target audience for the Google Workspace organization, - * set to `audiences/default`. - * This field is not populated when using the `chat.bot` scope with [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * - * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $audience = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $access_state - * Output only. Indicates the access state of the space. - * @type string $audience - * Optional. The resource name of the [target - * audience](https://support.google.com/a/answer/9934697) who can discover - * the space, join the space, and preview the messages in the space. If - * unset, only users or Google Groups who have been individually invited or - * added to the space can access it. For details, see [Make a space - * discoverable to a target - * audience](https://developers.google.com/workspace/chat/space-target-audience). - * Format: `audiences/{audience}` - * To use the default target audience for the Google Workspace organization, - * set to `audiences/default`. - * This field is not populated when using the `chat.bot` scope with [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Output only. Indicates the access state of the space. - * - * Generated from protobuf field .google.chat.v1.Space.AccessSettings.AccessState access_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return int - */ - public function getAccessState() - { - return $this->access_state; - } - - /** - * Output only. Indicates the access state of the space. - * - * Generated from protobuf field .google.chat.v1.Space.AccessSettings.AccessState access_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param int $var - * @return $this - */ - public function setAccessState($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\Space\AccessSettings\AccessState::class); - $this->access_state = $var; - - return $this; - } - - /** - * Optional. The resource name of the [target - * audience](https://support.google.com/a/answer/9934697) who can discover - * the space, join the space, and preview the messages in the space. If - * unset, only users or Google Groups who have been individually invited or - * added to the space can access it. For details, see [Make a space - * discoverable to a target - * audience](https://developers.google.com/workspace/chat/space-target-audience). - * Format: `audiences/{audience}` - * To use the default target audience for the Google Workspace organization, - * set to `audiences/default`. - * This field is not populated when using the `chat.bot` scope with [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * - * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getAudience() - { - return $this->audience; - } - - /** - * Optional. The resource name of the [target - * audience](https://support.google.com/a/answer/9934697) who can discover - * the space, join the space, and preview the messages in the space. If - * unset, only users or Google Groups who have been individually invited or - * added to the space can access it. For details, see [Make a space - * discoverable to a target - * audience](https://developers.google.com/workspace/chat/space-target-audience). - * Format: `audiences/{audience}` - * To use the default target audience for the Google Workspace organization, - * set to `audiences/default`. - * This field is not populated when using the `chat.bot` scope with [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * - * Generated from protobuf field string audience = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setAudience($var) - { - GPBUtil::checkString($var, True); - $this->audience = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AccessSettings::class, \Google\Apps\Chat\V1\Space_AccessSettings::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings/AccessState.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings/AccessState.php deleted file mode 100644 index 1bd127c0e95a..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/AccessSettings/AccessState.php +++ /dev/null @@ -1,74 +0,0 @@ -google.chat.v1.Space.AccessSettings.AccessState - */ -class AccessState -{ - /** - * Access state is unknown or not supported in this API. - * - * Generated from protobuf enum ACCESS_STATE_UNSPECIFIED = 0; - */ - const ACCESS_STATE_UNSPECIFIED = 0; - /** - * Only users or Google Groups that have been individually added or - * invited by other users or Google Workspace administrators can discover - * and access the space. - * - * Generated from protobuf enum PRIVATE = 1; - */ - const PBPRIVATE = 1; - /** - * A space manager has granted a target audience access to - * the space. Users or Google Groups that have been individually added or - * invited to the space can also discover and access the space. To learn - * more, see [Make a space discoverable to specific - * users](https://developers.google.com/workspace/chat/space-target-audience). - * - * Generated from protobuf enum DISCOVERABLE = 2; - */ - const DISCOVERABLE = 2; - - private static $valueToName = [ - self::ACCESS_STATE_UNSPECIFIED => 'ACCESS_STATE_UNSPECIFIED', - self::PBPRIVATE => 'PRIVATE', - self::DISCOVERABLE => 'DISCOVERABLE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(AccessState::class, \Google\Apps\Chat\V1\Space_AccessSettings_AccessState::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/MembershipCount.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/MembershipCount.php deleted file mode 100644 index 44bc280089f5..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/MembershipCount.php +++ /dev/null @@ -1,108 +0,0 @@ -google.chat.v1.Space.MembershipCount - */ -class MembershipCount extends \Google\Protobuf\Internal\Message -{ - /** - * Count of human users that have directly joined the space, not counting - * users joined by having membership in a joined group. - * - * Generated from protobuf field int32 joined_direct_human_user_count = 4; - */ - protected $joined_direct_human_user_count = 0; - /** - * Count of all groups that have directly joined the space. - * - * Generated from protobuf field int32 joined_group_count = 5; - */ - protected $joined_group_count = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $joined_direct_human_user_count - * Count of human users that have directly joined the space, not counting - * users joined by having membership in a joined group. - * @type int $joined_group_count - * Count of all groups that have directly joined the space. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Count of human users that have directly joined the space, not counting - * users joined by having membership in a joined group. - * - * Generated from protobuf field int32 joined_direct_human_user_count = 4; - * @return int - */ - public function getJoinedDirectHumanUserCount() - { - return $this->joined_direct_human_user_count; - } - - /** - * Count of human users that have directly joined the space, not counting - * users joined by having membership in a joined group. - * - * Generated from protobuf field int32 joined_direct_human_user_count = 4; - * @param int $var - * @return $this - */ - public function setJoinedDirectHumanUserCount($var) - { - GPBUtil::checkInt32($var); - $this->joined_direct_human_user_count = $var; - - return $this; - } - - /** - * Count of all groups that have directly joined the space. - * - * Generated from protobuf field int32 joined_group_count = 5; - * @return int - */ - public function getJoinedGroupCount() - { - return $this->joined_group_count; - } - - /** - * Count of all groups that have directly joined the space. - * - * Generated from protobuf field int32 joined_group_count = 5; - * @param int $var - * @return $this - */ - public function setJoinedGroupCount($var) - { - GPBUtil::checkInt32($var); - $this->joined_group_count = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(MembershipCount::class, \Google\Apps\Chat\V1\Space_MembershipCount::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSetting.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSetting.php deleted file mode 100644 index 7d301395f998..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSetting.php +++ /dev/null @@ -1,104 +0,0 @@ -google.chat.v1.Space.PermissionSetting - */ -class PermissionSetting extends \Google\Protobuf\Internal\Message -{ - /** - * Whether spaces managers have this permission. - * - * Generated from protobuf field bool managers_allowed = 1; - */ - protected $managers_allowed = false; - /** - * Whether non-manager members have this permission. - * - * Generated from protobuf field bool members_allowed = 2; - */ - protected $members_allowed = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type bool $managers_allowed - * Whether spaces managers have this permission. - * @type bool $members_allowed - * Whether non-manager members have this permission. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Whether spaces managers have this permission. - * - * Generated from protobuf field bool managers_allowed = 1; - * @return bool - */ - public function getManagersAllowed() - { - return $this->managers_allowed; - } - - /** - * Whether spaces managers have this permission. - * - * Generated from protobuf field bool managers_allowed = 1; - * @param bool $var - * @return $this - */ - public function setManagersAllowed($var) - { - GPBUtil::checkBool($var); - $this->managers_allowed = $var; - - return $this; - } - - /** - * Whether non-manager members have this permission. - * - * Generated from protobuf field bool members_allowed = 2; - * @return bool - */ - public function getMembersAllowed() - { - return $this->members_allowed; - } - - /** - * Whether non-manager members have this permission. - * - * Generated from protobuf field bool members_allowed = 2; - * @param bool $var - * @return $this - */ - public function setMembersAllowed($var) - { - GPBUtil::checkBool($var); - $this->members_allowed = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PermissionSetting::class, \Google\Apps\Chat\V1\Space_PermissionSetting::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSettings.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSettings.php deleted file mode 100644 index 3b1999b8dec0..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PermissionSettings.php +++ /dev/null @@ -1,391 +0,0 @@ -google.chat.v1.Space.PermissionSettings - */ -class PermissionSettings extends \Google\Protobuf\Internal\Message -{ - /** - * Setting for managing members and groups in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_members_and_groups = 1; - */ - protected $manage_members_and_groups = null; - /** - * Setting for updating space name, avatar, description and guidelines. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting modify_space_details = 2; - */ - protected $modify_space_details = null; - /** - * Setting for toggling space history on and off. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting toggle_history = 3; - */ - protected $toggle_history = null; - /** - * Setting for using @all in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting use_at_mention_all = 4; - */ - protected $use_at_mention_all = null; - /** - * Setting for managing apps in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_apps = 5; - */ - protected $manage_apps = null; - /** - * Setting for managing webhooks in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_webhooks = 6; - */ - protected $manage_webhooks = null; - /** - * Output only. Setting for posting messages in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting post_messages = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $post_messages = null; - /** - * Setting for replying to messages in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting reply_messages = 8; - */ - protected $reply_messages = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Space\PermissionSetting $manage_members_and_groups - * Setting for managing members and groups in a space. - * @type \Google\Apps\Chat\V1\Space\PermissionSetting $modify_space_details - * Setting for updating space name, avatar, description and guidelines. - * @type \Google\Apps\Chat\V1\Space\PermissionSetting $toggle_history - * Setting for toggling space history on and off. - * @type \Google\Apps\Chat\V1\Space\PermissionSetting $use_at_mention_all - * Setting for using @all in a space. - * @type \Google\Apps\Chat\V1\Space\PermissionSetting $manage_apps - * Setting for managing apps in a space. - * @type \Google\Apps\Chat\V1\Space\PermissionSetting $manage_webhooks - * Setting for managing webhooks in a space. - * @type \Google\Apps\Chat\V1\Space\PermissionSetting $post_messages - * Output only. Setting for posting messages in a space. - * @type \Google\Apps\Chat\V1\Space\PermissionSetting $reply_messages - * Setting for replying to messages in a space. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Setting for managing members and groups in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_members_and_groups = 1; - * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null - */ - public function getManageMembersAndGroups() - { - return $this->manage_members_and_groups; - } - - public function hasManageMembersAndGroups() - { - return isset($this->manage_members_and_groups); - } - - public function clearManageMembersAndGroups() - { - unset($this->manage_members_and_groups); - } - - /** - * Setting for managing members and groups in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_members_and_groups = 1; - * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var - * @return $this - */ - public function setManageMembersAndGroups($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); - $this->manage_members_and_groups = $var; - - return $this; - } - - /** - * Setting for updating space name, avatar, description and guidelines. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting modify_space_details = 2; - * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null - */ - public function getModifySpaceDetails() - { - return $this->modify_space_details; - } - - public function hasModifySpaceDetails() - { - return isset($this->modify_space_details); - } - - public function clearModifySpaceDetails() - { - unset($this->modify_space_details); - } - - /** - * Setting for updating space name, avatar, description and guidelines. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting modify_space_details = 2; - * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var - * @return $this - */ - public function setModifySpaceDetails($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); - $this->modify_space_details = $var; - - return $this; - } - - /** - * Setting for toggling space history on and off. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting toggle_history = 3; - * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null - */ - public function getToggleHistory() - { - return $this->toggle_history; - } - - public function hasToggleHistory() - { - return isset($this->toggle_history); - } - - public function clearToggleHistory() - { - unset($this->toggle_history); - } - - /** - * Setting for toggling space history on and off. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting toggle_history = 3; - * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var - * @return $this - */ - public function setToggleHistory($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); - $this->toggle_history = $var; - - return $this; - } - - /** - * Setting for using @all in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting use_at_mention_all = 4; - * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null - */ - public function getUseAtMentionAll() - { - return $this->use_at_mention_all; - } - - public function hasUseAtMentionAll() - { - return isset($this->use_at_mention_all); - } - - public function clearUseAtMentionAll() - { - unset($this->use_at_mention_all); - } - - /** - * Setting for using @all in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting use_at_mention_all = 4; - * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var - * @return $this - */ - public function setUseAtMentionAll($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); - $this->use_at_mention_all = $var; - - return $this; - } - - /** - * Setting for managing apps in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_apps = 5; - * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null - */ - public function getManageApps() - { - return $this->manage_apps; - } - - public function hasManageApps() - { - return isset($this->manage_apps); - } - - public function clearManageApps() - { - unset($this->manage_apps); - } - - /** - * Setting for managing apps in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_apps = 5; - * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var - * @return $this - */ - public function setManageApps($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); - $this->manage_apps = $var; - - return $this; - } - - /** - * Setting for managing webhooks in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_webhooks = 6; - * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null - */ - public function getManageWebhooks() - { - return $this->manage_webhooks; - } - - public function hasManageWebhooks() - { - return isset($this->manage_webhooks); - } - - public function clearManageWebhooks() - { - unset($this->manage_webhooks); - } - - /** - * Setting for managing webhooks in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting manage_webhooks = 6; - * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var - * @return $this - */ - public function setManageWebhooks($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); - $this->manage_webhooks = $var; - - return $this; - } - - /** - * Output only. Setting for posting messages in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting post_messages = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null - */ - public function getPostMessages() - { - return $this->post_messages; - } - - public function hasPostMessages() - { - return isset($this->post_messages); - } - - public function clearPostMessages() - { - unset($this->post_messages); - } - - /** - * Output only. Setting for posting messages in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting post_messages = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var - * @return $this - */ - public function setPostMessages($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); - $this->post_messages = $var; - - return $this; - } - - /** - * Setting for replying to messages in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting reply_messages = 8; - * @return \Google\Apps\Chat\V1\Space\PermissionSetting|null - */ - public function getReplyMessages() - { - return $this->reply_messages; - } - - public function hasReplyMessages() - { - return isset($this->reply_messages); - } - - public function clearReplyMessages() - { - unset($this->reply_messages); - } - - /** - * Setting for replying to messages in a space. - * - * Generated from protobuf field optional .google.chat.v1.Space.PermissionSetting reply_messages = 8; - * @param \Google\Apps\Chat\V1\Space\PermissionSetting $var - * @return $this - */ - public function setReplyMessages($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space\PermissionSetting::class); - $this->reply_messages = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PermissionSettings::class, \Google\Apps\Chat\V1\Space_PermissionSettings::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PredefinedPermissionSettings.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PredefinedPermissionSettings.php deleted file mode 100644 index c867f67c55a4..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/PredefinedPermissionSettings.php +++ /dev/null @@ -1,69 +0,0 @@ -google.chat.v1.Space.PredefinedPermissionSettings - */ -class PredefinedPermissionSettings -{ - /** - * Unspecified. Don't use. - * - * Generated from protobuf enum PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED = 0; - */ - const PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED = 0; - /** - * Setting to make the space a collaboration space where all members can - * post messages. - * - * Generated from protobuf enum COLLABORATION_SPACE = 1; - */ - const COLLABORATION_SPACE = 1; - /** - * Setting to make the space an announcement space where only space managers - * can post messages. - * - * Generated from protobuf enum ANNOUNCEMENT_SPACE = 2; - */ - const ANNOUNCEMENT_SPACE = 2; - - private static $valueToName = [ - self::PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED => 'PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED', - self::COLLABORATION_SPACE => 'COLLABORATION_SPACE', - self::ANNOUNCEMENT_SPACE => 'ANNOUNCEMENT_SPACE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(PredefinedPermissionSettings::class, \Google\Apps\Chat\V1\Space_PredefinedPermissionSettings::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceDetails.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceDetails.php deleted file mode 100644 index 56d0208306ee..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceDetails.php +++ /dev/null @@ -1,116 +0,0 @@ -google.chat.v1.Space.SpaceDetails - */ -class SpaceDetails extends \Google\Protobuf\Internal\Message -{ - /** - * Optional. A description of the space. For example, describe the space's - * discussion topic, functional purpose, or participants. - * Supports up to 150 characters. - * - * Generated from protobuf field string description = 1; - */ - protected $description = ''; - /** - * Optional. The space's rules, expectations, and etiquette. - * Supports up to 5,000 characters. - * - * Generated from protobuf field string guidelines = 2; - */ - protected $guidelines = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $description - * Optional. A description of the space. For example, describe the space's - * discussion topic, functional purpose, or participants. - * Supports up to 150 characters. - * @type string $guidelines - * Optional. The space's rules, expectations, and etiquette. - * Supports up to 5,000 characters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Optional. A description of the space. For example, describe the space's - * discussion topic, functional purpose, or participants. - * Supports up to 150 characters. - * - * Generated from protobuf field string description = 1; - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * Optional. A description of the space. For example, describe the space's - * discussion topic, functional purpose, or participants. - * Supports up to 150 characters. - * - * Generated from protobuf field string description = 1; - * @param string $var - * @return $this - */ - public function setDescription($var) - { - GPBUtil::checkString($var, True); - $this->description = $var; - - return $this; - } - - /** - * Optional. The space's rules, expectations, and etiquette. - * Supports up to 5,000 characters. - * - * Generated from protobuf field string guidelines = 2; - * @return string - */ - public function getGuidelines() - { - return $this->guidelines; - } - - /** - * Optional. The space's rules, expectations, and etiquette. - * Supports up to 5,000 characters. - * - * Generated from protobuf field string guidelines = 2; - * @param string $var - * @return $this - */ - public function setGuidelines($var) - { - GPBUtil::checkString($var, True); - $this->guidelines = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpaceDetails::class, \Google\Apps\Chat\V1\Space_SpaceDetails::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceThreadingState.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceThreadingState.php deleted file mode 100644 index 09b873e2694b..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceThreadingState.php +++ /dev/null @@ -1,75 +0,0 @@ -google.chat.v1.Space.SpaceThreadingState - */ -class SpaceThreadingState -{ - /** - * Reserved. - * - * Generated from protobuf enum SPACE_THREADING_STATE_UNSPECIFIED = 0; - */ - const SPACE_THREADING_STATE_UNSPECIFIED = 0; - /** - * Named spaces that support message threads. When users respond to a - * message, they can reply in-thread, which keeps their response in the - * context of the original message. - * - * Generated from protobuf enum THREADED_MESSAGES = 2; - */ - const THREADED_MESSAGES = 2; - /** - * Named spaces where the conversation is organized by topic. Topics and - * their replies are grouped together. - * - * Generated from protobuf enum GROUPED_MESSAGES = 3; - */ - const GROUPED_MESSAGES = 3; - /** - * Direct messages (DMs) between two people and group conversations between - * 3 or more people. - * - * Generated from protobuf enum UNTHREADED_MESSAGES = 4; - */ - const UNTHREADED_MESSAGES = 4; - - private static $valueToName = [ - self::SPACE_THREADING_STATE_UNSPECIFIED => 'SPACE_THREADING_STATE_UNSPECIFIED', - self::THREADED_MESSAGES => 'THREADED_MESSAGES', - self::GROUPED_MESSAGES => 'GROUPED_MESSAGES', - self::UNTHREADED_MESSAGES => 'UNTHREADED_MESSAGES', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpaceThreadingState::class, \Google\Apps\Chat\V1\Space_SpaceThreadingState::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceType.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceType.php deleted file mode 100644 index d1dd15987481..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/SpaceType.php +++ /dev/null @@ -1,74 +0,0 @@ -google.chat.v1.Space.SpaceType - */ -class SpaceType -{ - /** - * Reserved. - * - * Generated from protobuf enum SPACE_TYPE_UNSPECIFIED = 0; - */ - const SPACE_TYPE_UNSPECIFIED = 0; - /** - * A place where people send messages, share files, and collaborate. - * A `SPACE` can include Chat apps. - * - * Generated from protobuf enum SPACE = 1; - */ - const SPACE = 1; - /** - * Group conversations between 3 or more people. - * A `GROUP_CHAT` can include Chat apps. - * - * Generated from protobuf enum GROUP_CHAT = 2; - */ - const GROUP_CHAT = 2; - /** - * 1:1 messages between two humans or a human and a Chat app. - * - * Generated from protobuf enum DIRECT_MESSAGE = 3; - */ - const DIRECT_MESSAGE = 3; - - private static $valueToName = [ - self::SPACE_TYPE_UNSPECIFIED => 'SPACE_TYPE_UNSPECIFIED', - self::SPACE => 'SPACE', - self::GROUP_CHAT => 'GROUP_CHAT', - self::DIRECT_MESSAGE => 'DIRECT_MESSAGE', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(SpaceType::class, \Google\Apps\Chat\V1\Space_SpaceType::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/Type.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/Type.php deleted file mode 100644 index 06a6d6b75e69..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Space/Type.php +++ /dev/null @@ -1,65 +0,0 @@ -google.chat.v1.Space.Type - */ -class Type -{ - /** - * Reserved. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Conversations between two or more humans. - * - * Generated from protobuf enum ROOM = 1; - */ - const ROOM = 1; - /** - * 1:1 Direct Message between a human and a Chat app, where all messages are - * flat. Note that this doesn't include direct messages between two humans. - * - * Generated from protobuf enum DM = 2; - */ - const DM = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::ROOM => 'ROOM', - self::DM => 'DM', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Apps\Chat\V1\Space_Type::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceBatchUpdatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceBatchUpdatedEventData.php deleted file mode 100644 index 766dca2695aa..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceBatchUpdatedEventData.php +++ /dev/null @@ -1,68 +0,0 @@ -google.chat.v1.SpaceBatchUpdatedEventData - */ -class SpaceBatchUpdatedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * A list of updated spaces. - * - * Generated from protobuf field repeated .google.chat.v1.SpaceUpdatedEventData spaces = 1; - */ - private $spaces; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type array<\Google\Apps\Chat\V1\SpaceUpdatedEventData>|\Google\Protobuf\Internal\RepeatedField $spaces - * A list of updated spaces. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * A list of updated spaces. - * - * Generated from protobuf field repeated .google.chat.v1.SpaceUpdatedEventData spaces = 1; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getSpaces() - { - return $this->spaces; - } - - /** - * A list of updated spaces. - * - * Generated from protobuf field repeated .google.chat.v1.SpaceUpdatedEventData spaces = 1; - * @param array<\Google\Apps\Chat\V1\SpaceUpdatedEventData>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setSpaces($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\SpaceUpdatedEventData::class); - $this->spaces = $arr; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceEvent.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceEvent.php deleted file mode 100644 index edd947280f93..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceEvent.php +++ /dev/null @@ -1,956 +0,0 @@ -google.chat.v1.SpaceEvent - */ -class SpaceEvent extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the space event. - * Format: `spaces/{space}/spaceEvents/{spaceEvent}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Time when the event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; - */ - protected $event_time = null; - /** - * Type of space event. Each event type has a batch version, which - * represents multiple instances of the event type that occur in a short - * period of time. For `spaceEvents.list()` requests, omit batch event types - * in your query filter. By default, the server returns both event type and - * its batch version. - * Supported event types for - * [messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages): - * * New message: `google.workspace.chat.message.v1.created` - * * Updated message: `google.workspace.chat.message.v1.updated` - * * Deleted message: `google.workspace.chat.message.v1.deleted` - * * Multiple new messages: `google.workspace.chat.message.v1.batchCreated` - * * Multiple updated messages: - * `google.workspace.chat.message.v1.batchUpdated` - * * Multiple deleted messages: - * `google.workspace.chat.message.v1.batchDeleted` - * Supported event types for - * [memberships](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members): - * * New membership: `google.workspace.chat.membership.v1.created` - * * Updated membership: `google.workspace.chat.membership.v1.updated` - * * Deleted membership: `google.workspace.chat.membership.v1.deleted` - * * Multiple new memberships: - * `google.workspace.chat.membership.v1.batchCreated` - * * Multiple updated memberships: - * `google.workspace.chat.membership.v1.batchUpdated` - * * Multiple deleted memberships: - * `google.workspace.chat.membership.v1.batchDeleted` - * Supported event types for - * [reactions](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions): - * * New reaction: `google.workspace.chat.reaction.v1.created` - * * Deleted reaction: `google.workspace.chat.reaction.v1.deleted` - * * Multiple new reactions: - * `google.workspace.chat.reaction.v1.batchCreated` - * * Multiple deleted reactions: - * `google.workspace.chat.reaction.v1.batchDeleted` - * Supported event types about the - * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces): - * * Updated space: `google.workspace.chat.space.v1.updated` - * * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated` - * - * Generated from protobuf field string event_type = 6; - */ - protected $event_type = ''; - protected $payload; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the space event. - * Format: `spaces/{space}/spaceEvents/{spaceEvent}` - * @type \Google\Protobuf\Timestamp $event_time - * Time when the event occurred. - * @type string $event_type - * Type of space event. Each event type has a batch version, which - * represents multiple instances of the event type that occur in a short - * period of time. For `spaceEvents.list()` requests, omit batch event types - * in your query filter. By default, the server returns both event type and - * its batch version. - * Supported event types for - * [messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages): - * * New message: `google.workspace.chat.message.v1.created` - * * Updated message: `google.workspace.chat.message.v1.updated` - * * Deleted message: `google.workspace.chat.message.v1.deleted` - * * Multiple new messages: `google.workspace.chat.message.v1.batchCreated` - * * Multiple updated messages: - * `google.workspace.chat.message.v1.batchUpdated` - * * Multiple deleted messages: - * `google.workspace.chat.message.v1.batchDeleted` - * Supported event types for - * [memberships](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members): - * * New membership: `google.workspace.chat.membership.v1.created` - * * Updated membership: `google.workspace.chat.membership.v1.updated` - * * Deleted membership: `google.workspace.chat.membership.v1.deleted` - * * Multiple new memberships: - * `google.workspace.chat.membership.v1.batchCreated` - * * Multiple updated memberships: - * `google.workspace.chat.membership.v1.batchUpdated` - * * Multiple deleted memberships: - * `google.workspace.chat.membership.v1.batchDeleted` - * Supported event types for - * [reactions](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions): - * * New reaction: `google.workspace.chat.reaction.v1.created` - * * Deleted reaction: `google.workspace.chat.reaction.v1.deleted` - * * Multiple new reactions: - * `google.workspace.chat.reaction.v1.batchCreated` - * * Multiple deleted reactions: - * `google.workspace.chat.reaction.v1.batchDeleted` - * Supported event types about the - * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces): - * * Updated space: `google.workspace.chat.space.v1.updated` - * * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated` - * @type \Google\Apps\Chat\V1\MessageCreatedEventData $message_created_event_data - * Event payload for a new message. - * Event type: `google.workspace.chat.message.v1.created` - * @type \Google\Apps\Chat\V1\MessageUpdatedEventData $message_updated_event_data - * Event payload for an updated message. - * Event type: `google.workspace.chat.message.v1.updated` - * @type \Google\Apps\Chat\V1\MessageDeletedEventData $message_deleted_event_data - * Event payload for a deleted message. - * Event type: `google.workspace.chat.message.v1.deleted` - * @type \Google\Apps\Chat\V1\MessageBatchCreatedEventData $message_batch_created_event_data - * Event payload for multiple new messages. - * Event type: `google.workspace.chat.message.v1.batchCreated` - * @type \Google\Apps\Chat\V1\MessageBatchUpdatedEventData $message_batch_updated_event_data - * Event payload for multiple updated messages. - * Event type: `google.workspace.chat.message.v1.batchUpdated` - * @type \Google\Apps\Chat\V1\MessageBatchDeletedEventData $message_batch_deleted_event_data - * Event payload for multiple deleted messages. - * Event type: `google.workspace.chat.message.v1.batchDeleted` - * @type \Google\Apps\Chat\V1\SpaceUpdatedEventData $space_updated_event_data - * Event payload for a space update. - * Event type: `google.workspace.chat.space.v1.updated` - * @type \Google\Apps\Chat\V1\SpaceBatchUpdatedEventData $space_batch_updated_event_data - * Event payload for multiple updates to a space. - * Event type: `google.workspace.chat.space.v1.batchUpdated` - * @type \Google\Apps\Chat\V1\MembershipCreatedEventData $membership_created_event_data - * Event payload for a new membership. - * Event type: `google.workspace.chat.membership.v1.created` - * @type \Google\Apps\Chat\V1\MembershipUpdatedEventData $membership_updated_event_data - * Event payload for an updated membership. - * Event type: `google.workspace.chat.membership.v1.updated` - * @type \Google\Apps\Chat\V1\MembershipDeletedEventData $membership_deleted_event_data - * Event payload for a deleted membership. - * Event type: `google.workspace.chat.membership.v1.deleted` - * @type \Google\Apps\Chat\V1\MembershipBatchCreatedEventData $membership_batch_created_event_data - * Event payload for multiple new memberships. - * Event type: `google.workspace.chat.membership.v1.batchCreated` - * @type \Google\Apps\Chat\V1\MembershipBatchUpdatedEventData $membership_batch_updated_event_data - * Event payload for multiple updated memberships. - * Event type: `google.workspace.chat.membership.v1.batchUpdated` - * @type \Google\Apps\Chat\V1\MembershipBatchDeletedEventData $membership_batch_deleted_event_data - * Event payload for multiple deleted memberships. - * Event type: `google.workspace.chat.membership.v1.batchDeleted` - * @type \Google\Apps\Chat\V1\ReactionCreatedEventData $reaction_created_event_data - * Event payload for a new reaction. - * Event type: `google.workspace.chat.reaction.v1.created` - * @type \Google\Apps\Chat\V1\ReactionDeletedEventData $reaction_deleted_event_data - * Event payload for a deleted reaction. - * Event type: `google.workspace.chat.reaction.v1.deleted` - * @type \Google\Apps\Chat\V1\ReactionBatchCreatedEventData $reaction_batch_created_event_data - * Event payload for multiple new reactions. - * Event type: `google.workspace.chat.reaction.v1.batchCreated` - * @type \Google\Apps\Chat\V1\ReactionBatchDeletedEventData $reaction_batch_deleted_event_data - * Event payload for multiple deleted reactions. - * Event type: `google.workspace.chat.reaction.v1.batchDeleted` - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\SpaceEvent::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the space event. - * Format: `spaces/{space}/spaceEvents/{spaceEvent}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the space event. - * Format: `spaces/{space}/spaceEvents/{spaceEvent}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Time when the event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; - * @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); - } - - /** - * Time when the event occurred. - * - * Generated from protobuf field .google.protobuf.Timestamp event_time = 3; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setEventTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->event_time = $var; - - return $this; - } - - /** - * Type of space event. Each event type has a batch version, which - * represents multiple instances of the event type that occur in a short - * period of time. For `spaceEvents.list()` requests, omit batch event types - * in your query filter. By default, the server returns both event type and - * its batch version. - * Supported event types for - * [messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages): - * * New message: `google.workspace.chat.message.v1.created` - * * Updated message: `google.workspace.chat.message.v1.updated` - * * Deleted message: `google.workspace.chat.message.v1.deleted` - * * Multiple new messages: `google.workspace.chat.message.v1.batchCreated` - * * Multiple updated messages: - * `google.workspace.chat.message.v1.batchUpdated` - * * Multiple deleted messages: - * `google.workspace.chat.message.v1.batchDeleted` - * Supported event types for - * [memberships](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members): - * * New membership: `google.workspace.chat.membership.v1.created` - * * Updated membership: `google.workspace.chat.membership.v1.updated` - * * Deleted membership: `google.workspace.chat.membership.v1.deleted` - * * Multiple new memberships: - * `google.workspace.chat.membership.v1.batchCreated` - * * Multiple updated memberships: - * `google.workspace.chat.membership.v1.batchUpdated` - * * Multiple deleted memberships: - * `google.workspace.chat.membership.v1.batchDeleted` - * Supported event types for - * [reactions](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions): - * * New reaction: `google.workspace.chat.reaction.v1.created` - * * Deleted reaction: `google.workspace.chat.reaction.v1.deleted` - * * Multiple new reactions: - * `google.workspace.chat.reaction.v1.batchCreated` - * * Multiple deleted reactions: - * `google.workspace.chat.reaction.v1.batchDeleted` - * Supported event types about the - * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces): - * * Updated space: `google.workspace.chat.space.v1.updated` - * * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated` - * - * Generated from protobuf field string event_type = 6; - * @return string - */ - public function getEventType() - { - return $this->event_type; - } - - /** - * Type of space event. Each event type has a batch version, which - * represents multiple instances of the event type that occur in a short - * period of time. For `spaceEvents.list()` requests, omit batch event types - * in your query filter. By default, the server returns both event type and - * its batch version. - * Supported event types for - * [messages](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages): - * * New message: `google.workspace.chat.message.v1.created` - * * Updated message: `google.workspace.chat.message.v1.updated` - * * Deleted message: `google.workspace.chat.message.v1.deleted` - * * Multiple new messages: `google.workspace.chat.message.v1.batchCreated` - * * Multiple updated messages: - * `google.workspace.chat.message.v1.batchUpdated` - * * Multiple deleted messages: - * `google.workspace.chat.message.v1.batchDeleted` - * Supported event types for - * [memberships](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.members): - * * New membership: `google.workspace.chat.membership.v1.created` - * * Updated membership: `google.workspace.chat.membership.v1.updated` - * * Deleted membership: `google.workspace.chat.membership.v1.deleted` - * * Multiple new memberships: - * `google.workspace.chat.membership.v1.batchCreated` - * * Multiple updated memberships: - * `google.workspace.chat.membership.v1.batchUpdated` - * * Multiple deleted memberships: - * `google.workspace.chat.membership.v1.batchDeleted` - * Supported event types for - * [reactions](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.messages.reactions): - * * New reaction: `google.workspace.chat.reaction.v1.created` - * * Deleted reaction: `google.workspace.chat.reaction.v1.deleted` - * * Multiple new reactions: - * `google.workspace.chat.reaction.v1.batchCreated` - * * Multiple deleted reactions: - * `google.workspace.chat.reaction.v1.batchDeleted` - * Supported event types about the - * [space](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces): - * * Updated space: `google.workspace.chat.space.v1.updated` - * * Multiple space updates: `google.workspace.chat.space.v1.batchUpdated` - * - * Generated from protobuf field string event_type = 6; - * @param string $var - * @return $this - */ - public function setEventType($var) - { - GPBUtil::checkString($var, True); - $this->event_type = $var; - - return $this; - } - - /** - * Event payload for a new message. - * Event type: `google.workspace.chat.message.v1.created` - * - * Generated from protobuf field .google.chat.v1.MessageCreatedEventData message_created_event_data = 12; - * @return \Google\Apps\Chat\V1\MessageCreatedEventData|null - */ - public function getMessageCreatedEventData() - { - return $this->readOneof(12); - } - - public function hasMessageCreatedEventData() - { - return $this->hasOneof(12); - } - - /** - * Event payload for a new message. - * Event type: `google.workspace.chat.message.v1.created` - * - * Generated from protobuf field .google.chat.v1.MessageCreatedEventData message_created_event_data = 12; - * @param \Google\Apps\Chat\V1\MessageCreatedEventData $var - * @return $this - */ - public function setMessageCreatedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MessageCreatedEventData::class); - $this->writeOneof(12, $var); - - return $this; - } - - /** - * Event payload for an updated message. - * Event type: `google.workspace.chat.message.v1.updated` - * - * Generated from protobuf field .google.chat.v1.MessageUpdatedEventData message_updated_event_data = 13; - * @return \Google\Apps\Chat\V1\MessageUpdatedEventData|null - */ - public function getMessageUpdatedEventData() - { - return $this->readOneof(13); - } - - public function hasMessageUpdatedEventData() - { - return $this->hasOneof(13); - } - - /** - * Event payload for an updated message. - * Event type: `google.workspace.chat.message.v1.updated` - * - * Generated from protobuf field .google.chat.v1.MessageUpdatedEventData message_updated_event_data = 13; - * @param \Google\Apps\Chat\V1\MessageUpdatedEventData $var - * @return $this - */ - public function setMessageUpdatedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MessageUpdatedEventData::class); - $this->writeOneof(13, $var); - - return $this; - } - - /** - * Event payload for a deleted message. - * Event type: `google.workspace.chat.message.v1.deleted` - * - * Generated from protobuf field .google.chat.v1.MessageDeletedEventData message_deleted_event_data = 14; - * @return \Google\Apps\Chat\V1\MessageDeletedEventData|null - */ - public function getMessageDeletedEventData() - { - return $this->readOneof(14); - } - - public function hasMessageDeletedEventData() - { - return $this->hasOneof(14); - } - - /** - * Event payload for a deleted message. - * Event type: `google.workspace.chat.message.v1.deleted` - * - * Generated from protobuf field .google.chat.v1.MessageDeletedEventData message_deleted_event_data = 14; - * @param \Google\Apps\Chat\V1\MessageDeletedEventData $var - * @return $this - */ - public function setMessageDeletedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MessageDeletedEventData::class); - $this->writeOneof(14, $var); - - return $this; - } - - /** - * Event payload for multiple new messages. - * Event type: `google.workspace.chat.message.v1.batchCreated` - * - * Generated from protobuf field .google.chat.v1.MessageBatchCreatedEventData message_batch_created_event_data = 26; - * @return \Google\Apps\Chat\V1\MessageBatchCreatedEventData|null - */ - public function getMessageBatchCreatedEventData() - { - return $this->readOneof(26); - } - - public function hasMessageBatchCreatedEventData() - { - return $this->hasOneof(26); - } - - /** - * Event payload for multiple new messages. - * Event type: `google.workspace.chat.message.v1.batchCreated` - * - * Generated from protobuf field .google.chat.v1.MessageBatchCreatedEventData message_batch_created_event_data = 26; - * @param \Google\Apps\Chat\V1\MessageBatchCreatedEventData $var - * @return $this - */ - public function setMessageBatchCreatedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MessageBatchCreatedEventData::class); - $this->writeOneof(26, $var); - - return $this; - } - - /** - * Event payload for multiple updated messages. - * Event type: `google.workspace.chat.message.v1.batchUpdated` - * - * Generated from protobuf field .google.chat.v1.MessageBatchUpdatedEventData message_batch_updated_event_data = 27; - * @return \Google\Apps\Chat\V1\MessageBatchUpdatedEventData|null - */ - public function getMessageBatchUpdatedEventData() - { - return $this->readOneof(27); - } - - public function hasMessageBatchUpdatedEventData() - { - return $this->hasOneof(27); - } - - /** - * Event payload for multiple updated messages. - * Event type: `google.workspace.chat.message.v1.batchUpdated` - * - * Generated from protobuf field .google.chat.v1.MessageBatchUpdatedEventData message_batch_updated_event_data = 27; - * @param \Google\Apps\Chat\V1\MessageBatchUpdatedEventData $var - * @return $this - */ - public function setMessageBatchUpdatedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MessageBatchUpdatedEventData::class); - $this->writeOneof(27, $var); - - return $this; - } - - /** - * Event payload for multiple deleted messages. - * Event type: `google.workspace.chat.message.v1.batchDeleted` - * - * Generated from protobuf field .google.chat.v1.MessageBatchDeletedEventData message_batch_deleted_event_data = 28; - * @return \Google\Apps\Chat\V1\MessageBatchDeletedEventData|null - */ - public function getMessageBatchDeletedEventData() - { - return $this->readOneof(28); - } - - public function hasMessageBatchDeletedEventData() - { - return $this->hasOneof(28); - } - - /** - * Event payload for multiple deleted messages. - * Event type: `google.workspace.chat.message.v1.batchDeleted` - * - * Generated from protobuf field .google.chat.v1.MessageBatchDeletedEventData message_batch_deleted_event_data = 28; - * @param \Google\Apps\Chat\V1\MessageBatchDeletedEventData $var - * @return $this - */ - public function setMessageBatchDeletedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MessageBatchDeletedEventData::class); - $this->writeOneof(28, $var); - - return $this; - } - - /** - * Event payload for a space update. - * Event type: `google.workspace.chat.space.v1.updated` - * - * Generated from protobuf field .google.chat.v1.SpaceUpdatedEventData space_updated_event_data = 15; - * @return \Google\Apps\Chat\V1\SpaceUpdatedEventData|null - */ - public function getSpaceUpdatedEventData() - { - return $this->readOneof(15); - } - - public function hasSpaceUpdatedEventData() - { - return $this->hasOneof(15); - } - - /** - * Event payload for a space update. - * Event type: `google.workspace.chat.space.v1.updated` - * - * Generated from protobuf field .google.chat.v1.SpaceUpdatedEventData space_updated_event_data = 15; - * @param \Google\Apps\Chat\V1\SpaceUpdatedEventData $var - * @return $this - */ - public function setSpaceUpdatedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SpaceUpdatedEventData::class); - $this->writeOneof(15, $var); - - return $this; - } - - /** - * Event payload for multiple updates to a space. - * Event type: `google.workspace.chat.space.v1.batchUpdated` - * - * Generated from protobuf field .google.chat.v1.SpaceBatchUpdatedEventData space_batch_updated_event_data = 29; - * @return \Google\Apps\Chat\V1\SpaceBatchUpdatedEventData|null - */ - public function getSpaceBatchUpdatedEventData() - { - return $this->readOneof(29); - } - - public function hasSpaceBatchUpdatedEventData() - { - return $this->hasOneof(29); - } - - /** - * Event payload for multiple updates to a space. - * Event type: `google.workspace.chat.space.v1.batchUpdated` - * - * Generated from protobuf field .google.chat.v1.SpaceBatchUpdatedEventData space_batch_updated_event_data = 29; - * @param \Google\Apps\Chat\V1\SpaceBatchUpdatedEventData $var - * @return $this - */ - public function setSpaceBatchUpdatedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SpaceBatchUpdatedEventData::class); - $this->writeOneof(29, $var); - - return $this; - } - - /** - * Event payload for a new membership. - * Event type: `google.workspace.chat.membership.v1.created` - * - * Generated from protobuf field .google.chat.v1.MembershipCreatedEventData membership_created_event_data = 17; - * @return \Google\Apps\Chat\V1\MembershipCreatedEventData|null - */ - public function getMembershipCreatedEventData() - { - return $this->readOneof(17); - } - - public function hasMembershipCreatedEventData() - { - return $this->hasOneof(17); - } - - /** - * Event payload for a new membership. - * Event type: `google.workspace.chat.membership.v1.created` - * - * Generated from protobuf field .google.chat.v1.MembershipCreatedEventData membership_created_event_data = 17; - * @param \Google\Apps\Chat\V1\MembershipCreatedEventData $var - * @return $this - */ - public function setMembershipCreatedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MembershipCreatedEventData::class); - $this->writeOneof(17, $var); - - return $this; - } - - /** - * Event payload for an updated membership. - * Event type: `google.workspace.chat.membership.v1.updated` - * - * Generated from protobuf field .google.chat.v1.MembershipUpdatedEventData membership_updated_event_data = 18; - * @return \Google\Apps\Chat\V1\MembershipUpdatedEventData|null - */ - public function getMembershipUpdatedEventData() - { - return $this->readOneof(18); - } - - public function hasMembershipUpdatedEventData() - { - return $this->hasOneof(18); - } - - /** - * Event payload for an updated membership. - * Event type: `google.workspace.chat.membership.v1.updated` - * - * Generated from protobuf field .google.chat.v1.MembershipUpdatedEventData membership_updated_event_data = 18; - * @param \Google\Apps\Chat\V1\MembershipUpdatedEventData $var - * @return $this - */ - public function setMembershipUpdatedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MembershipUpdatedEventData::class); - $this->writeOneof(18, $var); - - return $this; - } - - /** - * Event payload for a deleted membership. - * Event type: `google.workspace.chat.membership.v1.deleted` - * - * Generated from protobuf field .google.chat.v1.MembershipDeletedEventData membership_deleted_event_data = 219; - * @return \Google\Apps\Chat\V1\MembershipDeletedEventData|null - */ - public function getMembershipDeletedEventData() - { - return $this->readOneof(219); - } - - public function hasMembershipDeletedEventData() - { - return $this->hasOneof(219); - } - - /** - * Event payload for a deleted membership. - * Event type: `google.workspace.chat.membership.v1.deleted` - * - * Generated from protobuf field .google.chat.v1.MembershipDeletedEventData membership_deleted_event_data = 219; - * @param \Google\Apps\Chat\V1\MembershipDeletedEventData $var - * @return $this - */ - public function setMembershipDeletedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MembershipDeletedEventData::class); - $this->writeOneof(219, $var); - - return $this; - } - - /** - * Event payload for multiple new memberships. - * Event type: `google.workspace.chat.membership.v1.batchCreated` - * - * Generated from protobuf field .google.chat.v1.MembershipBatchCreatedEventData membership_batch_created_event_data = 31; - * @return \Google\Apps\Chat\V1\MembershipBatchCreatedEventData|null - */ - public function getMembershipBatchCreatedEventData() - { - return $this->readOneof(31); - } - - public function hasMembershipBatchCreatedEventData() - { - return $this->hasOneof(31); - } - - /** - * Event payload for multiple new memberships. - * Event type: `google.workspace.chat.membership.v1.batchCreated` - * - * Generated from protobuf field .google.chat.v1.MembershipBatchCreatedEventData membership_batch_created_event_data = 31; - * @param \Google\Apps\Chat\V1\MembershipBatchCreatedEventData $var - * @return $this - */ - public function setMembershipBatchCreatedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MembershipBatchCreatedEventData::class); - $this->writeOneof(31, $var); - - return $this; - } - - /** - * Event payload for multiple updated memberships. - * Event type: `google.workspace.chat.membership.v1.batchUpdated` - * - * Generated from protobuf field .google.chat.v1.MembershipBatchUpdatedEventData membership_batch_updated_event_data = 32; - * @return \Google\Apps\Chat\V1\MembershipBatchUpdatedEventData|null - */ - public function getMembershipBatchUpdatedEventData() - { - return $this->readOneof(32); - } - - public function hasMembershipBatchUpdatedEventData() - { - return $this->hasOneof(32); - } - - /** - * Event payload for multiple updated memberships. - * Event type: `google.workspace.chat.membership.v1.batchUpdated` - * - * Generated from protobuf field .google.chat.v1.MembershipBatchUpdatedEventData membership_batch_updated_event_data = 32; - * @param \Google\Apps\Chat\V1\MembershipBatchUpdatedEventData $var - * @return $this - */ - public function setMembershipBatchUpdatedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MembershipBatchUpdatedEventData::class); - $this->writeOneof(32, $var); - - return $this; - } - - /** - * Event payload for multiple deleted memberships. - * Event type: `google.workspace.chat.membership.v1.batchDeleted` - * - * Generated from protobuf field .google.chat.v1.MembershipBatchDeletedEventData membership_batch_deleted_event_data = 33; - * @return \Google\Apps\Chat\V1\MembershipBatchDeletedEventData|null - */ - public function getMembershipBatchDeletedEventData() - { - return $this->readOneof(33); - } - - public function hasMembershipBatchDeletedEventData() - { - return $this->hasOneof(33); - } - - /** - * Event payload for multiple deleted memberships. - * Event type: `google.workspace.chat.membership.v1.batchDeleted` - * - * Generated from protobuf field .google.chat.v1.MembershipBatchDeletedEventData membership_batch_deleted_event_data = 33; - * @param \Google\Apps\Chat\V1\MembershipBatchDeletedEventData $var - * @return $this - */ - public function setMembershipBatchDeletedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\MembershipBatchDeletedEventData::class); - $this->writeOneof(33, $var); - - return $this; - } - - /** - * Event payload for a new reaction. - * Event type: `google.workspace.chat.reaction.v1.created` - * - * Generated from protobuf field .google.chat.v1.ReactionCreatedEventData reaction_created_event_data = 21; - * @return \Google\Apps\Chat\V1\ReactionCreatedEventData|null - */ - public function getReactionCreatedEventData() - { - return $this->readOneof(21); - } - - public function hasReactionCreatedEventData() - { - return $this->hasOneof(21); - } - - /** - * Event payload for a new reaction. - * Event type: `google.workspace.chat.reaction.v1.created` - * - * Generated from protobuf field .google.chat.v1.ReactionCreatedEventData reaction_created_event_data = 21; - * @param \Google\Apps\Chat\V1\ReactionCreatedEventData $var - * @return $this - */ - public function setReactionCreatedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ReactionCreatedEventData::class); - $this->writeOneof(21, $var); - - return $this; - } - - /** - * Event payload for a deleted reaction. - * Event type: `google.workspace.chat.reaction.v1.deleted` - * - * Generated from protobuf field .google.chat.v1.ReactionDeletedEventData reaction_deleted_event_data = 22; - * @return \Google\Apps\Chat\V1\ReactionDeletedEventData|null - */ - public function getReactionDeletedEventData() - { - return $this->readOneof(22); - } - - public function hasReactionDeletedEventData() - { - return $this->hasOneof(22); - } - - /** - * Event payload for a deleted reaction. - * Event type: `google.workspace.chat.reaction.v1.deleted` - * - * Generated from protobuf field .google.chat.v1.ReactionDeletedEventData reaction_deleted_event_data = 22; - * @param \Google\Apps\Chat\V1\ReactionDeletedEventData $var - * @return $this - */ - public function setReactionDeletedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ReactionDeletedEventData::class); - $this->writeOneof(22, $var); - - return $this; - } - - /** - * Event payload for multiple new reactions. - * Event type: `google.workspace.chat.reaction.v1.batchCreated` - * - * Generated from protobuf field .google.chat.v1.ReactionBatchCreatedEventData reaction_batch_created_event_data = 34; - * @return \Google\Apps\Chat\V1\ReactionBatchCreatedEventData|null - */ - public function getReactionBatchCreatedEventData() - { - return $this->readOneof(34); - } - - public function hasReactionBatchCreatedEventData() - { - return $this->hasOneof(34); - } - - /** - * Event payload for multiple new reactions. - * Event type: `google.workspace.chat.reaction.v1.batchCreated` - * - * Generated from protobuf field .google.chat.v1.ReactionBatchCreatedEventData reaction_batch_created_event_data = 34; - * @param \Google\Apps\Chat\V1\ReactionBatchCreatedEventData $var - * @return $this - */ - public function setReactionBatchCreatedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ReactionBatchCreatedEventData::class); - $this->writeOneof(34, $var); - - return $this; - } - - /** - * Event payload for multiple deleted reactions. - * Event type: `google.workspace.chat.reaction.v1.batchDeleted` - * - * Generated from protobuf field .google.chat.v1.ReactionBatchDeletedEventData reaction_batch_deleted_event_data = 35; - * @return \Google\Apps\Chat\V1\ReactionBatchDeletedEventData|null - */ - public function getReactionBatchDeletedEventData() - { - return $this->readOneof(35); - } - - public function hasReactionBatchDeletedEventData() - { - return $this->hasOneof(35); - } - - /** - * Event payload for multiple deleted reactions. - * Event type: `google.workspace.chat.reaction.v1.batchDeleted` - * - * Generated from protobuf field .google.chat.v1.ReactionBatchDeletedEventData reaction_batch_deleted_event_data = 35; - * @param \Google\Apps\Chat\V1\ReactionBatchDeletedEventData $var - * @return $this - */ - public function setReactionBatchDeletedEventData($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\ReactionBatchDeletedEventData::class); - $this->writeOneof(35, $var); - - return $this; - } - - /** - * @return string - */ - public function getPayload() - { - return $this->whichOneof("payload"); - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceReadState.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceReadState.php deleted file mode 100644 index c50b92718f4c..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceReadState.php +++ /dev/null @@ -1,124 +0,0 @@ -google.chat.v1.SpaceReadState - */ -class SpaceReadState extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the space read state. - * Format: `users/{user}/spaces/{space}/spaceReadState` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. The time when the user's space read state was updated. Usually - * this corresponds with either the timestamp of the last read message, or a - * timestamp specified by the user to mark the last read position in a space. - * - * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $last_read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the space read state. - * Format: `users/{user}/spaces/{space}/spaceReadState` - * @type \Google\Protobuf\Timestamp $last_read_time - * Optional. The time when the user's space read state was updated. Usually - * this corresponds with either the timestamp of the last read message, or a - * timestamp specified by the user to mark the last read position in a space. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\SpaceReadState::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the space read state. - * Format: `users/{user}/spaces/{space}/spaceReadState` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the space read state. - * Format: `users/{user}/spaces/{space}/spaceReadState` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. The time when the user's space read state was updated. Usually - * this corresponds with either the timestamp of the last read message, or a - * timestamp specified by the user to mark the last read position in a space. - * - * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastReadTime() - { - return $this->last_read_time; - } - - public function hasLastReadTime() - { - return isset($this->last_read_time); - } - - public function clearLastReadTime() - { - unset($this->last_read_time); - } - - /** - * Optional. The time when the user's space read state was updated. Usually - * this corresponds with either the timestamp of the last read message, or a - * timestamp specified by the user to mark the last read position in a space. - * - * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2 [(.google.api.field_behavior) = OPTIONAL]; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceUpdatedEventData.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceUpdatedEventData.php deleted file mode 100644 index 00eb47764a7e..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/SpaceUpdatedEventData.php +++ /dev/null @@ -1,78 +0,0 @@ -google.chat.v1.SpaceUpdatedEventData - */ -class SpaceUpdatedEventData extends \Google\Protobuf\Internal\Message -{ - /** - * The updated space. - * - * Generated from protobuf field .google.chat.v1.Space space = 1; - */ - protected $space = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Space $space - * The updated space. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\EventPayload::initOnce(); - parent::__construct($data); - } - - /** - * The updated space. - * - * Generated from protobuf field .google.chat.v1.Space space = 1; - * @return \Google\Apps\Chat\V1\Space|null - */ - public function getSpace() - { - return $this->space; - } - - public function hasSpace() - { - return isset($this->space); - } - - public function clearSpace() - { - unset($this->space); - } - - /** - * The updated space. - * - * Generated from protobuf field .google.chat.v1.Space space = 1; - * @param \Google\Apps\Chat\V1\Space $var - * @return $this - */ - public function setSpace($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); - $this->space = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Thread.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Thread.php deleted file mode 100644 index cef404ea9070..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/Thread.php +++ /dev/null @@ -1,134 +0,0 @@ -google.chat.v1.Thread - */ -class Thread extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the thread. - * Example: `spaces/{space}/threads/{thread}` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Optional. Input for creating or updating a thread. Otherwise, output only. - * ID for the thread. Supports up to 4000 characters. - * This ID is unique to the Chat app that sets it. For example, if - * multiple Chat apps create a message using the same thread key, - * the messages are posted in different threads. To reply in a - * thread created by a person or another Chat app, specify the thread `name` - * field instead. - * - * Generated from protobuf field string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $thread_key = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the thread. - * Example: `spaces/{space}/threads/{thread}` - * @type string $thread_key - * Optional. Input for creating or updating a thread. Otherwise, output only. - * ID for the thread. Supports up to 4000 characters. - * This ID is unique to the Chat app that sets it. For example, if - * multiple Chat apps create a message using the same thread key, - * the messages are posted in different threads. To reply in a - * thread created by a person or another Chat app, specify the thread `name` - * field instead. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the thread. - * Example: `spaces/{space}/threads/{thread}` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the thread. - * Example: `spaces/{space}/threads/{thread}` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Optional. Input for creating or updating a thread. Otherwise, output only. - * ID for the thread. Supports up to 4000 characters. - * This ID is unique to the Chat app that sets it. For example, if - * multiple Chat apps create a message using the same thread key, - * the messages are posted in different threads. To reply in a - * thread created by a person or another Chat app, specify the thread `name` - * field instead. - * - * Generated from protobuf field string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @return string - */ - public function getThreadKey() - { - return $this->thread_key; - } - - /** - * Optional. Input for creating or updating a thread. Otherwise, output only. - * ID for the thread. Supports up to 4000 characters. - * This ID is unique to the Chat app that sets it. For example, if - * multiple Chat apps create a message using the same thread key, - * the messages are posted in different threads. To reply in a - * thread created by a person or another Chat app, specify the thread `name` - * field instead. - * - * Generated from protobuf field string thread_key = 3 [(.google.api.field_behavior) = OPTIONAL]; - * @param string $var - * @return $this - */ - public function setThreadKey($var) - { - GPBUtil::checkString($var, True); - $this->thread_key = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ThreadReadState.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ThreadReadState.php deleted file mode 100644 index 5605873dfdea..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/ThreadReadState.php +++ /dev/null @@ -1,120 +0,0 @@ -google.chat.v1.ThreadReadState - */ -class ThreadReadState extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name of the thread read state. - * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * The time when the user's thread read state was updated. Usually this - * corresponds with the timestamp of the last read message in a thread. - * - * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2; - */ - protected $last_read_time = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name of the thread read state. - * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` - * @type \Google\Protobuf\Timestamp $last_read_time - * The time when the user's thread read state was updated. Usually this - * corresponds with the timestamp of the last read message in a thread. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\ThreadReadState::initOnce(); - parent::__construct($data); - } - - /** - * Resource name of the thread read state. - * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name of the thread read state. - * Format: `users/{user}/spaces/{space}/threads/{thread}/threadReadState` - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * The time when the user's thread read state was updated. Usually this - * corresponds with the timestamp of the last read message in a thread. - * - * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2; - * @return \Google\Protobuf\Timestamp|null - */ - public function getLastReadTime() - { - return $this->last_read_time; - } - - public function hasLastReadTime() - { - return isset($this->last_read_time); - } - - public function clearLastReadTime() - { - unset($this->last_read_time); - } - - /** - * The time when the user's thread read state was updated. Usually this - * corresponds with the timestamp of the last read message in a thread. - * - * Generated from protobuf field .google.protobuf.Timestamp last_read_time = 2; - * @param \Google\Protobuf\Timestamp $var - * @return $this - */ - public function setLastReadTime($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); - $this->last_read_time = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMembershipRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMembershipRequest.php deleted file mode 100644 index cf3107d0a5e3..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMembershipRequest.php +++ /dev/null @@ -1,216 +0,0 @@ -google.chat.v1.UpdateMembershipRequest - */ -class UpdateMembershipRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The membership to update. Only fields specified by `update_mask` - * are updated. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $membership = null; - /** - * Required. The field paths to update. Separate multiple values with commas - * or use `*` to update all field paths. - * Currently supported field paths: - * - `role` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * - * Generated from protobuf field bool use_admin_access = 3; - */ - protected $use_admin_access = false; - - /** - * @param \Google\Apps\Chat\V1\Membership $membership Required. The membership to update. Only fields specified by `update_mask` - * are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. The field paths to update. Separate multiple values with commas - * or use `*` to update all field paths. - * - * Currently supported field paths: - * - * - `role` - * - * @return \Google\Apps\Chat\V1\UpdateMembershipRequest - * - * @experimental - */ - public static function build(\Google\Apps\Chat\V1\Membership $membership, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setMembership($membership) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Membership $membership - * Required. The membership to update. Only fields specified by `update_mask` - * are updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The field paths to update. Separate multiple values with commas - * or use `*` to update all field paths. - * Currently supported field paths: - * - `role` - * @type bool $use_admin_access - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Membership::initOnce(); - parent::__construct($data); - } - - /** - * Required. The membership to update. Only fields specified by `update_mask` - * are updated. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Apps\Chat\V1\Membership|null - */ - public function getMembership() - { - return $this->membership; - } - - public function hasMembership() - { - return isset($this->membership); - } - - public function clearMembership() - { - unset($this->membership); - } - - /** - * Required. The membership to update. Only fields specified by `update_mask` - * are updated. - * - * Generated from protobuf field .google.chat.v1.Membership membership = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Apps\Chat\V1\Membership $var - * @return $this - */ - public function setMembership($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Membership::class); - $this->membership = $var; - - return $this; - } - - /** - * Required. The field paths to update. Separate multiple values with commas - * or use `*` to update all field paths. - * Currently supported field paths: - * - `role` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The field paths to update. Separate multiple values with commas - * or use `*` to update all field paths. - * Currently supported field paths: - * - `role` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Protobuf\FieldMask $var - * @return $this - */ - public function setUpdateMask($var) - { - GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); - $this->update_mask = $var; - - return $this; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * - * Generated from protobuf field bool use_admin_access = 3; - * @return bool - */ - public function getUseAdminAccess() - { - return $this->use_admin_access; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.memberships` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * - * Generated from protobuf field bool use_admin_access = 3; - * @param bool $var - * @return $this - */ - public function setUseAdminAccess($var) - { - GPBUtil::checkBool($var); - $this->use_admin_access = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMessageRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMessageRequest.php deleted file mode 100644 index 338ec6bf863c..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateMessageRequest.php +++ /dev/null @@ -1,238 +0,0 @@ -google.chat.v1.UpdateMessageRequest - */ -class UpdateMessageRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Message with fields updated. - * - * Generated from protobuf field .google.chat.v1.Message message = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $message = null; - /** - * Required. The field paths to update. Separate multiple values with commas - * or use `*` to update all field paths. - * Currently supported field paths: - * - `text` - * - `attachment` - * - `cards` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - `cards_v2` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - `accessory_widgets` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - /** - * Optional. If `true` and the message isn't found, a new message is created - * and `updateMask` is ignored. The specified message ID must be - * [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) - * or the request fails. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - */ - protected $allow_missing = false; - - /** - * @param \Google\Apps\Chat\V1\Message $message Required. Message with fields updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. The field paths to update. Separate multiple values with commas - * or use `*` to update all field paths. - * - * Currently supported field paths: - * - * - `text` - * - * - `attachment` - * - * - `cards` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - * - `cards_v2` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - * - `accessory_widgets` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - * @return \Google\Apps\Chat\V1\UpdateMessageRequest - * - * @experimental - */ - public static function build(\Google\Apps\Chat\V1\Message $message, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setMessage($message) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Message $message - * Required. Message with fields updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The field paths to update. Separate multiple values with commas - * or use `*` to update all field paths. - * Currently supported field paths: - * - `text` - * - `attachment` - * - `cards` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - `cards_v2` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - `accessory_widgets` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * @type bool $allow_missing - * Optional. If `true` and the message isn't found, a new message is created - * and `updateMask` is ignored. The specified message ID must be - * [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) - * or the request fails. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Message::initOnce(); - parent::__construct($data); - } - - /** - * Required. Message with fields updated. - * - * Generated from protobuf field .google.chat.v1.Message message = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Apps\Chat\V1\Message|null - */ - public function getMessage() - { - return $this->message; - } - - public function hasMessage() - { - return isset($this->message); - } - - public function clearMessage() - { - unset($this->message); - } - - /** - * Required. Message with fields updated. - * - * Generated from protobuf field .google.chat.v1.Message message = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Apps\Chat\V1\Message $var - * @return $this - */ - public function setMessage($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Message::class); - $this->message = $var; - - return $this; - } - - /** - * Required. The field paths to update. Separate multiple values with commas - * or use `*` to update all field paths. - * Currently supported field paths: - * - `text` - * - `attachment` - * - `cards` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - `cards_v2` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - `accessory_widgets` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - * 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); - } - - /** - * Required. The field paths to update. Separate multiple values with commas - * or use `*` to update all field paths. - * Currently supported field paths: - * - `text` - * - `attachment` - * - `cards` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - `cards_v2` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - `accessory_widgets` (Requires [app - * authentication](/chat/api/guides/auth/service-accounts).) - * - * 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; - } - - /** - * Optional. If `true` and the message isn't found, a new message is created - * and `updateMask` is ignored. The specified message ID must be - * [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) - * or the request fails. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @return bool - */ - public function getAllowMissing() - { - return $this->allow_missing; - } - - /** - * Optional. If `true` and the message isn't found, a new message is created - * and `updateMask` is ignored. The specified message ID must be - * [client-assigned](https://developers.google.com/workspace/chat/create-messages#name_a_created_message) - * or the request fails. - * - * Generated from protobuf field bool allow_missing = 4 [(.google.api.field_behavior) = OPTIONAL]; - * @param bool $var - * @return $this - */ - public function setAllowMissing($var) - { - GPBUtil::checkBool($var); - $this->allow_missing = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceReadStateRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceReadStateRequest.php deleted file mode 100644 index ca8c1da1bda2..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceReadStateRequest.php +++ /dev/null @@ -1,230 +0,0 @@ -google.chat.v1.UpdateSpaceReadStateRequest - */ -class UpdateSpaceReadStateRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. The space read state and fields to update. - * Only supports updating read state for the calling user. - * To refer to the calling user, set one of the following: - * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/spaceReadState`. - * - Their user id. For example, - * `users/123456789/spaces/{space}/spaceReadState`. - * Format: users/{user}/spaces/{space}/spaceReadState - * - * Generated from protobuf field .google.chat.v1.SpaceReadState space_read_state = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $space_read_state = null; - /** - * Required. The field paths to update. Currently supported field paths: - * - `last_read_time` - * When the `last_read_time` is before the latest message create time, the - * space appears as unread in the UI. - * To mark the space as read, set `last_read_time` to any value later (larger) - * than the latest message create time. The `last_read_time` is coerced to - * match the latest message create time. Note that the space read state only - * affects the read state of messages that are visible in the space's - * top-level conversation. Replies in threads are unaffected by this - * timestamp, and instead rely on the thread read state. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $update_mask = null; - - /** - * @param \Google\Apps\Chat\V1\SpaceReadState $spaceReadState Required. The space read state and fields to update. - * - * Only supports updating read state for the calling user. - * - * To refer to the calling user, set one of the following: - * - * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - * - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/spaceReadState`. - * - * - Their user id. For example, - * `users/123456789/spaces/{space}/spaceReadState`. - * - * Format: users/{user}/spaces/{space}/spaceReadState - * @param \Google\Protobuf\FieldMask $updateMask Required. The field paths to update. Currently supported field paths: - * - * - `last_read_time` - * - * When the `last_read_time` is before the latest message create time, the - * space appears as unread in the UI. - * - * To mark the space as read, set `last_read_time` to any value later (larger) - * than the latest message create time. The `last_read_time` is coerced to - * match the latest message create time. Note that the space read state only - * affects the read state of messages that are visible in the space's - * top-level conversation. Replies in threads are unaffected by this - * timestamp, and instead rely on the thread read state. - * - * @return \Google\Apps\Chat\V1\UpdateSpaceReadStateRequest - * - * @experimental - */ - public static function build(\Google\Apps\Chat\V1\SpaceReadState $spaceReadState, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSpaceReadState($spaceReadState) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\SpaceReadState $space_read_state - * Required. The space read state and fields to update. - * Only supports updating read state for the calling user. - * To refer to the calling user, set one of the following: - * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/spaceReadState`. - * - Their user id. For example, - * `users/123456789/spaces/{space}/spaceReadState`. - * Format: users/{user}/spaces/{space}/spaceReadState - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The field paths to update. Currently supported field paths: - * - `last_read_time` - * When the `last_read_time` is before the latest message create time, the - * space appears as unread in the UI. - * To mark the space as read, set `last_read_time` to any value later (larger) - * than the latest message create time. The `last_read_time` is coerced to - * match the latest message create time. Note that the space read state only - * affects the read state of messages that are visible in the space's - * top-level conversation. Replies in threads are unaffected by this - * timestamp, and instead rely on the thread read state. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\SpaceReadState::initOnce(); - parent::__construct($data); - } - - /** - * Required. The space read state and fields to update. - * Only supports updating read state for the calling user. - * To refer to the calling user, set one of the following: - * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/spaceReadState`. - * - Their user id. For example, - * `users/123456789/spaces/{space}/spaceReadState`. - * Format: users/{user}/spaces/{space}/spaceReadState - * - * Generated from protobuf field .google.chat.v1.SpaceReadState space_read_state = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Apps\Chat\V1\SpaceReadState|null - */ - public function getSpaceReadState() - { - return $this->space_read_state; - } - - public function hasSpaceReadState() - { - return isset($this->space_read_state); - } - - public function clearSpaceReadState() - { - unset($this->space_read_state); - } - - /** - * Required. The space read state and fields to update. - * Only supports updating read state for the calling user. - * To refer to the calling user, set one of the following: - * - The `me` alias. For example, `users/me/spaces/{space}/spaceReadState`. - * - Their Workspace email address. For example, - * `users/user@example.com/spaces/{space}/spaceReadState`. - * - Their user id. For example, - * `users/123456789/spaces/{space}/spaceReadState`. - * Format: users/{user}/spaces/{space}/spaceReadState - * - * Generated from protobuf field .google.chat.v1.SpaceReadState space_read_state = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Apps\Chat\V1\SpaceReadState $var - * @return $this - */ - public function setSpaceReadState($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\SpaceReadState::class); - $this->space_read_state = $var; - - return $this; - } - - /** - * Required. The field paths to update. Currently supported field paths: - * - `last_read_time` - * When the `last_read_time` is before the latest message create time, the - * space appears as unread in the UI. - * To mark the space as read, set `last_read_time` to any value later (larger) - * than the latest message create time. The `last_read_time` is coerced to - * match the latest message create time. Note that the space read state only - * affects the read state of messages that are visible in the space's - * top-level conversation. Replies in threads are unaffected by this - * timestamp, and instead rely on the thread read state. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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); - } - - /** - * Required. The field paths to update. Currently supported field paths: - * - `last_read_time` - * When the `last_read_time` is before the latest message create time, the - * space appears as unread in the UI. - * To mark the space as read, set `last_read_time` to any value later (larger) - * than the latest message create time. The `last_read_time` is coerced to - * match the latest message create time. Note that the space read state only - * affects the read state of messages that are visible in the space's - * top-level conversation. Replies in threads are unaffected by this - * timestamp, and instead rely on the thread read state. - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = REQUIRED]; - * @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/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceRequest.php deleted file mode 100644 index ef832bfb3be3..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UpdateSpaceRequest.php +++ /dev/null @@ -1,480 +0,0 @@ -google.chat.v1.UpdateSpaceRequest - */ -class UpdateSpaceRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Space with fields to be updated. `Space.name` must be - * populated in the form of `spaces/{space}`. Only fields - * specified by `update_mask` are updated. - * - * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $space = null; - /** - * Required. The updated field paths, comma separated if there are - * multiple. - * You can update the following fields for a space: - * `space_details`: Updates the space's description. Supports up to 150 - * characters. - * `display_name`: Only supports updating the display name for spaces where - * `spaceType` field is `SPACE`. - * If you receive the error message `ALREADY_EXISTS`, try a different - * value. An existing space within the - * Google Workspace organization might already use this display name. - * `space_type`: Only supports changing a `GROUP_CHAT` space type to - * `SPACE`. Include `display_name` together - * with `space_type` in the update mask and ensure that the specified space - * has a non-empty display name and the `SPACE` space type. Including the - * `space_type` mask and the `SPACE` type in the specified space when updating - * the display name is optional if the existing space already has the `SPACE` - * type. Trying to update the space type in other ways results in an invalid - * argument error. - * `space_type` is not supported with `useAdminAccess`. - * `space_history_state`: Updates [space history - * settings](https://support.google.com/chat/answer/7664687) by turning - * history on or off for the space. Only supported if history settings are - * enabled for the Google Workspace organization. To update the - * space history state, you must omit all other field masks in your request. - * `space_history_state` is not supported with `useAdminAccess`. - * `access_settings.audience`: Updates the [access - * setting](https://support.google.com/chat/answer/11971020) of who can - * discover the space, join the space, and preview the messages in named space - * where `spaceType` field is `SPACE`. If the existing space has a - * target audience, you can remove the audience and restrict space access by - * omitting a value for this field mask. To update access settings for a - * space, the authenticating user must be a space manager and omit all other - * field masks in your request. You can't update this field if the space is in - * [import - * mode](https://developers.google.com/workspace/chat/import-data-overview). - * To learn more, see [Make a space discoverable to specific - * users](https://developers.google.com/workspace/chat/space-target-audience). - * `access_settings.audience` is not supported with `useAdminAccess`. - * `permission_settings`: Supports changing the - * [permission settings](https://support.google.com/chat/answer/13340792) - * of a space. - * When updating permission settings, you can only specify - * `permissionSettings` field masks; you cannot update other field masks - * at the same time. `permissionSettings` is not supported with - * `useAdminAccess`. - * The supported field masks include: - * - `permission_settings.manageMembersAndGroups` - * - `permission_settings.modifySpaceDetails` - * - `permission_settings.toggleHistory` - * - `permission_settings.useAtMentionAll` - * - `permission_settings.manageApps` - * - `permission_settings.manageWebhooks` - * - `permission_settings.replyMessages` - * - * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2; - */ - protected $update_mask = null; - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.spaces` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Some `FieldMask` values are not supported using admin access. For details, - * see the description of `update_mask`. - * - * Generated from protobuf field bool use_admin_access = 3; - */ - protected $use_admin_access = false; - - /** - * @param \Google\Apps\Chat\V1\Space $space Required. Space with fields to be updated. `Space.name` must be - * populated in the form of `spaces/{space}`. Only fields - * specified by `update_mask` are updated. - * @param \Google\Protobuf\FieldMask $updateMask Required. The updated field paths, comma separated if there are - * multiple. - * - * You can update the following fields for a space: - * - * `space_details`: Updates the space's description. Supports up to 150 - * characters. - * - * `display_name`: Only supports updating the display name for spaces where - * `spaceType` field is `SPACE`. - * If you receive the error message `ALREADY_EXISTS`, try a different - * value. An existing space within the - * Google Workspace organization might already use this display name. - * - * `space_type`: Only supports changing a `GROUP_CHAT` space type to - * `SPACE`. Include `display_name` together - * with `space_type` in the update mask and ensure that the specified space - * has a non-empty display name and the `SPACE` space type. Including the - * `space_type` mask and the `SPACE` type in the specified space when updating - * the display name is optional if the existing space already has the `SPACE` - * type. Trying to update the space type in other ways results in an invalid - * argument error. - * `space_type` is not supported with `useAdminAccess`. - * - * `space_history_state`: Updates [space history - * settings](https://support.google.com/chat/answer/7664687) by turning - * history on or off for the space. Only supported if history settings are - * enabled for the Google Workspace organization. To update the - * space history state, you must omit all other field masks in your request. - * `space_history_state` is not supported with `useAdminAccess`. - * - * `access_settings.audience`: Updates the [access - * setting](https://support.google.com/chat/answer/11971020) of who can - * discover the space, join the space, and preview the messages in named space - * where `spaceType` field is `SPACE`. If the existing space has a - * target audience, you can remove the audience and restrict space access by - * omitting a value for this field mask. To update access settings for a - * space, the authenticating user must be a space manager and omit all other - * field masks in your request. You can't update this field if the space is in - * [import - * mode](https://developers.google.com/workspace/chat/import-data-overview). - * To learn more, see [Make a space discoverable to specific - * users](https://developers.google.com/workspace/chat/space-target-audience). - * `access_settings.audience` is not supported with `useAdminAccess`. - * - * `permission_settings`: Supports changing the - * [permission settings](https://support.google.com/chat/answer/13340792) - * of a space. - * When updating permission settings, you can only specify - * `permissionSettings` field masks; you cannot update other field masks - * at the same time. `permissionSettings` is not supported with - * `useAdminAccess`. - * The supported field masks include: - * - * - `permission_settings.manageMembersAndGroups` - * - `permission_settings.modifySpaceDetails` - * - `permission_settings.toggleHistory` - * - `permission_settings.useAtMentionAll` - * - `permission_settings.manageApps` - * - `permission_settings.manageWebhooks` - * - `permission_settings.replyMessages` - * - * @return \Google\Apps\Chat\V1\UpdateSpaceRequest - * - * @experimental - */ - public static function build(\Google\Apps\Chat\V1\Space $space, \Google\Protobuf\FieldMask $updateMask): self - { - return (new self()) - ->setSpace($space) - ->setUpdateMask($updateMask); - } - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\Space $space - * Required. Space with fields to be updated. `Space.name` must be - * populated in the form of `spaces/{space}`. Only fields - * specified by `update_mask` are updated. - * @type \Google\Protobuf\FieldMask $update_mask - * Required. The updated field paths, comma separated if there are - * multiple. - * You can update the following fields for a space: - * `space_details`: Updates the space's description. Supports up to 150 - * characters. - * `display_name`: Only supports updating the display name for spaces where - * `spaceType` field is `SPACE`. - * If you receive the error message `ALREADY_EXISTS`, try a different - * value. An existing space within the - * Google Workspace organization might already use this display name. - * `space_type`: Only supports changing a `GROUP_CHAT` space type to - * `SPACE`. Include `display_name` together - * with `space_type` in the update mask and ensure that the specified space - * has a non-empty display name and the `SPACE` space type. Including the - * `space_type` mask and the `SPACE` type in the specified space when updating - * the display name is optional if the existing space already has the `SPACE` - * type. Trying to update the space type in other ways results in an invalid - * argument error. - * `space_type` is not supported with `useAdminAccess`. - * `space_history_state`: Updates [space history - * settings](https://support.google.com/chat/answer/7664687) by turning - * history on or off for the space. Only supported if history settings are - * enabled for the Google Workspace organization. To update the - * space history state, you must omit all other field masks in your request. - * `space_history_state` is not supported with `useAdminAccess`. - * `access_settings.audience`: Updates the [access - * setting](https://support.google.com/chat/answer/11971020) of who can - * discover the space, join the space, and preview the messages in named space - * where `spaceType` field is `SPACE`. If the existing space has a - * target audience, you can remove the audience and restrict space access by - * omitting a value for this field mask. To update access settings for a - * space, the authenticating user must be a space manager and omit all other - * field masks in your request. You can't update this field if the space is in - * [import - * mode](https://developers.google.com/workspace/chat/import-data-overview). - * To learn more, see [Make a space discoverable to specific - * users](https://developers.google.com/workspace/chat/space-target-audience). - * `access_settings.audience` is not supported with `useAdminAccess`. - * `permission_settings`: Supports changing the - * [permission settings](https://support.google.com/chat/answer/13340792) - * of a space. - * When updating permission settings, you can only specify - * `permissionSettings` field masks; you cannot update other field masks - * at the same time. `permissionSettings` is not supported with - * `useAdminAccess`. - * The supported field masks include: - * - `permission_settings.manageMembersAndGroups` - * - `permission_settings.modifySpaceDetails` - * - `permission_settings.toggleHistory` - * - `permission_settings.useAtMentionAll` - * - `permission_settings.manageApps` - * - `permission_settings.manageWebhooks` - * - `permission_settings.replyMessages` - * @type bool $use_admin_access - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.spaces` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Some `FieldMask` values are not supported using admin access. For details, - * see the description of `update_mask`. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Space::initOnce(); - parent::__construct($data); - } - - /** - * Required. Space with fields to be updated. `Space.name` must be - * populated in the form of `spaces/{space}`. Only fields - * specified by `update_mask` are updated. - * - * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; - * @return \Google\Apps\Chat\V1\Space|null - */ - public function getSpace() - { - return $this->space; - } - - public function hasSpace() - { - return isset($this->space); - } - - public function clearSpace() - { - unset($this->space); - } - - /** - * Required. Space with fields to be updated. `Space.name` must be - * populated in the form of `spaces/{space}`. Only fields - * specified by `update_mask` are updated. - * - * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; - * @param \Google\Apps\Chat\V1\Space $var - * @return $this - */ - public function setSpace($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\Space::class); - $this->space = $var; - - return $this; - } - - /** - * Required. The updated field paths, comma separated if there are - * multiple. - * You can update the following fields for a space: - * `space_details`: Updates the space's description. Supports up to 150 - * characters. - * `display_name`: Only supports updating the display name for spaces where - * `spaceType` field is `SPACE`. - * If you receive the error message `ALREADY_EXISTS`, try a different - * value. An existing space within the - * Google Workspace organization might already use this display name. - * `space_type`: Only supports changing a `GROUP_CHAT` space type to - * `SPACE`. Include `display_name` together - * with `space_type` in the update mask and ensure that the specified space - * has a non-empty display name and the `SPACE` space type. Including the - * `space_type` mask and the `SPACE` type in the specified space when updating - * the display name is optional if the existing space already has the `SPACE` - * type. Trying to update the space type in other ways results in an invalid - * argument error. - * `space_type` is not supported with `useAdminAccess`. - * `space_history_state`: Updates [space history - * settings](https://support.google.com/chat/answer/7664687) by turning - * history on or off for the space. Only supported if history settings are - * enabled for the Google Workspace organization. To update the - * space history state, you must omit all other field masks in your request. - * `space_history_state` is not supported with `useAdminAccess`. - * `access_settings.audience`: Updates the [access - * setting](https://support.google.com/chat/answer/11971020) of who can - * discover the space, join the space, and preview the messages in named space - * where `spaceType` field is `SPACE`. If the existing space has a - * target audience, you can remove the audience and restrict space access by - * omitting a value for this field mask. To update access settings for a - * space, the authenticating user must be a space manager and omit all other - * field masks in your request. You can't update this field if the space is in - * [import - * mode](https://developers.google.com/workspace/chat/import-data-overview). - * To learn more, see [Make a space discoverable to specific - * users](https://developers.google.com/workspace/chat/space-target-audience). - * `access_settings.audience` is not supported with `useAdminAccess`. - * `permission_settings`: Supports changing the - * [permission settings](https://support.google.com/chat/answer/13340792) - * of a space. - * When updating permission settings, you can only specify - * `permissionSettings` field masks; you cannot update other field masks - * at the same time. `permissionSettings` is not supported with - * `useAdminAccess`. - * The supported field masks include: - * - `permission_settings.manageMembersAndGroups` - * - `permission_settings.modifySpaceDetails` - * - `permission_settings.toggleHistory` - * - `permission_settings.useAtMentionAll` - * - `permission_settings.manageApps` - * - `permission_settings.manageWebhooks` - * - `permission_settings.replyMessages` - * - * 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); - } - - /** - * Required. The updated field paths, comma separated if there are - * multiple. - * You can update the following fields for a space: - * `space_details`: Updates the space's description. Supports up to 150 - * characters. - * `display_name`: Only supports updating the display name for spaces where - * `spaceType` field is `SPACE`. - * If you receive the error message `ALREADY_EXISTS`, try a different - * value. An existing space within the - * Google Workspace organization might already use this display name. - * `space_type`: Only supports changing a `GROUP_CHAT` space type to - * `SPACE`. Include `display_name` together - * with `space_type` in the update mask and ensure that the specified space - * has a non-empty display name and the `SPACE` space type. Including the - * `space_type` mask and the `SPACE` type in the specified space when updating - * the display name is optional if the existing space already has the `SPACE` - * type. Trying to update the space type in other ways results in an invalid - * argument error. - * `space_type` is not supported with `useAdminAccess`. - * `space_history_state`: Updates [space history - * settings](https://support.google.com/chat/answer/7664687) by turning - * history on or off for the space. Only supported if history settings are - * enabled for the Google Workspace organization. To update the - * space history state, you must omit all other field masks in your request. - * `space_history_state` is not supported with `useAdminAccess`. - * `access_settings.audience`: Updates the [access - * setting](https://support.google.com/chat/answer/11971020) of who can - * discover the space, join the space, and preview the messages in named space - * where `spaceType` field is `SPACE`. If the existing space has a - * target audience, you can remove the audience and restrict space access by - * omitting a value for this field mask. To update access settings for a - * space, the authenticating user must be a space manager and omit all other - * field masks in your request. You can't update this field if the space is in - * [import - * mode](https://developers.google.com/workspace/chat/import-data-overview). - * To learn more, see [Make a space discoverable to specific - * users](https://developers.google.com/workspace/chat/space-target-audience). - * `access_settings.audience` is not supported with `useAdminAccess`. - * `permission_settings`: Supports changing the - * [permission settings](https://support.google.com/chat/answer/13340792) - * of a space. - * When updating permission settings, you can only specify - * `permissionSettings` field masks; you cannot update other field masks - * at the same time. `permissionSettings` is not supported with - * `useAdminAccess`. - * The supported field masks include: - * - `permission_settings.manageMembersAndGroups` - * - `permission_settings.modifySpaceDetails` - * - `permission_settings.toggleHistory` - * - `permission_settings.useAtMentionAll` - * - `permission_settings.manageApps` - * - `permission_settings.manageWebhooks` - * - `permission_settings.replyMessages` - * - * 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; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.spaces` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Some `FieldMask` values are not supported using admin access. For details, - * see the description of `update_mask`. - * - * Generated from protobuf field bool use_admin_access = 3; - * @return bool - */ - public function getUseAdminAccess() - { - return $this->use_admin_access; - } - - /** - * When `true`, the method runs using the user's Google Workspace - * administrator privileges. - * The calling user must be a Google Workspace administrator with the - * [manage chat and spaces conversations - * privilege](https://support.google.com/a/answer/13369245). - * Requires the `chat.admin.spaces` [OAuth 2.0 - * scope](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes). - * Some `FieldMask` values are not supported using admin access. For details, - * see the description of `update_mask`. - * - * Generated from protobuf field bool use_admin_access = 3; - * @param bool $var - * @return $this - */ - public function setUseAdminAccess($var) - { - GPBUtil::checkBool($var); - $this->use_admin_access = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentRequest.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentRequest.php deleted file mode 100644 index 2afa91efd97d..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentRequest.php +++ /dev/null @@ -1,105 +0,0 @@ -google.chat.v1.UploadAttachmentRequest - */ -class UploadAttachmentRequest extends \Google\Protobuf\Internal\Message -{ - /** - * Required. Resource name of the Chat space in which the attachment is - * uploaded. Format "spaces/{space}". - * - * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { - */ - protected $parent = ''; - /** - * Required. The filename of the attachment, including the file extension. - * - * Generated from protobuf field string filename = 4 [(.google.api.field_behavior) = REQUIRED]; - */ - protected $filename = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $parent - * Required. Resource name of the Chat space in which the attachment is - * uploaded. Format "spaces/{space}". - * @type string $filename - * Required. The filename of the attachment, including the file extension. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); - parent::__construct($data); - } - - /** - * Required. Resource name of the Chat space in which the attachment is - * uploaded. Format "spaces/{space}". - * - * 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. Resource name of the Chat space in which the attachment is - * uploaded. Format "spaces/{space}". - * - * 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 filename of the attachment, including the file extension. - * - * Generated from protobuf field string filename = 4 [(.google.api.field_behavior) = REQUIRED]; - * @return string - */ - public function getFilename() - { - return $this->filename; - } - - /** - * Required. The filename of the attachment, including the file extension. - * - * Generated from protobuf field string filename = 4 [(.google.api.field_behavior) = REQUIRED]; - * @param string $var - * @return $this - */ - public function setFilename($var) - { - GPBUtil::checkString($var, True); - $this->filename = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentResponse.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentResponse.php deleted file mode 100644 index 942c71f0fe3b..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UploadAttachmentResponse.php +++ /dev/null @@ -1,77 +0,0 @@ -google.chat.v1.UploadAttachmentResponse - */ -class UploadAttachmentResponse extends \Google\Protobuf\Internal\Message -{ - /** - * Reference to the uploaded attachment. - * - * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 1; - */ - protected $attachment_data_ref = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\AttachmentDataRef $attachment_data_ref - * Reference to the uploaded attachment. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Attachment::initOnce(); - parent::__construct($data); - } - - /** - * Reference to the uploaded attachment. - * - * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 1; - * @return \Google\Apps\Chat\V1\AttachmentDataRef|null - */ - public function getAttachmentDataRef() - { - return $this->attachment_data_ref; - } - - public function hasAttachmentDataRef() - { - return isset($this->attachment_data_ref); - } - - public function clearAttachmentDataRef() - { - unset($this->attachment_data_ref); - } - - /** - * Reference to the uploaded attachment. - * - * Generated from protobuf field .google.chat.v1.AttachmentDataRef attachment_data_ref = 1; - * @param \Google\Apps\Chat\V1\AttachmentDataRef $var - * @return $this - */ - public function setAttachmentDataRef($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\AttachmentDataRef::class); - $this->attachment_data_ref = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User.php deleted file mode 100644 index 87cb7134117f..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User.php +++ /dev/null @@ -1,275 +0,0 @@ -google.chat.v1.User - */ -class User extends \Google\Protobuf\Internal\Message -{ - /** - * Resource name for a Google Chat [user][google.chat.v1.User]. - * Format: `users/{user}`. `users/app` can be used as an alias for the calling - * app [bot][google.chat.v1.User.Type.BOT] user. - * For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same - * user identifier as: - * - the `id` for the - * [Person](https://developers.google.com/people/api/rest/v1/people) in the - * People API. For example, `users/123456789` in Chat API represents the same - * person as the `123456789` Person profile ID in People API. - * - the `id` for a - * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) - * in the Admin SDK Directory API. - * - the user's email address can be used as an alias for `{user}` in API - * requests. For example, if the People API Person profile ID for - * `user@example.com` is `123456789`, you can use `users/user@example.com` as - * an alias to reference `users/123456789`. Only the canonical resource name - * (for example `users/123456789`) will be returned from the API. - * - * Generated from protobuf field string name = 1; - */ - protected $name = ''; - /** - * Output only. The user's display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $display_name = ''; - /** - * Unique identifier of the user's Google Workspace domain. - * - * Generated from protobuf field string domain_id = 6; - */ - protected $domain_id = ''; - /** - * User type. - * - * Generated from protobuf field .google.chat.v1.User.Type type = 5; - */ - protected $type = 0; - /** - * Output only. When `true`, the user is deleted or their profile is not - * visible. - * - * Generated from protobuf field bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - */ - protected $is_anonymous = false; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $name - * Resource name for a Google Chat [user][google.chat.v1.User]. - * Format: `users/{user}`. `users/app` can be used as an alias for the calling - * app [bot][google.chat.v1.User.Type.BOT] user. - * For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same - * user identifier as: - * - the `id` for the - * [Person](https://developers.google.com/people/api/rest/v1/people) in the - * People API. For example, `users/123456789` in Chat API represents the same - * person as the `123456789` Person profile ID in People API. - * - the `id` for a - * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) - * in the Admin SDK Directory API. - * - the user's email address can be used as an alias for `{user}` in API - * requests. For example, if the People API Person profile ID for - * `user@example.com` is `123456789`, you can use `users/user@example.com` as - * an alias to reference `users/123456789`. Only the canonical resource name - * (for example `users/123456789`) will be returned from the API. - * @type string $display_name - * Output only. The user's display name. - * @type string $domain_id - * Unique identifier of the user's Google Workspace domain. - * @type int $type - * User type. - * @type bool $is_anonymous - * Output only. When `true`, the user is deleted or their profile is not - * visible. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\User::initOnce(); - parent::__construct($data); - } - - /** - * Resource name for a Google Chat [user][google.chat.v1.User]. - * Format: `users/{user}`. `users/app` can be used as an alias for the calling - * app [bot][google.chat.v1.User.Type.BOT] user. - * For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same - * user identifier as: - * - the `id` for the - * [Person](https://developers.google.com/people/api/rest/v1/people) in the - * People API. For example, `users/123456789` in Chat API represents the same - * person as the `123456789` Person profile ID in People API. - * - the `id` for a - * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) - * in the Admin SDK Directory API. - * - the user's email address can be used as an alias for `{user}` in API - * requests. For example, if the People API Person profile ID for - * `user@example.com` is `123456789`, you can use `users/user@example.com` as - * an alias to reference `users/123456789`. Only the canonical resource name - * (for example `users/123456789`) will be returned from the API. - * - * Generated from protobuf field string name = 1; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * Resource name for a Google Chat [user][google.chat.v1.User]. - * Format: `users/{user}`. `users/app` can be used as an alias for the calling - * app [bot][google.chat.v1.User.Type.BOT] user. - * For [human users][google.chat.v1.User.Type.HUMAN], `{user}` is the same - * user identifier as: - * - the `id` for the - * [Person](https://developers.google.com/people/api/rest/v1/people) in the - * People API. For example, `users/123456789` in Chat API represents the same - * person as the `123456789` Person profile ID in People API. - * - the `id` for a - * [user](https://developers.google.com/admin-sdk/directory/reference/rest/v1/users) - * in the Admin SDK Directory API. - * - the user's email address can be used as an alias for `{user}` in API - * requests. For example, if the People API Person profile ID for - * `user@example.com` is `123456789`, you can use `users/user@example.com` as - * an alias to reference `users/123456789`. Only the canonical resource name - * (for example `users/123456789`) will be returned from the API. - * - * Generated from protobuf field string name = 1; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * Output only. The user's display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return string - */ - public function getDisplayName() - { - return $this->display_name; - } - - /** - * Output only. The user's display name. - * - * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param string $var - * @return $this - */ - public function setDisplayName($var) - { - GPBUtil::checkString($var, True); - $this->display_name = $var; - - return $this; - } - - /** - * Unique identifier of the user's Google Workspace domain. - * - * Generated from protobuf field string domain_id = 6; - * @return string - */ - public function getDomainId() - { - return $this->domain_id; - } - - /** - * Unique identifier of the user's Google Workspace domain. - * - * Generated from protobuf field string domain_id = 6; - * @param string $var - * @return $this - */ - public function setDomainId($var) - { - GPBUtil::checkString($var, True); - $this->domain_id = $var; - - return $this; - } - - /** - * User type. - * - * Generated from protobuf field .google.chat.v1.User.Type type = 5; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * User type. - * - * Generated from protobuf field .google.chat.v1.User.Type type = 5; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\User\Type::class); - $this->type = $var; - - return $this; - } - - /** - * Output only. When `true`, the user is deleted or their profile is not - * visible. - * - * Generated from protobuf field bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @return bool - */ - public function getIsAnonymous() - { - return $this->is_anonymous; - } - - /** - * Output only. When `true`, the user is deleted or their profile is not - * visible. - * - * Generated from protobuf field bool is_anonymous = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * @param bool $var - * @return $this - */ - public function setIsAnonymous($var) - { - GPBUtil::checkBool($var); - $this->is_anonymous = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User/Type.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User/Type.php deleted file mode 100644 index c937b1cf005c..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/User/Type.php +++ /dev/null @@ -1,62 +0,0 @@ -google.chat.v1.User.Type - */ -class Type -{ - /** - * Default value for the enum. DO NOT USE. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Human user. - * - * Generated from protobuf enum HUMAN = 1; - */ - const HUMAN = 1; - /** - * Chat app user. - * - * Generated from protobuf enum BOT = 2; - */ - const BOT = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::HUMAN => 'HUMAN', - self::BOT => 'BOT', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Apps\Chat\V1\User_Type::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata.php deleted file mode 100644 index 2ac7ee99c979..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata.php +++ /dev/null @@ -1,111 +0,0 @@ -google.chat.v1.UserMentionMetadata - */ -class UserMentionMetadata extends \Google\Protobuf\Internal\Message -{ - /** - * The user mentioned. - * - * Generated from protobuf field .google.chat.v1.User user = 1; - */ - protected $user = null; - /** - * The type of user mention. - * - * Generated from protobuf field .google.chat.v1.UserMentionMetadata.Type type = 2; - */ - protected $type = 0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\User $user - * The user mentioned. - * @type int $type - * The type of user mention. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Annotation::initOnce(); - parent::__construct($data); - } - - /** - * The user mentioned. - * - * Generated from protobuf field .google.chat.v1.User user = 1; - * @return \Google\Apps\Chat\V1\User|null - */ - public function getUser() - { - return $this->user; - } - - public function hasUser() - { - return isset($this->user); - } - - public function clearUser() - { - unset($this->user); - } - - /** - * The user mentioned. - * - * Generated from protobuf field .google.chat.v1.User user = 1; - * @param \Google\Apps\Chat\V1\User $var - * @return $this - */ - public function setUser($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\User::class); - $this->user = $var; - - return $this; - } - - /** - * The type of user mention. - * - * Generated from protobuf field .google.chat.v1.UserMentionMetadata.Type type = 2; - * @return int - */ - public function getType() - { - return $this->type; - } - - /** - * The type of user mention. - * - * Generated from protobuf field .google.chat.v1.UserMentionMetadata.Type type = 2; - * @param int $var - * @return $this - */ - public function setType($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\UserMentionMetadata\Type::class); - $this->type = $var; - - return $this; - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata/Type.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata/Type.php deleted file mode 100644 index 6ea2e9d41087..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/UserMentionMetadata/Type.php +++ /dev/null @@ -1,62 +0,0 @@ -google.chat.v1.UserMentionMetadata.Type - */ -class Type -{ - /** - * Default value for the enum. Don't use. - * - * Generated from protobuf enum TYPE_UNSPECIFIED = 0; - */ - const TYPE_UNSPECIFIED = 0; - /** - * Add user to space. - * - * Generated from protobuf enum ADD = 1; - */ - const ADD = 1; - /** - * Mention user in space. - * - * Generated from protobuf enum MENTION = 2; - */ - const MENTION = 2; - - private static $valueToName = [ - self::TYPE_UNSPECIFIED => 'TYPE_UNSPECIFIED', - self::ADD => 'ADD', - self::MENTION => 'MENTION', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Type::class, \Google\Apps\Chat\V1\UserMentionMetadata_Type::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup.php deleted file mode 100644 index e247cc73adae..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup.php +++ /dev/null @@ -1,179 +0,0 @@ -google.chat.v1.WidgetMarkup - */ -class WidgetMarkup extends \Google\Protobuf\Internal\Message -{ - /** - * A list of buttons. Buttons is also `oneof data` and only one of these - * fields should be set. - * - * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.Button buttons = 6; - */ - private $buttons; - protected $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\WidgetMarkup\TextParagraph $text_paragraph - * Display a text paragraph in this widget. - * @type \Google\Apps\Chat\V1\WidgetMarkup\Image $image - * Display an image in this widget. - * @type \Google\Apps\Chat\V1\WidgetMarkup\KeyValue $key_value - * Display a key value item in this widget. - * @type array<\Google\Apps\Chat\V1\WidgetMarkup\Button>|\Google\Protobuf\Internal\RepeatedField $buttons - * A list of buttons. Buttons is also `oneof data` and only one of these - * fields should be set. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); - parent::__construct($data); - } - - /** - * Display a text paragraph in this widget. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1; - * @return \Google\Apps\Chat\V1\WidgetMarkup\TextParagraph|null - */ - public function getTextParagraph() - { - return $this->readOneof(1); - } - - public function hasTextParagraph() - { - return $this->hasOneof(1); - } - - /** - * Display a text paragraph in this widget. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.TextParagraph text_paragraph = 1; - * @param \Google\Apps\Chat\V1\WidgetMarkup\TextParagraph $var - * @return $this - */ - public function setTextParagraph($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\TextParagraph::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * Display an image in this widget. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.Image image = 2; - * @return \Google\Apps\Chat\V1\WidgetMarkup\Image|null - */ - public function getImage() - { - return $this->readOneof(2); - } - - public function hasImage() - { - return $this->hasOneof(2); - } - - /** - * Display an image in this widget. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.Image image = 2; - * @param \Google\Apps\Chat\V1\WidgetMarkup\Image $var - * @return $this - */ - public function setImage($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\Image::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * Display a key value item in this widget. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.KeyValue key_value = 3; - * @return \Google\Apps\Chat\V1\WidgetMarkup\KeyValue|null - */ - public function getKeyValue() - { - return $this->readOneof(3); - } - - public function hasKeyValue() - { - return $this->hasOneof(3); - } - - /** - * Display a key value item in this widget. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.KeyValue key_value = 3; - * @param \Google\Apps\Chat\V1\WidgetMarkup\KeyValue $var - * @return $this - */ - public function setKeyValue($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\KeyValue::class); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * A list of buttons. Buttons is also `oneof data` and only one of these - * fields should be set. - * - * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.Button buttons = 6; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getButtons() - { - return $this->buttons; - } - - /** - * A list of buttons. Buttons is also `oneof data` and only one of these - * fields should be set. - * - * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.Button buttons = 6; - * @param array<\Google\Apps\Chat\V1\WidgetMarkup\Button>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setButtons($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\WidgetMarkup\Button::class); - $this->buttons = $arr; - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - -} - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Button.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Button.php deleted file mode 100644 index 4cf6fddbefc8..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Button.php +++ /dev/null @@ -1,111 +0,0 @@ -google.chat.v1.WidgetMarkup.Button - */ -class Button extends \Google\Protobuf\Internal\Message -{ - protected $type; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\WidgetMarkup\TextButton $text_button - * A button with text and `onclick` action. - * @type \Google\Apps\Chat\V1\WidgetMarkup\ImageButton $image_button - * A button with image and `onclick` action. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); - parent::__construct($data); - } - - /** - * A button with text and `onclick` action. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.TextButton text_button = 1; - * @return \Google\Apps\Chat\V1\WidgetMarkup\TextButton|null - */ - public function getTextButton() - { - return $this->readOneof(1); - } - - public function hasTextButton() - { - return $this->hasOneof(1); - } - - /** - * A button with text and `onclick` action. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.TextButton text_button = 1; - * @param \Google\Apps\Chat\V1\WidgetMarkup\TextButton $var - * @return $this - */ - public function setTextButton($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\TextButton::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * A button with image and `onclick` action. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.ImageButton image_button = 2; - * @return \Google\Apps\Chat\V1\WidgetMarkup\ImageButton|null - */ - public function getImageButton() - { - return $this->readOneof(2); - } - - public function hasImageButton() - { - return $this->hasOneof(2); - } - - /** - * A button with image and `onclick` action. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.ImageButton image_button = 2; - * @param \Google\Apps\Chat\V1\WidgetMarkup\ImageButton $var - * @return $this - */ - public function setImageButton($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\ImageButton::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getType() - { - return $this->whichOneof("type"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Button::class, \Google\Apps\Chat\V1\WidgetMarkup_Button::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction.php deleted file mode 100644 index 2fdac4140fbf..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction.php +++ /dev/null @@ -1,117 +0,0 @@ -google.chat.v1.WidgetMarkup.FormAction - */ -class FormAction extends \Google\Protobuf\Internal\Message -{ - /** - * The method name is used to identify which part of the form triggered the - * form submission. This information is echoed back to the Chat app as part - * of the card click event. You can use the same method name for several - * elements that trigger a common behavior. - * - * Generated from protobuf field string action_method_name = 1; - */ - protected $action_method_name = ''; - /** - * List of action parameters. - * - * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.FormAction.ActionParameter parameters = 2; - */ - private $parameters; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $action_method_name - * The method name is used to identify which part of the form triggered the - * form submission. This information is echoed back to the Chat app as part - * of the card click event. You can use the same method name for several - * elements that trigger a common behavior. - * @type array<\Google\Apps\Chat\V1\WidgetMarkup\FormAction\ActionParameter>|\Google\Protobuf\Internal\RepeatedField $parameters - * List of action parameters. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); - parent::__construct($data); - } - - /** - * The method name is used to identify which part of the form triggered the - * form submission. This information is echoed back to the Chat app as part - * of the card click event. You can use the same method name for several - * elements that trigger a common behavior. - * - * Generated from protobuf field string action_method_name = 1; - * @return string - */ - public function getActionMethodName() - { - return $this->action_method_name; - } - - /** - * The method name is used to identify which part of the form triggered the - * form submission. This information is echoed back to the Chat app as part - * of the card click event. You can use the same method name for several - * elements that trigger a common behavior. - * - * Generated from protobuf field string action_method_name = 1; - * @param string $var - * @return $this - */ - public function setActionMethodName($var) - { - GPBUtil::checkString($var, True); - $this->action_method_name = $var; - - return $this; - } - - /** - * List of action parameters. - * - * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.FormAction.ActionParameter parameters = 2; - * @return \Google\Protobuf\Internal\RepeatedField - */ - public function getParameters() - { - return $this->parameters; - } - - /** - * List of action parameters. - * - * Generated from protobuf field repeated .google.chat.v1.WidgetMarkup.FormAction.ActionParameter parameters = 2; - * @param array<\Google\Apps\Chat\V1\WidgetMarkup\FormAction\ActionParameter>|\Google\Protobuf\Internal\RepeatedField $var - * @return $this - */ - public function setParameters($var) - { - $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\WidgetMarkup\FormAction\ActionParameter::class); - $this->parameters = $arr; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(FormAction::class, \Google\Apps\Chat\V1\WidgetMarkup_FormAction::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction/ActionParameter.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction/ActionParameter.php deleted file mode 100644 index 4cdc947613a1..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/FormAction/ActionParameter.php +++ /dev/null @@ -1,107 +0,0 @@ -google.chat.v1.WidgetMarkup.FormAction.ActionParameter - */ -class ActionParameter extends \Google\Protobuf\Internal\Message -{ - /** - * The name of the parameter for the action script. - * - * Generated from protobuf field string key = 1; - */ - protected $key = ''; - /** - * The value of the parameter. - * - * Generated from protobuf field string value = 2; - */ - protected $value = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $key - * The name of the parameter for the action script. - * @type string $value - * The value of the parameter. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); - parent::__construct($data); - } - - /** - * The name of the parameter for the action script. - * - * Generated from protobuf field string key = 1; - * @return string - */ - public function getKey() - { - return $this->key; - } - - /** - * The name of the parameter for the action script. - * - * Generated from protobuf field string key = 1; - * @param string $var - * @return $this - */ - public function setKey($var) - { - GPBUtil::checkString($var, True); - $this->key = $var; - - return $this; - } - - /** - * The value of the parameter. - * - * Generated from protobuf field string value = 2; - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * The value of the parameter. - * - * Generated from protobuf field string value = 2; - * @param string $var - * @return $this - */ - public function setValue($var) - { - GPBUtil::checkString($var, True); - $this->value = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ActionParameter::class, \Google\Apps\Chat\V1\WidgetMarkup_FormAction_ActionParameter::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Icon.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Icon.php deleted file mode 100644 index a94f6e4fad34..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Icon.php +++ /dev/null @@ -1,198 +0,0 @@ -google.chat.v1.WidgetMarkup.Icon - */ -class Icon -{ - /** - * Generated from protobuf enum ICON_UNSPECIFIED = 0; - */ - const ICON_UNSPECIFIED = 0; - /** - * Generated from protobuf enum AIRPLANE = 1; - */ - const AIRPLANE = 1; - /** - * Generated from protobuf enum BOOKMARK = 26; - */ - const BOOKMARK = 26; - /** - * Generated from protobuf enum BUS = 25; - */ - const BUS = 25; - /** - * Generated from protobuf enum CAR = 9; - */ - const CAR = 9; - /** - * Generated from protobuf enum CLOCK = 2; - */ - const CLOCK = 2; - /** - * Generated from protobuf enum CONFIRMATION_NUMBER_ICON = 12; - */ - const CONFIRMATION_NUMBER_ICON = 12; - /** - * Generated from protobuf enum DOLLAR = 14; - */ - const DOLLAR = 14; - /** - * Generated from protobuf enum DESCRIPTION = 27; - */ - const DESCRIPTION = 27; - /** - * Generated from protobuf enum EMAIL = 10; - */ - const EMAIL = 10; - /** - * Generated from protobuf enum EVENT_PERFORMER = 20; - */ - const EVENT_PERFORMER = 20; - /** - * Generated from protobuf enum EVENT_SEAT = 21; - */ - const EVENT_SEAT = 21; - /** - * Generated from protobuf enum FLIGHT_ARRIVAL = 16; - */ - const FLIGHT_ARRIVAL = 16; - /** - * Generated from protobuf enum FLIGHT_DEPARTURE = 15; - */ - const FLIGHT_DEPARTURE = 15; - /** - * Generated from protobuf enum HOTEL = 6; - */ - const HOTEL = 6; - /** - * Generated from protobuf enum HOTEL_ROOM_TYPE = 17; - */ - const HOTEL_ROOM_TYPE = 17; - /** - * Generated from protobuf enum INVITE = 19; - */ - const INVITE = 19; - /** - * Generated from protobuf enum MAP_PIN = 3; - */ - const MAP_PIN = 3; - /** - * Generated from protobuf enum MEMBERSHIP = 24; - */ - const MEMBERSHIP = 24; - /** - * Generated from protobuf enum MULTIPLE_PEOPLE = 18; - */ - const MULTIPLE_PEOPLE = 18; - /** - * Generated from protobuf enum OFFER = 30; - */ - const OFFER = 30; - /** - * Generated from protobuf enum PERSON = 11; - */ - const PERSON = 11; - /** - * Generated from protobuf enum PHONE = 13; - */ - const PHONE = 13; - /** - * Generated from protobuf enum RESTAURANT_ICON = 7; - */ - const RESTAURANT_ICON = 7; - /** - * Generated from protobuf enum SHOPPING_CART = 8; - */ - const SHOPPING_CART = 8; - /** - * Generated from protobuf enum STAR = 5; - */ - const STAR = 5; - /** - * Generated from protobuf enum STORE = 22; - */ - const STORE = 22; - /** - * Generated from protobuf enum TICKET = 4; - */ - const TICKET = 4; - /** - * Generated from protobuf enum TRAIN = 23; - */ - const TRAIN = 23; - /** - * Generated from protobuf enum VIDEO_CAMERA = 28; - */ - const VIDEO_CAMERA = 28; - /** - * Generated from protobuf enum VIDEO_PLAY = 29; - */ - const VIDEO_PLAY = 29; - - private static $valueToName = [ - self::ICON_UNSPECIFIED => 'ICON_UNSPECIFIED', - self::AIRPLANE => 'AIRPLANE', - self::BOOKMARK => 'BOOKMARK', - self::BUS => 'BUS', - self::CAR => 'CAR', - self::CLOCK => 'CLOCK', - self::CONFIRMATION_NUMBER_ICON => 'CONFIRMATION_NUMBER_ICON', - self::DOLLAR => 'DOLLAR', - self::DESCRIPTION => 'DESCRIPTION', - self::EMAIL => 'EMAIL', - self::EVENT_PERFORMER => 'EVENT_PERFORMER', - self::EVENT_SEAT => 'EVENT_SEAT', - self::FLIGHT_ARRIVAL => 'FLIGHT_ARRIVAL', - self::FLIGHT_DEPARTURE => 'FLIGHT_DEPARTURE', - self::HOTEL => 'HOTEL', - self::HOTEL_ROOM_TYPE => 'HOTEL_ROOM_TYPE', - self::INVITE => 'INVITE', - self::MAP_PIN => 'MAP_PIN', - self::MEMBERSHIP => 'MEMBERSHIP', - self::MULTIPLE_PEOPLE => 'MULTIPLE_PEOPLE', - self::OFFER => 'OFFER', - self::PERSON => 'PERSON', - self::PHONE => 'PHONE', - self::RESTAURANT_ICON => 'RESTAURANT_ICON', - self::SHOPPING_CART => 'SHOPPING_CART', - self::STAR => 'STAR', - self::STORE => 'STORE', - self::TICKET => 'TICKET', - self::TRAIN => 'TRAIN', - self::VIDEO_CAMERA => 'VIDEO_CAMERA', - self::VIDEO_PLAY => 'VIDEO_PLAY', - ]; - - 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); - } -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Icon::class, \Google\Apps\Chat\V1\WidgetMarkup_Icon::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Image.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Image.php deleted file mode 100644 index 3b95b7a6536b..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/Image.php +++ /dev/null @@ -1,160 +0,0 @@ -google.chat.v1.WidgetMarkup.Image - */ -class Image extends \Google\Protobuf\Internal\Message -{ - /** - * The URL of the image. - * - * Generated from protobuf field string image_url = 1; - */ - protected $image_url = ''; - /** - * The `onclick` action. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; - */ - protected $on_click = null; - /** - * The aspect ratio of this image (width and height). This field lets you - * reserve the right height for the image while waiting for it to load. - * It's not meant to override the built-in aspect ratio of the image. - * If unset, the server fills it by prefetching the image. - * - * Generated from protobuf field double aspect_ratio = 3; - */ - protected $aspect_ratio = 0.0; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $image_url - * The URL of the image. - * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click - * The `onclick` action. - * @type float $aspect_ratio - * The aspect ratio of this image (width and height). This field lets you - * reserve the right height for the image while waiting for it to load. - * It's not meant to override the built-in aspect ratio of the image. - * If unset, the server fills it by prefetching the image. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); - parent::__construct($data); - } - - /** - * The URL of the image. - * - * Generated from protobuf field string image_url = 1; - * @return string - */ - public function getImageUrl() - { - return $this->image_url; - } - - /** - * The URL of the image. - * - * Generated from protobuf field string image_url = 1; - * @param string $var - * @return $this - */ - public function setImageUrl($var) - { - GPBUtil::checkString($var, True); - $this->image_url = $var; - - return $this; - } - - /** - * The `onclick` action. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; - * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null - */ - public function getOnClick() - { - return $this->on_click; - } - - public function hasOnClick() - { - return isset($this->on_click); - } - - public function clearOnClick() - { - unset($this->on_click); - } - - /** - * The `onclick` action. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; - * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var - * @return $this - */ - public function setOnClick($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); - $this->on_click = $var; - - return $this; - } - - /** - * The aspect ratio of this image (width and height). This field lets you - * reserve the right height for the image while waiting for it to load. - * It's not meant to override the built-in aspect ratio of the image. - * If unset, the server fills it by prefetching the image. - * - * Generated from protobuf field double aspect_ratio = 3; - * @return float - */ - public function getAspectRatio() - { - return $this->aspect_ratio; - } - - /** - * The aspect ratio of this image (width and height). This field lets you - * reserve the right height for the image while waiting for it to load. - * It's not meant to override the built-in aspect ratio of the image. - * If unset, the server fills it by prefetching the image. - * - * Generated from protobuf field double aspect_ratio = 3; - * @param float $var - * @return $this - */ - public function setAspectRatio($var) - { - GPBUtil::checkDouble($var); - $this->aspect_ratio = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(Image::class, \Google\Apps\Chat\V1\WidgetMarkup_Image::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/ImageButton.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/ImageButton.php deleted file mode 100644 index e226db38d7ac..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/ImageButton.php +++ /dev/null @@ -1,196 +0,0 @@ -google.chat.v1.WidgetMarkup.ImageButton - */ -class ImageButton extends \Google\Protobuf\Internal\Message -{ - /** - * The `onclick` action. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; - */ - protected $on_click = null; - /** - * The name of this `image_button` that's used for accessibility. - * Default value is provided if this name isn't specified. - * - * Generated from protobuf field string name = 4; - */ - protected $name = ''; - protected $icons; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $icon - * The icon specified by an `enum` that indices to an icon provided by - * Chat API. - * @type string $icon_url - * The icon specified by a URL. - * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click - * The `onclick` action. - * @type string $name - * The name of this `image_button` that's used for accessibility. - * Default value is provided if this name isn't specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); - parent::__construct($data); - } - - /** - * The icon specified by an `enum` that indices to an icon provided by - * Chat API. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.Icon icon = 1; - * @return int - */ - public function getIcon() - { - return $this->readOneof(1); - } - - public function hasIcon() - { - return $this->hasOneof(1); - } - - /** - * The icon specified by an `enum` that indices to an icon provided by - * Chat API. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.Icon icon = 1; - * @param int $var - * @return $this - */ - public function setIcon($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\WidgetMarkup\Icon::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The icon specified by a URL. - * - * Generated from protobuf field string icon_url = 3; - * @return string - */ - public function getIconUrl() - { - return $this->readOneof(3); - } - - public function hasIconUrl() - { - return $this->hasOneof(3); - } - - /** - * The icon specified by a URL. - * - * Generated from protobuf field string icon_url = 3; - * @param string $var - * @return $this - */ - public function setIconUrl($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(3, $var); - - return $this; - } - - /** - * The `onclick` action. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; - * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null - */ - public function getOnClick() - { - return $this->on_click; - } - - public function hasOnClick() - { - return isset($this->on_click); - } - - public function clearOnClick() - { - unset($this->on_click); - } - - /** - * The `onclick` action. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; - * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var - * @return $this - */ - public function setOnClick($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); - $this->on_click = $var; - - return $this; - } - - /** - * The name of this `image_button` that's used for accessibility. - * Default value is provided if this name isn't specified. - * - * Generated from protobuf field string name = 4; - * @return string - */ - public function getName() - { - return $this->name; - } - - /** - * The name of this `image_button` that's used for accessibility. - * Default value is provided if this name isn't specified. - * - * Generated from protobuf field string name = 4; - * @param string $var - * @return $this - */ - public function setName($var) - { - GPBUtil::checkString($var, True); - $this->name = $var; - - return $this; - } - - /** - * @return string - */ - public function getIcons() - { - return $this->whichOneof("icons"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(ImageButton::class, \Google\Apps\Chat\V1\WidgetMarkup_ImageButton::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/KeyValue.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/KeyValue.php deleted file mode 100644 index a4a0a65819b7..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/KeyValue.php +++ /dev/null @@ -1,425 +0,0 @@ -google.chat.v1.WidgetMarkup.KeyValue - */ -class KeyValue extends \Google\Protobuf\Internal\Message -{ - /** - * The text of the top label. Formatted text supported. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string top_label = 3; - */ - protected $top_label = ''; - /** - * The text of the content. Formatted text supported and always required. - * For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string content = 4; - */ - protected $content = ''; - /** - * If the content should be multiline. - * - * Generated from protobuf field bool content_multiline = 9; - */ - protected $content_multiline = false; - /** - * The text of the bottom label. Formatted text supported. For more - * information about formatting text, see [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string bottom_label = 5; - */ - protected $bottom_label = ''; - /** - * The `onclick` action. Only the top label, bottom label, and content - * region are clickable. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 6; - */ - protected $on_click = null; - protected $icons; - protected $control; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type int $icon - * An enum value that's replaced by the Chat API with the - * corresponding icon image. - * @type string $icon_url - * The icon specified by a URL. - * @type string $top_label - * The text of the top label. Formatted text supported. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * @type string $content - * The text of the content. Formatted text supported and always required. - * For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * @type bool $content_multiline - * If the content should be multiline. - * @type string $bottom_label - * The text of the bottom label. Formatted text supported. For more - * information about formatting text, see [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click - * The `onclick` action. Only the top label, bottom label, and content - * region are clickable. - * @type \Google\Apps\Chat\V1\WidgetMarkup\Button $button - * A button that can be clicked to trigger an action. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); - parent::__construct($data); - } - - /** - * An enum value that's replaced by the Chat API with the - * corresponding icon image. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.Icon icon = 1; - * @return int - */ - public function getIcon() - { - return $this->readOneof(1); - } - - public function hasIcon() - { - return $this->hasOneof(1); - } - - /** - * An enum value that's replaced by the Chat API with the - * corresponding icon image. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.Icon icon = 1; - * @param int $var - * @return $this - */ - public function setIcon($var) - { - GPBUtil::checkEnum($var, \Google\Apps\Chat\V1\WidgetMarkup\Icon::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * The icon specified by a URL. - * - * Generated from protobuf field string icon_url = 2; - * @return string - */ - public function getIconUrl() - { - return $this->readOneof(2); - } - - public function hasIconUrl() - { - return $this->hasOneof(2); - } - - /** - * The icon specified by a URL. - * - * Generated from protobuf field string icon_url = 2; - * @param string $var - * @return $this - */ - public function setIconUrl($var) - { - GPBUtil::checkString($var, True); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * The text of the top label. Formatted text supported. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string top_label = 3; - * @return string - */ - public function getTopLabel() - { - return $this->top_label; - } - - /** - * The text of the top label. Formatted text supported. For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string top_label = 3; - * @param string $var - * @return $this - */ - public function setTopLabel($var) - { - GPBUtil::checkString($var, True); - $this->top_label = $var; - - return $this; - } - - /** - * The text of the content. Formatted text supported and always required. - * For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string content = 4; - * @return string - */ - public function getContent() - { - return $this->content; - } - - /** - * The text of the content. Formatted text supported and always required. - * For more information - * about formatting text, see - * [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string content = 4; - * @param string $var - * @return $this - */ - public function setContent($var) - { - GPBUtil::checkString($var, True); - $this->content = $var; - - return $this; - } - - /** - * If the content should be multiline. - * - * Generated from protobuf field bool content_multiline = 9; - * @return bool - */ - public function getContentMultiline() - { - return $this->content_multiline; - } - - /** - * If the content should be multiline. - * - * Generated from protobuf field bool content_multiline = 9; - * @param bool $var - * @return $this - */ - public function setContentMultiline($var) - { - GPBUtil::checkBool($var); - $this->content_multiline = $var; - - return $this; - } - - /** - * The text of the bottom label. Formatted text supported. For more - * information about formatting text, see [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string bottom_label = 5; - * @return string - */ - public function getBottomLabel() - { - return $this->bottom_label; - } - - /** - * The text of the bottom label. Formatted text supported. For more - * information about formatting text, see [Formatting text in Google Chat - * apps](https://developers.google.com/workspace/chat/format-messages#card-formatting) - * and - * [Formatting - * text in Google Workspace - * Add-ons](https://developers.google.com/apps-script/add-ons/concepts/widgets#text_formatting). - * - * Generated from protobuf field string bottom_label = 5; - * @param string $var - * @return $this - */ - public function setBottomLabel($var) - { - GPBUtil::checkString($var, True); - $this->bottom_label = $var; - - return $this; - } - - /** - * The `onclick` action. Only the top label, bottom label, and content - * region are clickable. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 6; - * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null - */ - public function getOnClick() - { - return $this->on_click; - } - - public function hasOnClick() - { - return isset($this->on_click); - } - - public function clearOnClick() - { - unset($this->on_click); - } - - /** - * The `onclick` action. Only the top label, bottom label, and content - * region are clickable. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 6; - * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var - * @return $this - */ - public function setOnClick($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); - $this->on_click = $var; - - return $this; - } - - /** - * A button that can be clicked to trigger an action. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.Button button = 7; - * @return \Google\Apps\Chat\V1\WidgetMarkup\Button|null - */ - public function getButton() - { - return $this->readOneof(7); - } - - public function hasButton() - { - return $this->hasOneof(7); - } - - /** - * A button that can be clicked to trigger an action. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.Button button = 7; - * @param \Google\Apps\Chat\V1\WidgetMarkup\Button $var - * @return $this - */ - public function setButton($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\Button::class); - $this->writeOneof(7, $var); - - return $this; - } - - /** - * @return string - */ - public function getIcons() - { - return $this->whichOneof("icons"); - } - - /** - * @return string - */ - public function getControl() - { - return $this->whichOneof("control"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(KeyValue::class, \Google\Apps\Chat\V1\WidgetMarkup_KeyValue::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OnClick.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OnClick.php deleted file mode 100644 index ec79f009d308..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OnClick.php +++ /dev/null @@ -1,111 +0,0 @@ -google.chat.v1.WidgetMarkup.OnClick - */ -class OnClick extends \Google\Protobuf\Internal\Message -{ - protected $data; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type \Google\Apps\Chat\V1\WidgetMarkup\FormAction $action - * A form action is triggered by this `onclick` action if specified. - * @type \Google\Apps\Chat\V1\WidgetMarkup\OpenLink $open_link - * This `onclick` action triggers an open link action if specified. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); - parent::__construct($data); - } - - /** - * A form action is triggered by this `onclick` action if specified. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.FormAction action = 1; - * @return \Google\Apps\Chat\V1\WidgetMarkup\FormAction|null - */ - public function getAction() - { - return $this->readOneof(1); - } - - public function hasAction() - { - return $this->hasOneof(1); - } - - /** - * A form action is triggered by this `onclick` action if specified. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.FormAction action = 1; - * @param \Google\Apps\Chat\V1\WidgetMarkup\FormAction $var - * @return $this - */ - public function setAction($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\FormAction::class); - $this->writeOneof(1, $var); - - return $this; - } - - /** - * This `onclick` action triggers an open link action if specified. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OpenLink open_link = 2; - * @return \Google\Apps\Chat\V1\WidgetMarkup\OpenLink|null - */ - public function getOpenLink() - { - return $this->readOneof(2); - } - - public function hasOpenLink() - { - return $this->hasOneof(2); - } - - /** - * This `onclick` action triggers an open link action if specified. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OpenLink open_link = 2; - * @param \Google\Apps\Chat\V1\WidgetMarkup\OpenLink $var - * @return $this - */ - public function setOpenLink($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OpenLink::class); - $this->writeOneof(2, $var); - - return $this; - } - - /** - * @return string - */ - public function getData() - { - return $this->whichOneof("data"); - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OnClick::class, \Google\Apps\Chat\V1\WidgetMarkup_OnClick::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OpenLink.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OpenLink.php deleted file mode 100644 index a182dc013a6f..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/OpenLink.php +++ /dev/null @@ -1,70 +0,0 @@ -google.chat.v1.WidgetMarkup.OpenLink - */ -class OpenLink extends \Google\Protobuf\Internal\Message -{ - /** - * The URL to open. - * - * Generated from protobuf field string url = 1; - */ - protected $url = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $url - * The URL to open. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); - parent::__construct($data); - } - - /** - * The URL to open. - * - * Generated from protobuf field string url = 1; - * @return string - */ - public function getUrl() - { - return $this->url; - } - - /** - * The URL to open. - * - * Generated from protobuf field string url = 1; - * @param string $var - * @return $this - */ - public function setUrl($var) - { - GPBUtil::checkString($var, True); - $this->url = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(OpenLink::class, \Google\Apps\Chat\V1\WidgetMarkup_OpenLink::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextButton.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextButton.php deleted file mode 100644 index 91a4806ad5f7..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextButton.php +++ /dev/null @@ -1,114 +0,0 @@ -google.chat.v1.WidgetMarkup.TextButton - */ -class TextButton extends \Google\Protobuf\Internal\Message -{ - /** - * The text of the button. - * - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - /** - * The `onclick` action of the button. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; - */ - protected $on_click = null; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * The text of the button. - * @type \Google\Apps\Chat\V1\WidgetMarkup\OnClick $on_click - * The `onclick` action of the button. - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); - parent::__construct($data); - } - - /** - * The text of the button. - * - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * The text of the button. - * - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - - /** - * The `onclick` action of the button. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; - * @return \Google\Apps\Chat\V1\WidgetMarkup\OnClick|null - */ - public function getOnClick() - { - return $this->on_click; - } - - public function hasOnClick() - { - return isset($this->on_click); - } - - public function clearOnClick() - { - unset($this->on_click); - } - - /** - * The `onclick` action of the button. - * - * Generated from protobuf field .google.chat.v1.WidgetMarkup.OnClick on_click = 2; - * @param \Google\Apps\Chat\V1\WidgetMarkup\OnClick $var - * @return $this - */ - public function setOnClick($var) - { - GPBUtil::checkMessage($var, \Google\Apps\Chat\V1\WidgetMarkup\OnClick::class); - $this->on_click = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TextButton::class, \Google\Apps\Chat\V1\WidgetMarkup_TextButton::class); - diff --git a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextParagraph.php b/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextParagraph.php deleted file mode 100644 index 624c786b7b9d..000000000000 --- a/owl-bot-staging/AppsChat/v1/proto/src/Google/Apps/Chat/V1/WidgetMarkup/TextParagraph.php +++ /dev/null @@ -1,70 +0,0 @@ -google.chat.v1.WidgetMarkup.TextParagraph - */ -class TextParagraph extends \Google\Protobuf\Internal\Message -{ - /** - * Generated from protobuf field string text = 1; - */ - protected $text = ''; - - /** - * Constructor. - * - * @param array $data { - * Optional. Data for populating the Message object. - * - * @type string $text - * } - */ - public function __construct($data = NULL) { - \GPBMetadata\Google\Chat\V1\Widgets::initOnce(); - parent::__construct($data); - } - - /** - * Generated from protobuf field string text = 1; - * @return string - */ - public function getText() - { - return $this->text; - } - - /** - * Generated from protobuf field string text = 1; - * @param string $var - * @return $this - */ - public function setText($var) - { - GPBUtil::checkString($var, True); - $this->text = $var; - - return $this; - } - -} - -// Adding a class alias for backwards compatibility with the previous class name. -class_alias(TextParagraph::class, \Google\Apps\Chat\V1\WidgetMarkup_TextParagraph::class); - diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/complete_import_space.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/complete_import_space.php deleted file mode 100644 index 3a70907c0c48..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/complete_import_space.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var CompleteImportSpaceResponse $response */ - $response = $chatServiceClient->completeImportSpace($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 = ChatServiceClient::spaceName('[SPACE]'); - - complete_import_space_sample($formattedName); -} -// [END chat_v1_generated_ChatService_CompleteImportSpace_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_membership.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_membership.php deleted file mode 100644 index 00c98fef72c7..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_membership.php +++ /dev/null @@ -1,94 +0,0 @@ -setParent($formattedParent) - ->setMembership($membership); - - // Call the API and handle any network failures. - try { - /** @var Membership $response */ - $response = $chatServiceClient->createMembership($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 = ChatServiceClient::spaceName('[SPACE]'); - - create_membership_sample($formattedParent); -} -// [END chat_v1_generated_ChatService_CreateMembership_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_message.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_message.php deleted file mode 100644 index d25de7b6334b..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_message.php +++ /dev/null @@ -1,98 +0,0 @@ -setParent($formattedParent) - ->setMessage($message); - - // Call the API and handle any network failures. - try { - /** @var Message $response */ - $response = $chatServiceClient->createMessage($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 = ChatServiceClient::spaceName('[SPACE]'); - - create_message_sample($formattedParent); -} -// [END chat_v1_generated_ChatService_CreateMessage_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_reaction.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_reaction.php deleted file mode 100644 index 708a409cecff..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_reaction.php +++ /dev/null @@ -1,80 +0,0 @@ -setParent($formattedParent) - ->setReaction($reaction); - - // Call the API and handle any network failures. - try { - /** @var Reaction $response */ - $response = $chatServiceClient->createReaction($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 = ChatServiceClient::messageName('[SPACE]', '[MESSAGE]'); - - create_reaction_sample($formattedParent); -} -// [END chat_v1_generated_ChatService_CreateReaction_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_space.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_space.php deleted file mode 100644 index c331bbca54b9..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/create_space.php +++ /dev/null @@ -1,73 +0,0 @@ -setSpace($space); - - // Call the API and handle any network failures. - try { - /** @var Space $response */ - $response = $chatServiceClient->createSpace($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END chat_v1_generated_ChatService_CreateSpace_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_membership.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_membership.php deleted file mode 100644 index cb6d26d75502..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_membership.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Membership $response */ - $response = $chatServiceClient->deleteMembership($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 = ChatServiceClient::membershipName('[SPACE]', '[MEMBER]'); - - delete_membership_sample($formattedName); -} -// [END chat_v1_generated_ChatService_DeleteMembership_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_message.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_message.php deleted file mode 100644 index 4cba6f6cda36..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_message.php +++ /dev/null @@ -1,88 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $chatServiceClient->deleteMessage($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 = ChatServiceClient::messageName('[SPACE]', '[MESSAGE]'); - - delete_message_sample($formattedName); -} -// [END chat_v1_generated_ChatService_DeleteMessage_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_reaction.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_reaction.php deleted file mode 100644 index ff8e837d34a5..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_reaction.php +++ /dev/null @@ -1,76 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $chatServiceClient->deleteReaction($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 = ChatServiceClient::reactionName('[SPACE]', '[MESSAGE]', '[REACTION]'); - - delete_reaction_sample($formattedName); -} -// [END chat_v1_generated_ChatService_DeleteReaction_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_space.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_space.php deleted file mode 100644 index d5cb8b8e282c..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/delete_space.php +++ /dev/null @@ -1,78 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - $chatServiceClient->deleteSpace($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 = ChatServiceClient::spaceName('[SPACE]'); - - delete_space_sample($formattedName); -} -// [END chat_v1_generated_ChatService_DeleteSpace_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/find_direct_message.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/find_direct_message.php deleted file mode 100644 index db4dd111f3d3..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/find_direct_message.php +++ /dev/null @@ -1,100 +0,0 @@ -setName($name); - - // Call the API and handle any network failures. - try { - /** @var Space $response */ - $response = $chatServiceClient->findDirectMessage($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 -{ - $name = '[NAME]'; - - find_direct_message_sample($name); -} -// [END chat_v1_generated_ChatService_FindDirectMessage_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_attachment.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_attachment.php deleted file mode 100644 index 737520a133b9..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_attachment.php +++ /dev/null @@ -1,79 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Attachment $response */ - $response = $chatServiceClient->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 = ChatServiceClient::attachmentName('[SPACE]', '[MESSAGE]', '[ATTACHMENT]'); - - get_attachment_sample($formattedName); -} -// [END chat_v1_generated_ChatService_GetAttachment_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_membership.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_membership.php deleted file mode 100644 index 2264921471c0..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_membership.php +++ /dev/null @@ -1,93 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Membership $response */ - $response = $chatServiceClient->getMembership($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 = ChatServiceClient::membershipName('[SPACE]', '[MEMBER]'); - - get_membership_sample($formattedName); -} -// [END chat_v1_generated_ChatService_GetMembership_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_message.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_message.php deleted file mode 100644 index b37e14eb6ae3..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_message.php +++ /dev/null @@ -1,90 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Message $response */ - $response = $chatServiceClient->getMessage($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 = ChatServiceClient::messageName('[SPACE]', '[MESSAGE]'); - - get_message_sample($formattedName); -} -// [END chat_v1_generated_ChatService_GetMessage_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space.php deleted file mode 100644 index 58a222f3b3c2..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space.php +++ /dev/null @@ -1,83 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var Space $response */ - $response = $chatServiceClient->getSpace($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 = ChatServiceClient::spaceName('[SPACE]'); - - get_space_sample($formattedName); -} -// [END chat_v1_generated_ChatService_GetSpace_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_event.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_event.php deleted file mode 100644 index 562dacb82ecc..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_event.php +++ /dev/null @@ -1,89 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SpaceEvent $response */ - $response = $chatServiceClient->getSpaceEvent($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 = ChatServiceClient::spaceEventName('[SPACE]', '[SPACE_EVENT]'); - - get_space_event_sample($formattedName); -} -// [END chat_v1_generated_ChatService_GetSpaceEvent_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_read_state.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_read_state.php deleted file mode 100644 index cde139fdc673..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_space_read_state.php +++ /dev/null @@ -1,91 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var SpaceReadState $response */ - $response = $chatServiceClient->getSpaceReadState($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 = ChatServiceClient::spaceReadStateName('[USER]', '[SPACE]'); - - get_space_read_state_sample($formattedName); -} -// [END chat_v1_generated_ChatService_GetSpaceReadState_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_thread_read_state.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_thread_read_state.php deleted file mode 100644 index c568ce84afa8..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/get_thread_read_state.php +++ /dev/null @@ -1,92 +0,0 @@ -setName($formattedName); - - // Call the API and handle any network failures. - try { - /** @var ThreadReadState $response */ - $response = $chatServiceClient->getThreadReadState($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 = ChatServiceClient::threadReadStateName('[USER]', '[SPACE]', '[THREAD]'); - - get_thread_read_state_sample($formattedName); -} -// [END chat_v1_generated_ChatService_GetThreadReadState_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_memberships.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_memberships.php deleted file mode 100644 index 2b1320f8efb4..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_memberships.php +++ /dev/null @@ -1,97 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $chatServiceClient->listMemberships($request); - - /** @var Membership $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 = ChatServiceClient::spaceName('[SPACE]'); - - list_memberships_sample($formattedParent); -} -// [END chat_v1_generated_ChatService_ListMemberships_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_messages.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_messages.php deleted file mode 100644 index 5755838d98d7..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_messages.php +++ /dev/null @@ -1,86 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $chatServiceClient->listMessages($request); - - /** @var Message $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 = ChatServiceClient::spaceName('[SPACE]'); - - list_messages_sample($formattedParent); -} -// [END chat_v1_generated_ChatService_ListMessages_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_reactions.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_reactions.php deleted file mode 100644 index 316b53751c4d..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_reactions.php +++ /dev/null @@ -1,82 +0,0 @@ -setParent($formattedParent); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $chatServiceClient->listReactions($request); - - /** @var Reaction $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 = ChatServiceClient::messageName('[SPACE]', '[MESSAGE]'); - - list_reactions_sample($formattedParent); -} -// [END chat_v1_generated_ChatService_ListReactions_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_space_events.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_space_events.php deleted file mode 100644 index 6998213ce1c4..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_space_events.php +++ /dev/null @@ -1,147 +0,0 @@ -setParent($formattedParent) - ->setFilter($filter); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $chatServiceClient->listSpaceEvents($request); - - /** @var SpaceEvent $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 = ChatServiceClient::spaceName('[SPACE]'); - $filter = '[FILTER]'; - - list_space_events_sample($formattedParent, $filter); -} -// [END chat_v1_generated_ChatService_ListSpaceEvents_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_spaces.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_spaces.php deleted file mode 100644 index b4ccd291b017..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/list_spaces.php +++ /dev/null @@ -1,80 +0,0 @@ -listSpaces($request); - - /** @var Space $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 chat_v1_generated_ChatService_ListSpaces_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/search_spaces.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/search_spaces.php deleted file mode 100644 index fd7b8279f999..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/search_spaces.php +++ /dev/null @@ -1,146 +0,0 @@ -`, `<=`, `>=`. - * - * `customer` is required and is used to indicate which customer - * to fetch spaces from. `customers/my_customer` is the only supported value. - * - * `display_name` only accepts the `HAS` (`:`) operator. The text to - * match is first tokenized into tokens and each token is prefix-matched - * case-insensitively and independently as a substring anywhere in the space's - * `display_name`. For example, `Fun Eve` matches `Fun event` or `The - * evening was fun`, but not `notFun event` or `even`. - * - * `external_user_allowed` accepts either `true` or `false`. - * - * `space_history_state` only accepts values from the [`historyState`] - * (https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces#Space.HistoryState) - * field of a `space` resource. - * - * `space_type` is required and the only valid value is `SPACE`. - * - * Across different fields, only `AND` operators are supported. A valid - * example is `space_type = "SPACE" AND display_name:"Hello"` and an invalid - * example is `space_type = "SPACE" OR display_name:"Hello"`. - * - * Among the same field, - * `space_type` doesn't support `AND` or `OR` operators. - * `display_name`, 'space_history_state', and 'external_user_allowed' only - * support `OR` operators. - * `last_active_time` and `create_time` support both `AND` and `OR` operators. - * `AND` can only be used to represent an interval, such as `last_active_time - * < "2022-01-01T00:00:00+00:00" AND last_active_time > - * "2023-01-01T00:00:00+00:00"`. - * - * The following example queries are valid: - * - * ``` - * customer = "customers/my_customer" AND space_type = "SPACE" - * - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * display_name:"Hello World" - * - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (last_active_time < "2020-01-01T00:00:00+00:00" OR last_active_time > - * "2022-01-01T00:00:00+00:00") - * - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (display_name:"Hello World" OR display_name:"Fun event") AND - * (last_active_time > "2020-01-01T00:00:00+00:00" AND last_active_time < - * "2022-01-01T00:00:00+00:00") - * - * customer = "customers/my_customer" AND space_type = "SPACE" AND - * (create_time > "2019-01-01T00:00:00+00:00" AND create_time < - * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND - * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") - * ``` - */ -function search_spaces_sample(string $query): void -{ - // Create a client. - $chatServiceClient = new ChatServiceClient(); - - // Prepare the request message. - $request = (new SearchSpacesRequest()) - ->setQuery($query); - - // Call the API and handle any network failures. - try { - /** @var PagedListResponse $response */ - $response = $chatServiceClient->searchSpaces($request); - - /** @var Space $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 -{ - $query = '[QUERY]'; - - search_spaces_sample($query); -} -// [END chat_v1_generated_ChatService_SearchSpaces_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/set_up_space.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/set_up_space.php deleted file mode 100644 index 8aa0bb6cec83..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/set_up_space.php +++ /dev/null @@ -1,110 +0,0 @@ -setSpace($space); - - // Call the API and handle any network failures. - try { - /** @var Space $response */ - $response = $chatServiceClient->setUpSpace($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END chat_v1_generated_ChatService_SetUpSpace_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_membership.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_membership.php deleted file mode 100644 index 387555dc4ec3..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_membership.php +++ /dev/null @@ -1,66 +0,0 @@ -setMembership($membership) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var Membership $response */ - $response = $chatServiceClient->updateMembership($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END chat_v1_generated_ChatService_UpdateMembership_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_message.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_message.php deleted file mode 100644 index 1f748c1d8a50..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_message.php +++ /dev/null @@ -1,74 +0,0 @@ -setMessage($message); - - // Call the API and handle any network failures. - try { - /** @var Message $response */ - $response = $chatServiceClient->updateMessage($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END chat_v1_generated_ChatService_UpdateMessage_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space.php deleted file mode 100644 index a50b3fcfbeff..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space.php +++ /dev/null @@ -1,68 +0,0 @@ -setSpace($space); - - // Call the API and handle any network failures. - try { - /** @var Space $response */ - $response = $chatServiceClient->updateSpace($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END chat_v1_generated_ChatService_UpdateSpace_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space_read_state.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space_read_state.php deleted file mode 100644 index 3ce3bf8f55dd..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/update_space_read_state.php +++ /dev/null @@ -1,67 +0,0 @@ -setSpaceReadState($spaceReadState) - ->setUpdateMask($updateMask); - - // Call the API and handle any network failures. - try { - /** @var SpaceReadState $response */ - $response = $chatServiceClient->updateSpaceReadState($request); - printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); - } catch (ApiException $ex) { - printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); - } -} -// [END chat_v1_generated_ChatService_UpdateSpaceReadState_sync] diff --git a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/upload_attachment.php b/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/upload_attachment.php deleted file mode 100644 index 5312833b0722..000000000000 --- a/owl-bot-staging/AppsChat/v1/samples/V1/ChatServiceClient/upload_attachment.php +++ /dev/null @@ -1,83 +0,0 @@ -setParent($formattedParent) - ->setFilename($filename); - - // Call the API and handle any network failures. - try { - /** @var UploadAttachmentResponse $response */ - $response = $chatServiceClient->uploadAttachment($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 = ChatServiceClient::spaceName('[SPACE]'); - $filename = '[FILENAME]'; - - upload_attachment_sample($formattedParent, $filename); -} -// [END chat_v1_generated_ChatService_UploadAttachment_sync] diff --git a/owl-bot-staging/AppsChat/v1/src/V1/Client/ChatServiceClient.php b/owl-bot-staging/AppsChat/v1/src/V1/Client/ChatServiceClient.php deleted file mode 100644 index 2e3ca506bcbc..000000000000 --- a/owl-bot-staging/AppsChat/v1/src/V1/Client/ChatServiceClient.php +++ /dev/null @@ -1,1551 +0,0 @@ - completeImportSpaceAsync(CompleteImportSpaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface createMembershipAsync(CreateMembershipRequest $request, array $optionalArgs = []) - * @method PromiseInterface createMessageAsync(CreateMessageRequest $request, array $optionalArgs = []) - * @method PromiseInterface createReactionAsync(CreateReactionRequest $request, array $optionalArgs = []) - * @method PromiseInterface createSpaceAsync(CreateSpaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteMembershipAsync(DeleteMembershipRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteMessageAsync(DeleteMessageRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteReactionAsync(DeleteReactionRequest $request, array $optionalArgs = []) - * @method PromiseInterface deleteSpaceAsync(DeleteSpaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface findDirectMessageAsync(FindDirectMessageRequest $request, array $optionalArgs = []) - * @method PromiseInterface getAttachmentAsync(GetAttachmentRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMembershipAsync(GetMembershipRequest $request, array $optionalArgs = []) - * @method PromiseInterface getMessageAsync(GetMessageRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSpaceAsync(GetSpaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSpaceEventAsync(GetSpaceEventRequest $request, array $optionalArgs = []) - * @method PromiseInterface getSpaceReadStateAsync(GetSpaceReadStateRequest $request, array $optionalArgs = []) - * @method PromiseInterface getThreadReadStateAsync(GetThreadReadStateRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMembershipsAsync(ListMembershipsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listMessagesAsync(ListMessagesRequest $request, array $optionalArgs = []) - * @method PromiseInterface listReactionsAsync(ListReactionsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSpaceEventsAsync(ListSpaceEventsRequest $request, array $optionalArgs = []) - * @method PromiseInterface listSpacesAsync(ListSpacesRequest $request, array $optionalArgs = []) - * @method PromiseInterface searchSpacesAsync(SearchSpacesRequest $request, array $optionalArgs = []) - * @method PromiseInterface setUpSpaceAsync(SetUpSpaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateMembershipAsync(UpdateMembershipRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateMessageAsync(UpdateMessageRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSpaceAsync(UpdateSpaceRequest $request, array $optionalArgs = []) - * @method PromiseInterface updateSpaceReadStateAsync(UpdateSpaceReadStateRequest $request, array $optionalArgs = []) - * @method PromiseInterface uploadAttachmentAsync(UploadAttachmentRequest $request, array $optionalArgs = []) - */ -final class ChatServiceClient -{ - use GapicClientTrait; - use ResourceHelperTrait; - - /** The name of the service. */ - private const SERVICE_NAME = 'google.chat.v1.ChatService'; - - /** - * The default address of the service. - * - * @deprecated SERVICE_ADDRESS_TEMPLATE should be used instead. - */ - private const SERVICE_ADDRESS = 'chat.googleapis.com'; - - /** The address template of the service. */ - private const SERVICE_ADDRESS_TEMPLATE = 'chat.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/chat.admin.delete', - 'https://www.googleapis.com/auth/chat.admin.memberships', - 'https://www.googleapis.com/auth/chat.admin.memberships.readonly', - 'https://www.googleapis.com/auth/chat.admin.spaces', - 'https://www.googleapis.com/auth/chat.admin.spaces.readonly', - 'https://www.googleapis.com/auth/chat.bot', - 'https://www.googleapis.com/auth/chat.delete', - 'https://www.googleapis.com/auth/chat.import', - 'https://www.googleapis.com/auth/chat.memberships', - 'https://www.googleapis.com/auth/chat.memberships.app', - 'https://www.googleapis.com/auth/chat.memberships.readonly', - 'https://www.googleapis.com/auth/chat.messages', - 'https://www.googleapis.com/auth/chat.messages.create', - 'https://www.googleapis.com/auth/chat.messages.reactions', - 'https://www.googleapis.com/auth/chat.messages.reactions.create', - 'https://www.googleapis.com/auth/chat.messages.reactions.readonly', - 'https://www.googleapis.com/auth/chat.messages.readonly', - 'https://www.googleapis.com/auth/chat.spaces', - 'https://www.googleapis.com/auth/chat.spaces.create', - 'https://www.googleapis.com/auth/chat.spaces.readonly', - 'https://www.googleapis.com/auth/chat.users.readstate', - 'https://www.googleapis.com/auth/chat.users.readstate.readonly', - ]; - - private static function getClientDefaults() - { - return [ - 'serviceName' => self::SERVICE_NAME, - 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, - 'clientConfig' => __DIR__ . '/../resources/chat_service_client_config.json', - 'descriptorsConfigPath' => __DIR__ . '/../resources/chat_service_descriptor_config.php', - 'gcpApiConfigPath' => __DIR__ . '/../resources/chat_service_grpc_config.json', - 'credentialsConfig' => [ - 'defaultScopes' => self::$serviceScopes, - ], - 'transportConfig' => [ - 'rest' => [ - 'restClientConfigPath' => __DIR__ . '/../resources/chat_service_rest_client_config.php', - ], - ], - ]; - } - - /** - * Formats a string containing the fully-qualified path to represent a attachment - * resource. - * - * @param string $space - * @param string $message - * @param string $attachment - * - * @return string The formatted attachment resource. - */ - public static function attachmentName(string $space, string $message, string $attachment): string - { - return self::getPathTemplate('attachment')->render([ - 'space' => $space, - 'message' => $message, - 'attachment' => $attachment, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a membership - * resource. - * - * @param string $space - * @param string $member - * - * @return string The formatted membership resource. - */ - public static function membershipName(string $space, string $member): string - { - return self::getPathTemplate('membership')->render([ - 'space' => $space, - 'member' => $member, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a message - * resource. - * - * @param string $space - * @param string $message - * - * @return string The formatted message resource. - */ - public static function messageName(string $space, string $message): string - { - return self::getPathTemplate('message')->render([ - 'space' => $space, - 'message' => $message, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * quoted_message_metadata resource. - * - * @param string $space - * @param string $message - * @param string $quotedMessageMetadata - * - * @return string The formatted quoted_message_metadata resource. - */ - public static function quotedMessageMetadataName(string $space, string $message, string $quotedMessageMetadata): string - { - return self::getPathTemplate('quotedMessageMetadata')->render([ - 'space' => $space, - 'message' => $message, - 'quoted_message_metadata' => $quotedMessageMetadata, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a reaction - * resource. - * - * @param string $space - * @param string $message - * @param string $reaction - * - * @return string The formatted reaction resource. - */ - public static function reactionName(string $space, string $message, string $reaction): string - { - return self::getPathTemplate('reaction')->render([ - 'space' => $space, - 'message' => $message, - 'reaction' => $reaction, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a space - * resource. - * - * @param string $space - * - * @return string The formatted space resource. - */ - public static function spaceName(string $space): string - { - return self::getPathTemplate('space')->render([ - 'space' => $space, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a space_event - * resource. - * - * @param string $space - * @param string $spaceEvent - * - * @return string The formatted space_event resource. - */ - public static function spaceEventName(string $space, string $spaceEvent): string - { - return self::getPathTemplate('spaceEvent')->render([ - 'space' => $space, - 'space_event' => $spaceEvent, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * space_read_state resource. - * - * @param string $user - * @param string $space - * - * @return string The formatted space_read_state resource. - */ - public static function spaceReadStateName(string $user, string $space): string - { - return self::getPathTemplate('spaceReadState')->render([ - 'user' => $user, - 'space' => $space, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a thread - * resource. - * - * @param string $space - * @param string $thread - * - * @return string The formatted thread resource. - */ - public static function threadName(string $space, string $thread): string - { - return self::getPathTemplate('thread')->render([ - 'space' => $space, - 'thread' => $thread, - ]); - } - - /** - * Formats a string containing the fully-qualified path to represent a - * thread_read_state resource. - * - * @param string $user - * @param string $space - * @param string $thread - * - * @return string The formatted thread_read_state resource. - */ - public static function threadReadStateName(string $user, string $space, string $thread): string - { - return self::getPathTemplate('threadReadState')->render([ - 'user' => $user, - 'space' => $space, - 'thread' => $thread, - ]); - } - - /** - * 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: spaces/{space}/messages/{message}/attachments/{attachment} - * - membership: spaces/{space}/members/{member} - * - message: spaces/{space}/messages/{message} - * - quotedMessageMetadata: spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata} - * - reaction: spaces/{space}/messages/{message}/reactions/{reaction} - * - space: spaces/{space} - * - spaceEvent: spaces/{space}/spaceEvents/{space_event} - * - spaceReadState: users/{user}/spaces/{space}/spaceReadState - * - thread: spaces/{space}/threads/{thread} - * - threadReadState: users/{user}/spaces/{space}/threads/{thread}/threadReadState - * - * 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 $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 'chat.googleapis.com:443'. - * @type string|array|FetchAuthTokenInterface|CredentialsWrapper $credentials - * The credentials to be used by the client to authorize API calls. This option - * accepts either a path to a credentials file, or a decoded credentials file as a - * PHP array. - * *Advanced usage*: In addition, this option can also accept a pre-constructed - * {@see \Google\Auth\FetchAuthTokenInterface} object or - * {@see \Google\ApiCore\CredentialsWrapper} object. Note that when one of these - * objects are provided, any settings in $credentialsConfig will be ignored. - * @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. - * } - * - * @throws ValidationException - */ - public function __construct(array $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); - } - - /** - * Completes the - * [import process](https://developers.google.com/workspace/chat/import-data) - * for the specified space and makes it visible to users. - * Requires app authentication and domain-wide delegation. For more - * information, see [Authorize Google Chat apps to import - * data](https://developers.google.com/workspace/chat/authorize-import). - * - * The async variant is {@see ChatServiceClient::completeImportSpaceAsync()} . - * - * @example samples/V1/ChatServiceClient/complete_import_space.php - * - * @param CompleteImportSpaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return CompleteImportSpaceResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function completeImportSpace(CompleteImportSpaceRequest $request, array $callOptions = []): CompleteImportSpaceResponse - { - return $this->startApiCall('CompleteImportSpace', $request, $callOptions)->wait(); - } - - /** - * Creates a membership for the calling Chat app, a user, or a Google Group. - * Creating memberships for other Chat apps isn't supported. - * When creating a membership, if the specified member has their auto-accept - * policy turned off, then they're invited, and must accept the space - * invitation before joining. Otherwise, creating a membership adds the member - * directly to the specified space. - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * For example usage, see: - * - * - [Invite or add a user to a - * space](https://developers.google.com/workspace/chat/create-members#create-user-membership). - * - * - [Invite or add a Google Group to a - * space](https://developers.google.com/workspace/chat/create-members#create-group-membership). - * - * - [Add the Chat app to a - * space](https://developers.google.com/workspace/chat/create-members#create-membership-calling-api). - * - * The async variant is {@see ChatServiceClient::createMembershipAsync()} . - * - * @example samples/V1/ChatServiceClient/create_membership.php - * - * @param CreateMembershipRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Membership - * - * @throws ApiException Thrown if the API call fails. - */ - public function createMembership(CreateMembershipRequest $request, array $callOptions = []): Membership - { - return $this->startApiCall('CreateMembership', $request, $callOptions)->wait(); - } - - /** - * Creates a message in a Google Chat space. For an example, see [Send a - * message](https://developers.google.com/workspace/chat/create-messages). - * - * The `create()` method requires either user or app authentication. Chat - * attributes the message sender differently depending on the type of - * authentication that you use in your request. - * - * The following image shows how Chat attributes a message when you use app - * authentication. Chat displays the Chat app as the message - * sender. The content of the message can contain text (`text`), cards - * (`cardsV2`), and accessory widgets (`accessoryWidgets`). - * - * ![Message sent with app - * authentication](https://developers.google.com/workspace/chat/images/message-app-auth.svg) - * - * The following image shows how Chat attributes a message when you use user - * authentication. Chat displays the user as the message sender and attributes - * the Chat app to the message by displaying its name. The content of message - * can only contain text (`text`). - * - * ![Message sent with user - * authentication](https://developers.google.com/workspace/chat/images/message-user-auth.svg) - * - * The maximum message size, including the message contents, is 32,000 bytes. - * - * The async variant is {@see ChatServiceClient::createMessageAsync()} . - * - * @example samples/V1/ChatServiceClient/create_message.php - * - * @param CreateMessageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Message - * - * @throws ApiException Thrown if the API call fails. - */ - public function createMessage(CreateMessageRequest $request, array $callOptions = []): Message - { - return $this->startApiCall('CreateMessage', $request, $callOptions)->wait(); - } - - /** - * Creates a reaction and adds it to a message. Only unicode emojis are - * supported. For an example, see - * [Add a reaction to a - * message](https://developers.google.com/workspace/chat/create-reactions). - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::createReactionAsync()} . - * - * @example samples/V1/ChatServiceClient/create_reaction.php - * - * @param CreateReactionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Reaction - * - * @throws ApiException Thrown if the API call fails. - */ - public function createReaction(CreateReactionRequest $request, array $callOptions = []): Reaction - { - return $this->startApiCall('CreateReaction', $request, $callOptions)->wait(); - } - - /** - * Creates a space with no members. Can be used to create a named space. - * Spaces grouped by topics aren't supported. For an example, see - * [Create a - * space](https://developers.google.com/workspace/chat/create-spaces). - * - * If you receive the error message `ALREADY_EXISTS` when creating - * a space, try a different `displayName`. An existing space within - * the Google Workspace organization might already use this display name. - * - * If you're a member of the [Developer Preview - * program](https://developers.google.com/workspace/preview), you can create a - * group chat in import mode using `spaceType.GROUP_CHAT`. - * - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::createSpaceAsync()} . - * - * @example samples/V1/ChatServiceClient/create_space.php - * - * @param CreateSpaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Space - * - * @throws ApiException Thrown if the API call fails. - */ - public function createSpace(CreateSpaceRequest $request, array $callOptions = []): Space - { - return $this->startApiCall('CreateSpace', $request, $callOptions)->wait(); - } - - /** - * Deletes a membership. For an example, see - * [Remove a user or a Google Chat app from a - * space](https://developers.google.com/workspace/chat/delete-members). - * - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::deleteMembershipAsync()} . - * - * @example samples/V1/ChatServiceClient/delete_membership.php - * - * @param DeleteMembershipRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Membership - * - * @throws ApiException Thrown if the API call fails. - */ - public function deleteMembership(DeleteMembershipRequest $request, array $callOptions = []): Membership - { - return $this->startApiCall('DeleteMembership', $request, $callOptions)->wait(); - } - - /** - * Deletes a message. - * For an example, see [Delete a - * message](https://developers.google.com/workspace/chat/delete-messages). - * - * Requires - * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). - * Supports - * [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * and [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * When using app authentication, requests can only delete messages - * created by the calling Chat app. - * - * The async variant is {@see ChatServiceClient::deleteMessageAsync()} . - * - * @example samples/V1/ChatServiceClient/delete_message.php - * - * @param DeleteMessageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteMessage(DeleteMessageRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteMessage', $request, $callOptions)->wait(); - } - - /** - * Deletes a reaction to a message. Only unicode emojis are supported. - * For an example, see - * [Delete a - * reaction](https://developers.google.com/workspace/chat/delete-reactions). - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::deleteReactionAsync()} . - * - * @example samples/V1/ChatServiceClient/delete_reaction.php - * - * @param DeleteReactionRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteReaction(DeleteReactionRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteReaction', $request, $callOptions)->wait(); - } - - /** - * Deletes a named space. Always performs a cascading delete, which means - * that the space's child resources—like messages posted in the space and - * memberships in the space—are also deleted. For an example, see - * [Delete a - * space](https://developers.google.com/workspace/chat/delete-spaces). - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - * from a user who has permission to delete the space. - * - * The async variant is {@see ChatServiceClient::deleteSpaceAsync()} . - * - * @example samples/V1/ChatServiceClient/delete_space.php - * - * @param DeleteSpaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this 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 deleteSpace(DeleteSpaceRequest $request, array $callOptions = []): void - { - $this->startApiCall('DeleteSpace', $request, $callOptions)->wait(); - } - - /** - * Returns the existing direct message with the specified user. If no direct - * message space is found, returns a `404 NOT_FOUND` error. For an example, - * see - * [Find a direct message](/chat/api/guides/v1/spaces/find-direct-message). - * - * With [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user), - * returns the direct message space between the specified user and the - * authenticated user. - * - * With [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app), - * returns the direct message space between the specified user and the calling - * Chat app. - * - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - * or [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * - * The async variant is {@see ChatServiceClient::findDirectMessageAsync()} . - * - * @example samples/V1/ChatServiceClient/find_direct_message.php - * - * @param FindDirectMessageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Space - * - * @throws ApiException Thrown if the API call fails. - */ - public function findDirectMessage(FindDirectMessageRequest $request, array $callOptions = []): Space - { - return $this->startApiCall('FindDirectMessage', $request, $callOptions)->wait(); - } - - /** - * Gets the metadata of a message attachment. The attachment data is fetched - * using the [media - * API](https://developers.google.com/workspace/chat/api/reference/rest/v1/media/download). - * For an example, see - * [Get metadata about a message - * attachment](https://developers.google.com/workspace/chat/get-media-attachments). - * Requires [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app). - * - * The async variant is {@see ChatServiceClient::getAttachmentAsync()} . - * - * @example samples/V1/ChatServiceClient/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(); - } - - /** - * Returns details about a membership. For an example, see - * [Get details about a user's or Google Chat app's - * membership](https://developers.google.com/workspace/chat/get-members). - * - * Requires - * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). - * Supports - * [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * and [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::getMembershipAsync()} . - * - * @example samples/V1/ChatServiceClient/get_membership.php - * - * @param GetMembershipRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Membership - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMembership(GetMembershipRequest $request, array $callOptions = []): Membership - { - return $this->startApiCall('GetMembership', $request, $callOptions)->wait(); - } - - /** - * Returns details about a message. - * For an example, see [Get details about a - * message](https://developers.google.com/workspace/chat/get-messages). - * - * Requires - * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). - * Supports - * [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * and [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * Note: Might return a message from a blocked member or space. - * - * The async variant is {@see ChatServiceClient::getMessageAsync()} . - * - * @example samples/V1/ChatServiceClient/get_message.php - * - * @param GetMessageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Message - * - * @throws ApiException Thrown if the API call fails. - */ - public function getMessage(GetMessageRequest $request, array $callOptions = []): Message - { - return $this->startApiCall('GetMessage', $request, $callOptions)->wait(); - } - - /** - * Returns details about a space. For an example, see - * [Get details about a - * space](https://developers.google.com/workspace/chat/get-spaces). - * - * Requires - * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). - * Supports - * [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * and [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::getSpaceAsync()} . - * - * @example samples/V1/ChatServiceClient/get_space.php - * - * @param GetSpaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Space - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSpace(GetSpaceRequest $request, array $callOptions = []): Space - { - return $this->startApiCall('GetSpace', $request, $callOptions)->wait(); - } - - /** - * Returns an event from a Google Chat space. The [event - * payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) - * contains the most recent version of the resource that changed. For example, - * if you request an event about a new message but the message was later - * updated, the server returns the updated `Message` resource in the event - * payload. - * - * Note: The `permissionSettings` field is not returned in the Space - * object of the Space event data for this request. - * - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * To get an event, the authenticated user must be a member of the space. - * - * For an example, see [Get details about an - * event from a Google Chat - * space](https://developers.google.com/workspace/chat/get-space-event). - * - * The async variant is {@see ChatServiceClient::getSpaceEventAsync()} . - * - * @example samples/V1/ChatServiceClient/get_space_event.php - * - * @param GetSpaceEventRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SpaceEvent - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSpaceEvent(GetSpaceEventRequest $request, array $callOptions = []): SpaceEvent - { - return $this->startApiCall('GetSpaceEvent', $request, $callOptions)->wait(); - } - - /** - * Returns details about a user's read state within a space, used to identify - * read and unread messages. For an example, see [Get details about a user's - * space read - * state](https://developers.google.com/workspace/chat/get-space-read-state). - * - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::getSpaceReadStateAsync()} . - * - * @example samples/V1/ChatServiceClient/get_space_read_state.php - * - * @param GetSpaceReadStateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SpaceReadState - * - * @throws ApiException Thrown if the API call fails. - */ - public function getSpaceReadState(GetSpaceReadStateRequest $request, array $callOptions = []): SpaceReadState - { - return $this->startApiCall('GetSpaceReadState', $request, $callOptions)->wait(); - } - - /** - * Returns details about a user's read state within a thread, used to identify - * read and unread messages. For an example, see [Get details about a user's - * thread read - * state](https://developers.google.com/workspace/chat/get-thread-read-state). - * - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::getThreadReadStateAsync()} . - * - * @example samples/V1/ChatServiceClient/get_thread_read_state.php - * - * @param GetThreadReadStateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return ThreadReadState - * - * @throws ApiException Thrown if the API call fails. - */ - public function getThreadReadState(GetThreadReadStateRequest $request, array $callOptions = []): ThreadReadState - { - return $this->startApiCall('GetThreadReadState', $request, $callOptions)->wait(); - } - - /** - * Lists memberships in a space. For an example, see [List users and Google - * Chat apps in a - * space](https://developers.google.com/workspace/chat/list-members). Listing - * memberships with [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * lists memberships in spaces that the Chat app has - * access to, but excludes Chat app memberships, - * including its own. Listing memberships with - * [User - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) - * lists memberships in spaces that the authenticated user has access to. - * - * Requires - * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). - * Supports - * [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * and [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::listMembershipsAsync()} . - * - * @example samples/V1/ChatServiceClient/list_memberships.php - * - * @param ListMembershipsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listMemberships(ListMembershipsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMemberships', $request, $callOptions); - } - - /** - * Lists messages in a space that the caller is a member of, including - * messages from blocked members and spaces. If you list messages from a - * space with no messages, the response is an empty object. When using a - * REST/HTTP interface, the response contains an empty JSON object, `{}`. - * For an example, see - * [List - * messages](https://developers.google.com/workspace/chat/api/guides/v1/messages/list). - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::listMessagesAsync()} . - * - * @example samples/V1/ChatServiceClient/list_messages.php - * - * @param ListMessagesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listMessages(ListMessagesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListMessages', $request, $callOptions); - } - - /** - * Lists reactions to a message. For an example, see - * [List reactions for a - * message](https://developers.google.com/workspace/chat/list-reactions). - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::listReactionsAsync()} . - * - * @example samples/V1/ChatServiceClient/list_reactions.php - * - * @param ListReactionsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listReactions(ListReactionsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListReactions', $request, $callOptions); - } - - /** - * Lists events from a Google Chat space. For each event, the - * [payload](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces.spaceEvents#SpaceEvent.FIELDS.oneof_payload) - * contains the most recent version of the Chat resource. For example, if you - * list events about new space members, the server returns `Membership` - * resources that contain the latest membership details. If new members were - * removed during the requested period, the event payload contains an empty - * `Membership` resource. - * - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * To list events, the authenticated user must be a member of the space. - * - * For an example, see [List events from a Google Chat - * space](https://developers.google.com/workspace/chat/list-space-events). - * - * The async variant is {@see ChatServiceClient::listSpaceEventsAsync()} . - * - * @example samples/V1/ChatServiceClient/list_space_events.php - * - * @param ListSpaceEventsRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listSpaceEvents(ListSpaceEventsRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSpaceEvents', $request, $callOptions); - } - - /** - * Lists spaces the caller is a member of. Group chats and DMs aren't listed - * until the first message is sent. For an example, see - * [List - * spaces](https://developers.google.com/workspace/chat/list-spaces). - * - * Requires - * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). - * Supports - * [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * and [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * Lists spaces visible to the caller or authenticated user. Group chats - * and DMs aren't listed until the first message is sent. - * - * To list all named spaces by Google Workspace organization, use the - * [`spaces.search()`](https://developers.google.com/workspace/chat/api/reference/rest/v1/spaces/search) - * method using Workspace administrator privileges instead. - * - * The async variant is {@see ChatServiceClient::listSpacesAsync()} . - * - * @example samples/V1/ChatServiceClient/list_spaces.php - * - * @param ListSpacesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 listSpaces(ListSpacesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('ListSpaces', $request, $callOptions); - } - - /** - * Returns a list of spaces in a Google Workspace organization based on an - * administrator's search. Requires [user - * authentication with administrator - * privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges). - * In the request, set `use_admin_access` to `true`. - * - * The async variant is {@see ChatServiceClient::searchSpacesAsync()} . - * - * @example samples/V1/ChatServiceClient/search_spaces.php - * - * @param SearchSpacesRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. 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 searchSpaces(SearchSpacesRequest $request, array $callOptions = []): PagedListResponse - { - return $this->startApiCall('SearchSpaces', $request, $callOptions); - } - - /** - * Creates a space and adds specified users to it. The calling user is - * automatically added to the space, and shouldn't be specified as a - * membership in the request. For an example, see - * [Set up a space with initial - * members](https://developers.google.com/workspace/chat/set-up-spaces). - * - * To specify the human members to add, add memberships with the appropriate - * `membership.member.name`. To add a human user, use `users/{user}`, where - * `{user}` can be the email address for the user. For users in the same - * Workspace organization `{user}` can also be the `id` for the person from - * the People API, or the `id` for the user in the Directory API. For example, - * if the People API Person profile ID for `user@example.com` is `123456789`, - * you can add the user to the space by setting the `membership.member.name` - * to `users/user@example.com` or `users/123456789`. - * - * To specify the Google groups to add, add memberships with the - * appropriate `membership.group_member.name`. To add or invite a Google - * group, use `groups/{group}`, where `{group}` is the `id` for the group from - * the Cloud Identity Groups API. For example, you can use [Cloud Identity - * Groups lookup - * API](https://cloud.google.com/identity/docs/reference/rest/v1/groups/lookup) - * to retrieve the ID `123456789` for group email `group@example.com`, then - * you can add the group to the space by setting the - * `membership.group_member.name` to `groups/123456789`. Group email is not - * supported, and Google groups can only be added as members in named spaces. - * - * For a named space or group chat, if the caller blocks, or is blocked - * by some members, or doesn't have permission to add some members, then - * those members aren't added to the created space. - * - * To create a direct message (DM) between the calling user and another human - * user, specify exactly one membership to represent the human user. If - * one user blocks the other, the request fails and the DM isn't created. - * - * To create a DM between the calling user and the calling app, set - * `Space.singleUserBotDm` to `true` and don't specify any memberships. You - * can only use this method to set up a DM with the calling app. To add the - * calling app as a member of a space or an existing DM between two human - * users, see - * [Invite or add a user or app to a - * space](https://developers.google.com/workspace/chat/create-members). - * - * If a DM already exists between two users, even when one user blocks the - * other at the time a request is made, then the existing DM is returned. - * - * Spaces with threaded replies aren't supported. If you receive the error - * message `ALREADY_EXISTS` when setting up a space, try a different - * `displayName`. An existing space within the Google Workspace organization - * might already use this display name. - * - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::setUpSpaceAsync()} . - * - * @example samples/V1/ChatServiceClient/set_up_space.php - * - * @param SetUpSpaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Space - * - * @throws ApiException Thrown if the API call fails. - */ - public function setUpSpace(SetUpSpaceRequest $request, array $callOptions = []): Space - { - return $this->startApiCall('SetUpSpace', $request, $callOptions)->wait(); - } - - /** - * Updates a membership. For an example, see [Update a user's membership in - * a space](https://developers.google.com/workspace/chat/update-members). - * - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::updateMembershipAsync()} . - * - * @example samples/V1/ChatServiceClient/update_membership.php - * - * @param UpdateMembershipRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Membership - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateMembership(UpdateMembershipRequest $request, array $callOptions = []): Membership - { - return $this->startApiCall('UpdateMembership', $request, $callOptions)->wait(); - } - - /** - * Updates a message. There's a difference between the `patch` and `update` - * methods. The `patch` - * method uses a `patch` request while the `update` method uses a `put` - * request. We recommend using the `patch` method. For an example, see - * [Update a - * message](https://developers.google.com/workspace/chat/update-messages). - * - * Requires - * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize). - * Supports - * [app - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-app) - * and [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * When using app authentication, requests can only update messages - * created by the calling Chat app. - * - * The async variant is {@see ChatServiceClient::updateMessageAsync()} . - * - * @example samples/V1/ChatServiceClient/update_message.php - * - * @param UpdateMessageRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Message - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateMessage(UpdateMessageRequest $request, array $callOptions = []): Message - { - return $this->startApiCall('UpdateMessage', $request, $callOptions)->wait(); - } - - /** - * Updates a space. For an example, see - * [Update a - * space](https://developers.google.com/workspace/chat/update-spaces). - * - * If you're updating the `displayName` field and receive the error message - * `ALREADY_EXISTS`, try a different display name.. An existing space within - * the Google Workspace organization might already use this display name. - * - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::updateSpaceAsync()} . - * - * @example samples/V1/ChatServiceClient/update_space.php - * - * @param UpdateSpaceRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return Space - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSpace(UpdateSpaceRequest $request, array $callOptions = []): Space - { - return $this->startApiCall('UpdateSpace', $request, $callOptions)->wait(); - } - - /** - * Updates a user's read state within a space, used to identify read and - * unread messages. For an example, see [Update a user's space read - * state](https://developers.google.com/workspace/chat/update-space-read-state). - * - * Requires [user - * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * The async variant is {@see ChatServiceClient::updateSpaceReadStateAsync()} . - * - * @example samples/V1/ChatServiceClient/update_space_read_state.php - * - * @param UpdateSpaceReadStateRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return SpaceReadState - * - * @throws ApiException Thrown if the API call fails. - */ - public function updateSpaceReadState(UpdateSpaceReadStateRequest $request, array $callOptions = []): SpaceReadState - { - return $this->startApiCall('UpdateSpaceReadState', $request, $callOptions)->wait(); - } - - /** - * Uploads an attachment. For an example, see - * [Upload media as a file - * attachment](https://developers.google.com/workspace/chat/upload-media-attachments). - * Requires user - * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user). - * - * You can upload attachments up to 200 MB. Certain file types aren't - * supported. For details, see [File types blocked by Google - * Chat](https://support.google.com/chat/answer/7651457?&co=GENIE.Platform%3DDesktop#File%20types%20blocked%20in%20Google%20Chat). - * - * The async variant is {@see ChatServiceClient::uploadAttachmentAsync()} . - * - * @example samples/V1/ChatServiceClient/upload_attachment.php - * - * @param UploadAttachmentRequest $request A request to house fields associated with the call. - * @param array $callOptions { - * Optional. - * - * @type RetrySettings|array $retrySettings - * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an - * associative array of retry settings parameters. See the documentation on - * {@see RetrySettings} for example usage. - * } - * - * @return UploadAttachmentResponse - * - * @throws ApiException Thrown if the API call fails. - */ - public function uploadAttachment(UploadAttachmentRequest $request, array $callOptions = []): UploadAttachmentResponse - { - return $this->startApiCall('UploadAttachment', $request, $callOptions)->wait(); - } -} diff --git a/owl-bot-staging/AppsChat/v1/src/V1/gapic_metadata.json b/owl-bot-staging/AppsChat/v1/src/V1/gapic_metadata.json deleted file mode 100644 index 7cb823611f39..000000000000 --- a/owl-bot-staging/AppsChat/v1/src/V1/gapic_metadata.json +++ /dev/null @@ -1,163 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", - "language": "php", - "protoPackage": "google.chat.v1", - "libraryPackage": "Google\\Apps\\Chat\\V1", - "services": { - "ChatService": { - "clients": { - "grpc": { - "libraryClient": "ChatServiceGapicClient", - "rpcs": { - "CompleteImportSpace": { - "methods": [ - "completeImportSpace" - ] - }, - "CreateMembership": { - "methods": [ - "createMembership" - ] - }, - "CreateMessage": { - "methods": [ - "createMessage" - ] - }, - "CreateReaction": { - "methods": [ - "createReaction" - ] - }, - "CreateSpace": { - "methods": [ - "createSpace" - ] - }, - "DeleteMembership": { - "methods": [ - "deleteMembership" - ] - }, - "DeleteMessage": { - "methods": [ - "deleteMessage" - ] - }, - "DeleteReaction": { - "methods": [ - "deleteReaction" - ] - }, - "DeleteSpace": { - "methods": [ - "deleteSpace" - ] - }, - "FindDirectMessage": { - "methods": [ - "findDirectMessage" - ] - }, - "GetAttachment": { - "methods": [ - "getAttachment" - ] - }, - "GetMembership": { - "methods": [ - "getMembership" - ] - }, - "GetMessage": { - "methods": [ - "getMessage" - ] - }, - "GetSpace": { - "methods": [ - "getSpace" - ] - }, - "GetSpaceEvent": { - "methods": [ - "getSpaceEvent" - ] - }, - "GetSpaceReadState": { - "methods": [ - "getSpaceReadState" - ] - }, - "GetThreadReadState": { - "methods": [ - "getThreadReadState" - ] - }, - "ListMemberships": { - "methods": [ - "listMemberships" - ] - }, - "ListMessages": { - "methods": [ - "listMessages" - ] - }, - "ListReactions": { - "methods": [ - "listReactions" - ] - }, - "ListSpaceEvents": { - "methods": [ - "listSpaceEvents" - ] - }, - "ListSpaces": { - "methods": [ - "listSpaces" - ] - }, - "SearchSpaces": { - "methods": [ - "searchSpaces" - ] - }, - "SetUpSpace": { - "methods": [ - "setUpSpace" - ] - }, - "UpdateMembership": { - "methods": [ - "updateMembership" - ] - }, - "UpdateMessage": { - "methods": [ - "updateMessage" - ] - }, - "UpdateSpace": { - "methods": [ - "updateSpace" - ] - }, - "UpdateSpaceReadState": { - "methods": [ - "updateSpaceReadState" - ] - }, - "UploadAttachment": { - "methods": [ - "uploadAttachment" - ] - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_client_config.json b/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_client_config.json deleted file mode 100644 index 0d68bca79608..000000000000 --- a/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_client_config.json +++ /dev/null @@ -1,179 +0,0 @@ -{ - "interfaces": { - "google.chat.v1.ChatService": { - "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": 30000, - "rpc_timeout_multiplier": 1.0, - "max_rpc_timeout_millis": 30000, - "total_timeout_millis": 30000 - } - }, - "methods": { - "CompleteImportSpace": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateMembership": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateMessage": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateReaction": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "CreateSpace": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteMembership": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteMessage": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteReaction": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "DeleteSpace": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "FindDirectMessage": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetAttachment": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetMembership": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetMessage": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSpace": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSpaceEvent": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetSpaceReadState": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "GetThreadReadState": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListMemberships": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListMessages": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListReactions": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSpaceEvents": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "ListSpaces": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SearchSpaces": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "SetUpSpace": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateMembership": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateMessage": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateSpace": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UpdateSpaceReadState": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - }, - "UploadAttachment": { - "timeout_millis": 30000, - "retry_codes_name": "retry_policy_1_codes", - "retry_params_name": "retry_policy_1_params" - } - } - } - } -} diff --git a/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_descriptor_config.php b/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_descriptor_config.php deleted file mode 100644 index 2b4955688054..000000000000 --- a/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_descriptor_config.php +++ /dev/null @@ -1,400 +0,0 @@ - [ - 'google.chat.v1.ChatService' => [ - 'CompleteImportSpace' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\CompleteImportSpaceResponse', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'CreateMembership' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Membership', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateMessage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Message', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateReaction' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Reaction', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSpace' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Space', - ], - 'DeleteMembership' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Membership', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMessage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReaction' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSpace' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Protobuf\GPBEmpty', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'FindDirectMessage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Space', - ], - 'GetAttachment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Attachment', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMembership' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Membership', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetMessage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Message', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSpace' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Space', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSpaceEvent' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\SpaceEvent', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetSpaceReadState' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\SpaceReadState', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'GetThreadReadState' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\ThreadReadState', - 'headerParams' => [ - [ - 'keyName' => 'name', - 'fieldAccessors' => [ - 'getName', - ], - ], - ], - ], - 'ListMemberships' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMemberships', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Apps\Chat\V1\ListMembershipsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListMessages' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getMessages', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Apps\Chat\V1\ListMessagesResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListReactions' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getReactions', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Apps\Chat\V1\ListReactionsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSpaceEvents' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSpaceEvents', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Apps\Chat\V1\ListSpaceEventsResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'ListSpaces' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSpaces', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Apps\Chat\V1\ListSpacesResponse', - ], - 'SearchSpaces' => [ - 'pageStreaming' => [ - 'requestPageTokenGetMethod' => 'getPageToken', - 'requestPageTokenSetMethod' => 'setPageToken', - 'requestPageSizeGetMethod' => 'getPageSize', - 'requestPageSizeSetMethod' => 'setPageSize', - 'responsePageTokenGetMethod' => 'getNextPageToken', - 'resourcesGetMethod' => 'getSpaces', - ], - 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, - 'responseType' => 'Google\Apps\Chat\V1\SearchSpacesResponse', - ], - 'SetUpSpace' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Space', - ], - 'UpdateMembership' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Membership', - 'headerParams' => [ - [ - 'keyName' => 'membership.name', - 'fieldAccessors' => [ - 'getMembership', - 'getName', - ], - ], - ], - ], - 'UpdateMessage' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Message', - 'headerParams' => [ - [ - 'keyName' => 'message.name', - 'fieldAccessors' => [ - 'getMessage', - 'getName', - ], - ], - ], - ], - 'UpdateSpace' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\Space', - 'headerParams' => [ - [ - 'keyName' => 'space.name', - 'fieldAccessors' => [ - 'getSpace', - 'getName', - ], - ], - ], - ], - 'UpdateSpaceReadState' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\SpaceReadState', - 'headerParams' => [ - [ - 'keyName' => 'space_read_state.name', - 'fieldAccessors' => [ - 'getSpaceReadState', - 'getName', - ], - ], - ], - ], - 'UploadAttachment' => [ - 'callType' => \Google\ApiCore\Call::UNARY_CALL, - 'responseType' => 'Google\Apps\Chat\V1\UploadAttachmentResponse', - 'headerParams' => [ - [ - 'keyName' => 'parent', - 'fieldAccessors' => [ - 'getParent', - ], - ], - ], - ], - 'templateMap' => [ - 'attachment' => 'spaces/{space}/messages/{message}/attachments/{attachment}', - 'membership' => 'spaces/{space}/members/{member}', - 'message' => 'spaces/{space}/messages/{message}', - 'quotedMessageMetadata' => 'spaces/{space}/messages/{message}/quotedMessageMetadata/{quoted_message_metadata}', - 'reaction' => 'spaces/{space}/messages/{message}/reactions/{reaction}', - 'space' => 'spaces/{space}', - 'spaceEvent' => 'spaces/{space}/spaceEvents/{space_event}', - 'spaceReadState' => 'users/{user}/spaces/{space}/spaceReadState', - 'thread' => 'spaces/{space}/threads/{thread}', - 'threadReadState' => 'users/{user}/spaces/{space}/threads/{thread}/threadReadState', - ], - ], - ], -]; diff --git a/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_rest_client_config.php b/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_rest_client_config.php deleted file mode 100644 index 70a4a1080af3..000000000000 --- a/owl-bot-staging/AppsChat/v1/src/V1/resources/chat_service_rest_client_config.php +++ /dev/null @@ -1,344 +0,0 @@ - [ - 'google.chat.v1.ChatService' => [ - 'CompleteImportSpace' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{name=spaces/*}:completeImport', - 'body' => '*', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'CreateMembership' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=spaces/*}/members', - 'body' => 'membership', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateMessage' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=spaces/*}/messages', - 'body' => 'message', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateReaction' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=spaces/*/messages/*}/reactions', - 'body' => 'reaction', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'CreateSpace' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/spaces', - 'body' => 'space', - ], - 'DeleteMembership' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=spaces/*/members/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteMessage' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=spaces/*/messages/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteReaction' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=spaces/*/messages/*/reactions/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'DeleteSpace' => [ - 'method' => 'delete', - 'uriTemplate' => '/v1/{name=spaces/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'FindDirectMessage' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/spaces:findDirectMessage', - ], - 'GetAttachment' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=spaces/*/messages/*/attachments/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMembership' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=spaces/*/members/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetMessage' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=spaces/*/messages/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSpace' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=spaces/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSpaceEvent' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=spaces/*/spaceEvents/*}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetSpaceReadState' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=users/*/spaces/*/spaceReadState}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'GetThreadReadState' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{name=users/*/spaces/*/threads/*/threadReadState}', - 'placeholders' => [ - 'name' => [ - 'getters' => [ - 'getName', - ], - ], - ], - ], - 'ListMemberships' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=spaces/*}/members', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListMessages' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=spaces/*}/messages', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListReactions' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=spaces/*/messages/*}/reactions', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - 'ListSpaceEvents' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/{parent=spaces/*}/spaceEvents', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - 'queryParams' => [ - 'filter', - ], - ], - 'ListSpaces' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/spaces', - ], - 'SearchSpaces' => [ - 'method' => 'get', - 'uriTemplate' => '/v1/spaces:search', - ], - 'SetUpSpace' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/spaces:setup', - 'body' => '*', - ], - 'UpdateMembership' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{membership.name=spaces/*/members/*}', - 'body' => 'membership', - 'placeholders' => [ - 'membership.name' => [ - 'getters' => [ - 'getMembership', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UpdateMessage' => [ - 'method' => 'put', - 'uriTemplate' => '/v1/{message.name=spaces/*/messages/*}', - 'body' => 'message', - 'additionalBindings' => [ - [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{message.name=spaces/*/messages/*}', - 'body' => 'message', - ], - ], - 'placeholders' => [ - 'message.name' => [ - 'getters' => [ - 'getMessage', - 'getName', - ], - ], - ], - ], - 'UpdateSpace' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{space.name=spaces/*}', - 'body' => 'space', - 'placeholders' => [ - 'space.name' => [ - 'getters' => [ - 'getSpace', - 'getName', - ], - ], - ], - ], - 'UpdateSpaceReadState' => [ - 'method' => 'patch', - 'uriTemplate' => '/v1/{space_read_state.name=users/*/spaces/*/spaceReadState}', - 'body' => 'space_read_state', - 'placeholders' => [ - 'space_read_state.name' => [ - 'getters' => [ - 'getSpaceReadState', - 'getName', - ], - ], - ], - 'queryParams' => [ - 'update_mask', - ], - ], - 'UploadAttachment' => [ - 'method' => 'post', - 'uriTemplate' => '/v1/{parent=spaces/*}/attachments:upload', - 'body' => '*', - 'placeholders' => [ - 'parent' => [ - 'getters' => [ - 'getParent', - ], - ], - ], - ], - ], - ], - 'numericEnums' => true, -]; diff --git a/owl-bot-staging/AppsChat/v1/tests/Unit/V1/Client/ChatServiceClientTest.php b/owl-bot-staging/AppsChat/v1/tests/Unit/V1/Client/ChatServiceClientTest.php deleted file mode 100644 index 8895c578d1dd..000000000000 --- a/owl-bot-staging/AppsChat/v1/tests/Unit/V1/Client/ChatServiceClientTest.php +++ /dev/null @@ -1,2177 +0,0 @@ -getMockBuilder(CredentialsWrapper::class)->disableOriginalConstructor()->getMock(); - } - - /** @return ChatServiceClient */ - private function createClient(array $options = []) - { - $options += [ - 'credentials' => $this->createCredentials(), - ]; - return new ChatServiceClient($options); - } - - /** @test */ - public function completeImportSpaceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CompleteImportSpaceResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->spaceName('[SPACE]'); - $request = (new CompleteImportSpaceRequest()) - ->setName($formattedName); - $response = $gapicClient->completeImportSpace($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/CompleteImportSpace', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function completeImportSpaceExceptionTest() - { - $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->spaceName('[SPACE]'); - $request = (new CompleteImportSpaceRequest()) - ->setName($formattedName); - try { - $gapicClient->completeImportSpace($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 createMembershipTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->spaceName('[SPACE]'); - $membership = new Membership(); - $request = (new CreateMembershipRequest()) - ->setParent($formattedParent) - ->setMembership($membership); - $response = $gapicClient->createMembership($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/CreateMembership', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getMembership(); - $this->assertProtobufEquals($membership, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createMembershipExceptionTest() - { - $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->spaceName('[SPACE]'); - $membership = new Membership(); - $request = (new CreateMembershipRequest()) - ->setParent($formattedParent) - ->setMembership($membership); - try { - $gapicClient->createMembership($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 createMessageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $text = 'text3556653'; - $formattedText = 'formattedText-1686936880'; - $fallbackText = 'fallbackText563106922'; - $argumentText = 'argumentText-39826065'; - $threadReply = false; - $clientAssignedMessageId = 'clientAssignedMessageId-1116632848'; - $expectedResponse = new Message(); - $expectedResponse->setName($name); - $expectedResponse->setText($text); - $expectedResponse->setFormattedText($formattedText); - $expectedResponse->setFallbackText($fallbackText); - $expectedResponse->setArgumentText($argumentText); - $expectedResponse->setThreadReply($threadReply); - $expectedResponse->setClientAssignedMessageId($clientAssignedMessageId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->spaceName('[SPACE]'); - $message = new Message(); - $request = (new CreateMessageRequest()) - ->setParent($formattedParent) - ->setMessage($message); - $response = $gapicClient->createMessage($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/CreateMessage', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getMessage(); - $this->assertProtobufEquals($message, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createMessageExceptionTest() - { - $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->spaceName('[SPACE]'); - $message = new Message(); - $request = (new CreateMessageRequest()) - ->setParent($formattedParent) - ->setMessage($message); - try { - $gapicClient->createMessage($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 createReactionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Reaction(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); - $reaction = new Reaction(); - $request = (new CreateReactionRequest()) - ->setParent($formattedParent) - ->setReaction($reaction); - $response = $gapicClient->createReaction($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/CreateReaction', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getReaction(); - $this->assertProtobufEquals($reaction, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createReactionExceptionTest() - { - $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->messageName('[SPACE]', '[MESSAGE]'); - $reaction = new Reaction(); - $request = (new CreateReactionRequest()) - ->setParent($formattedParent) - ->setReaction($reaction); - try { - $gapicClient->createReaction($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 createSpaceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $singleUserBotDm = true; - $threaded = false; - $displayName = 'displayName1615086568'; - $externalUserAllowed = true; - $importMode = false; - $adminInstalled = true; - $spaceUri = 'spaceUri-953552205'; - $expectedResponse = new Space(); - $expectedResponse->setName($name); - $expectedResponse->setSingleUserBotDm($singleUserBotDm); - $expectedResponse->setThreaded($threaded); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setExternalUserAllowed($externalUserAllowed); - $expectedResponse->setImportMode($importMode); - $expectedResponse->setAdminInstalled($adminInstalled); - $expectedResponse->setSpaceUri($spaceUri); - $transport->addResponse($expectedResponse); - // Mock request - $space = new Space(); - $request = (new CreateSpaceRequest()) - ->setSpace($space); - $response = $gapicClient->createSpace($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/CreateSpace', $actualFuncCall); - $actualValue = $actualRequestObject->getSpace(); - $this->assertProtobufEquals($space, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function createSpaceExceptionTest() - { - $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 - $space = new Space(); - $request = (new CreateSpaceRequest()) - ->setSpace($space); - try { - $gapicClient->createSpace($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 deleteMembershipTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->membershipName('[SPACE]', '[MEMBER]'); - $request = (new DeleteMembershipRequest()) - ->setName($formattedName); - $response = $gapicClient->deleteMembership($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/DeleteMembership', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMembershipExceptionTest() - { - $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->membershipName('[SPACE]', '[MEMBER]'); - $request = (new DeleteMembershipRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteMembership($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 deleteMessageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); - $request = (new DeleteMessageRequest()) - ->setName($formattedName); - $gapicClient->deleteMessage($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/DeleteMessage', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteMessageExceptionTest() - { - $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->messageName('[SPACE]', '[MESSAGE]'); - $request = (new DeleteMessageRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteMessage($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 deleteReactionTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->reactionName('[SPACE]', '[MESSAGE]', '[REACTION]'); - $request = (new DeleteReactionRequest()) - ->setName($formattedName); - $gapicClient->deleteReaction($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/DeleteReaction', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteReactionExceptionTest() - { - $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->reactionName('[SPACE]', '[MESSAGE]', '[REACTION]'); - $request = (new DeleteReactionRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteReaction($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 deleteSpaceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new GPBEmpty(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->spaceName('[SPACE]'); - $request = (new DeleteSpaceRequest()) - ->setName($formattedName); - $gapicClient->deleteSpace($request); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/DeleteSpace', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function deleteSpaceExceptionTest() - { - $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->spaceName('[SPACE]'); - $request = (new DeleteSpaceRequest()) - ->setName($formattedName); - try { - $gapicClient->deleteSpace($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 findDirectMessageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $singleUserBotDm = true; - $threaded = false; - $displayName = 'displayName1615086568'; - $externalUserAllowed = true; - $importMode = false; - $adminInstalled = true; - $spaceUri = 'spaceUri-953552205'; - $expectedResponse = new Space(); - $expectedResponse->setName($name2); - $expectedResponse->setSingleUserBotDm($singleUserBotDm); - $expectedResponse->setThreaded($threaded); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setExternalUserAllowed($externalUserAllowed); - $expectedResponse->setImportMode($importMode); - $expectedResponse->setAdminInstalled($adminInstalled); - $expectedResponse->setSpaceUri($spaceUri); - $transport->addResponse($expectedResponse); - // Mock request - $name = 'name3373707'; - $request = (new FindDirectMessageRequest()) - ->setName($name); - $response = $gapicClient->findDirectMessage($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/FindDirectMessage', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($name, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function findDirectMessageExceptionTest() - { - $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 - $name = 'name3373707'; - $request = (new FindDirectMessageRequest()) - ->setName($name); - try { - $gapicClient->findDirectMessage($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 getAttachmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $contentName = 'contentName831644305'; - $contentType = 'contentType831846208'; - $thumbnailUri = 'thumbnailUri1825632153'; - $downloadUri = 'downloadUri1109408053'; - $expectedResponse = new Attachment(); - $expectedResponse->setName($name2); - $expectedResponse->setContentName($contentName); - $expectedResponse->setContentType($contentType); - $expectedResponse->setThumbnailUri($thumbnailUri); - $expectedResponse->setDownloadUri($downloadUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->attachmentName('[SPACE]', '[MESSAGE]', '[ATTACHMENT]'); - $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.chat.v1.ChatService/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('[SPACE]', '[MESSAGE]', '[ATTACHMENT]'); - $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 getMembershipTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->membershipName('[SPACE]', '[MEMBER]'); - $request = (new GetMembershipRequest()) - ->setName($formattedName); - $response = $gapicClient->getMembership($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/GetMembership', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMembershipExceptionTest() - { - $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->membershipName('[SPACE]', '[MEMBER]'); - $request = (new GetMembershipRequest()) - ->setName($formattedName); - try { - $gapicClient->getMembership($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 getMessageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $text = 'text3556653'; - $formattedText = 'formattedText-1686936880'; - $fallbackText = 'fallbackText563106922'; - $argumentText = 'argumentText-39826065'; - $threadReply = false; - $clientAssignedMessageId = 'clientAssignedMessageId-1116632848'; - $expectedResponse = new Message(); - $expectedResponse->setName($name2); - $expectedResponse->setText($text); - $expectedResponse->setFormattedText($formattedText); - $expectedResponse->setFallbackText($fallbackText); - $expectedResponse->setArgumentText($argumentText); - $expectedResponse->setThreadReply($threadReply); - $expectedResponse->setClientAssignedMessageId($clientAssignedMessageId); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); - $request = (new GetMessageRequest()) - ->setName($formattedName); - $response = $gapicClient->getMessage($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/GetMessage', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getMessageExceptionTest() - { - $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->messageName('[SPACE]', '[MESSAGE]'); - $request = (new GetMessageRequest()) - ->setName($formattedName); - try { - $gapicClient->getMessage($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 getSpaceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $singleUserBotDm = true; - $threaded = false; - $displayName = 'displayName1615086568'; - $externalUserAllowed = true; - $importMode = false; - $adminInstalled = true; - $spaceUri = 'spaceUri-953552205'; - $expectedResponse = new Space(); - $expectedResponse->setName($name2); - $expectedResponse->setSingleUserBotDm($singleUserBotDm); - $expectedResponse->setThreaded($threaded); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setExternalUserAllowed($externalUserAllowed); - $expectedResponse->setImportMode($importMode); - $expectedResponse->setAdminInstalled($adminInstalled); - $expectedResponse->setSpaceUri($spaceUri); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->spaceName('[SPACE]'); - $request = (new GetSpaceRequest()) - ->setName($formattedName); - $response = $gapicClient->getSpace($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/GetSpace', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSpaceExceptionTest() - { - $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->spaceName('[SPACE]'); - $request = (new GetSpaceRequest()) - ->setName($formattedName); - try { - $gapicClient->getSpace($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 getSpaceEventTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $eventType = 'eventType984376767'; - $expectedResponse = new SpaceEvent(); - $expectedResponse->setName($name2); - $expectedResponse->setEventType($eventType); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->spaceEventName('[SPACE]', '[SPACE_EVENT]'); - $request = (new GetSpaceEventRequest()) - ->setName($formattedName); - $response = $gapicClient->getSpaceEvent($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/GetSpaceEvent', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSpaceEventExceptionTest() - { - $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->spaceEventName('[SPACE]', '[SPACE_EVENT]'); - $request = (new GetSpaceEventRequest()) - ->setName($formattedName); - try { - $gapicClient->getSpaceEvent($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 getSpaceReadStateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new SpaceReadState(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->spaceReadStateName('[USER]', '[SPACE]'); - $request = (new GetSpaceReadStateRequest()) - ->setName($formattedName); - $response = $gapicClient->getSpaceReadState($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/GetSpaceReadState', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getSpaceReadStateExceptionTest() - { - $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->spaceReadStateName('[USER]', '[SPACE]'); - $request = (new GetSpaceReadStateRequest()) - ->setName($formattedName); - try { - $gapicClient->getSpaceReadState($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 getThreadReadStateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name2 = 'name2-1052831874'; - $expectedResponse = new ThreadReadState(); - $expectedResponse->setName($name2); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->threadReadStateName('[USER]', '[SPACE]', '[THREAD]'); - $request = (new GetThreadReadStateRequest()) - ->setName($formattedName); - $response = $gapicClient->getThreadReadState($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/GetThreadReadState', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function getThreadReadStateExceptionTest() - { - $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->threadReadStateName('[USER]', '[SPACE]', '[THREAD]'); - $request = (new GetThreadReadStateRequest()) - ->setName($formattedName); - try { - $gapicClient->getThreadReadState($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 listMembershipsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $membershipsElement = new Membership(); - $memberships = [ - $membershipsElement, - ]; - $expectedResponse = new ListMembershipsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMemberships($memberships); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->spaceName('[SPACE]'); - $request = (new ListMembershipsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listMemberships($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMemberships()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/ListMemberships', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMembershipsExceptionTest() - { - $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->spaceName('[SPACE]'); - $request = (new ListMembershipsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listMemberships($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 listMessagesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $messagesElement = new Message(); - $messages = [ - $messagesElement, - ]; - $expectedResponse = new ListMessagesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setMessages($messages); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->spaceName('[SPACE]'); - $request = (new ListMessagesRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listMessages($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getMessages()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/ListMessages', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listMessagesExceptionTest() - { - $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->spaceName('[SPACE]'); - $request = (new ListMessagesRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listMessages($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 listReactionsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $reactionsElement = new Reaction(); - $reactions = [ - $reactionsElement, - ]; - $expectedResponse = new ListReactionsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setReactions($reactions); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->messageName('[SPACE]', '[MESSAGE]'); - $request = (new ListReactionsRequest()) - ->setParent($formattedParent); - $response = $gapicClient->listReactions($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getReactions()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/ListReactions', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listReactionsExceptionTest() - { - $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->messageName('[SPACE]', '[MESSAGE]'); - $request = (new ListReactionsRequest()) - ->setParent($formattedParent); - try { - $gapicClient->listReactions($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 listSpaceEventsTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $spaceEventsElement = new SpaceEvent(); - $spaceEvents = [ - $spaceEventsElement, - ]; - $expectedResponse = new ListSpaceEventsResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSpaceEvents($spaceEvents); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->spaceName('[SPACE]'); - $filter = 'filter-1274492040'; - $request = (new ListSpaceEventsRequest()) - ->setParent($formattedParent) - ->setFilter($filter); - $response = $gapicClient->listSpaceEvents($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSpaceEvents()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/ListSpaceEvents', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFilter(); - $this->assertProtobufEquals($filter, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSpaceEventsExceptionTest() - { - $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->spaceName('[SPACE]'); - $filter = 'filter-1274492040'; - $request = (new ListSpaceEventsRequest()) - ->setParent($formattedParent) - ->setFilter($filter); - try { - $gapicClient->listSpaceEvents($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 listSpacesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $spacesElement = new Space(); - $spaces = [ - $spacesElement, - ]; - $expectedResponse = new ListSpacesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setSpaces($spaces); - $transport->addResponse($expectedResponse); - $request = new ListSpacesRequest(); - $response = $gapicClient->listSpaces($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSpaces()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/ListSpaces', $actualFuncCall); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function listSpacesExceptionTest() - { - $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 ListSpacesRequest(); - try { - $gapicClient->listSpaces($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 searchSpacesTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $nextPageToken = ''; - $totalSize = 705419236; - $spacesElement = new Space(); - $spaces = [ - $spacesElement, - ]; - $expectedResponse = new SearchSpacesResponse(); - $expectedResponse->setNextPageToken($nextPageToken); - $expectedResponse->setTotalSize($totalSize); - $expectedResponse->setSpaces($spaces); - $transport->addResponse($expectedResponse); - // Mock request - $query = 'query107944136'; - $request = (new SearchSpacesRequest()) - ->setQuery($query); - $response = $gapicClient->searchSpaces($request); - $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); - $resources = iterator_to_array($response->iterateAllElements()); - $this->assertSame(1, count($resources)); - $this->assertEquals($expectedResponse->getSpaces()[0], $resources[0]); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/SearchSpaces', $actualFuncCall); - $actualValue = $actualRequestObject->getQuery(); - $this->assertProtobufEquals($query, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function searchSpacesExceptionTest() - { - $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 - $query = 'query107944136'; - $request = (new SearchSpacesRequest()) - ->setQuery($query); - try { - $gapicClient->searchSpaces($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 setUpSpaceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $singleUserBotDm = true; - $threaded = false; - $displayName = 'displayName1615086568'; - $externalUserAllowed = true; - $importMode = false; - $adminInstalled = true; - $spaceUri = 'spaceUri-953552205'; - $expectedResponse = new Space(); - $expectedResponse->setName($name); - $expectedResponse->setSingleUserBotDm($singleUserBotDm); - $expectedResponse->setThreaded($threaded); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setExternalUserAllowed($externalUserAllowed); - $expectedResponse->setImportMode($importMode); - $expectedResponse->setAdminInstalled($adminInstalled); - $expectedResponse->setSpaceUri($spaceUri); - $transport->addResponse($expectedResponse); - // Mock request - $space = new Space(); - $request = (new SetUpSpaceRequest()) - ->setSpace($space); - $response = $gapicClient->setUpSpace($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/SetUpSpace', $actualFuncCall); - $actualValue = $actualRequestObject->getSpace(); - $this->assertProtobufEquals($space, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function setUpSpaceExceptionTest() - { - $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 - $space = new Space(); - $request = (new SetUpSpaceRequest()) - ->setSpace($space); - try { - $gapicClient->setUpSpace($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 updateMembershipTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new Membership(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $membership = new Membership(); - $updateMask = new FieldMask(); - $request = (new UpdateMembershipRequest()) - ->setMembership($membership) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateMembership($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/UpdateMembership', $actualFuncCall); - $actualValue = $actualRequestObject->getMembership(); - $this->assertProtobufEquals($membership, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateMembershipExceptionTest() - { - $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 - $membership = new Membership(); - $updateMask = new FieldMask(); - $request = (new UpdateMembershipRequest()) - ->setMembership($membership) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateMembership($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 updateMessageTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $text = 'text3556653'; - $formattedText = 'formattedText-1686936880'; - $fallbackText = 'fallbackText563106922'; - $argumentText = 'argumentText-39826065'; - $threadReply = false; - $clientAssignedMessageId = 'clientAssignedMessageId-1116632848'; - $expectedResponse = new Message(); - $expectedResponse->setName($name); - $expectedResponse->setText($text); - $expectedResponse->setFormattedText($formattedText); - $expectedResponse->setFallbackText($fallbackText); - $expectedResponse->setArgumentText($argumentText); - $expectedResponse->setThreadReply($threadReply); - $expectedResponse->setClientAssignedMessageId($clientAssignedMessageId); - $transport->addResponse($expectedResponse); - // Mock request - $message = new Message(); - $request = (new UpdateMessageRequest()) - ->setMessage($message); - $response = $gapicClient->updateMessage($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/UpdateMessage', $actualFuncCall); - $actualValue = $actualRequestObject->getMessage(); - $this->assertProtobufEquals($message, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateMessageExceptionTest() - { - $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 - $message = new Message(); - $request = (new UpdateMessageRequest()) - ->setMessage($message); - try { - $gapicClient->updateMessage($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 updateSpaceTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $singleUserBotDm = true; - $threaded = false; - $displayName = 'displayName1615086568'; - $externalUserAllowed = true; - $importMode = false; - $adminInstalled = true; - $spaceUri = 'spaceUri-953552205'; - $expectedResponse = new Space(); - $expectedResponse->setName($name); - $expectedResponse->setSingleUserBotDm($singleUserBotDm); - $expectedResponse->setThreaded($threaded); - $expectedResponse->setDisplayName($displayName); - $expectedResponse->setExternalUserAllowed($externalUserAllowed); - $expectedResponse->setImportMode($importMode); - $expectedResponse->setAdminInstalled($adminInstalled); - $expectedResponse->setSpaceUri($spaceUri); - $transport->addResponse($expectedResponse); - // Mock request - $space = new Space(); - $request = (new UpdateSpaceRequest()) - ->setSpace($space); - $response = $gapicClient->updateSpace($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/UpdateSpace', $actualFuncCall); - $actualValue = $actualRequestObject->getSpace(); - $this->assertProtobufEquals($space, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSpaceExceptionTest() - { - $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 - $space = new Space(); - $request = (new UpdateSpaceRequest()) - ->setSpace($space); - try { - $gapicClient->updateSpace($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 updateSpaceReadStateTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $name = 'name3373707'; - $expectedResponse = new SpaceReadState(); - $expectedResponse->setName($name); - $transport->addResponse($expectedResponse); - // Mock request - $spaceReadState = new SpaceReadState(); - $updateMask = new FieldMask(); - $request = (new UpdateSpaceReadStateRequest()) - ->setSpaceReadState($spaceReadState) - ->setUpdateMask($updateMask); - $response = $gapicClient->updateSpaceReadState($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/UpdateSpaceReadState', $actualFuncCall); - $actualValue = $actualRequestObject->getSpaceReadState(); - $this->assertProtobufEquals($spaceReadState, $actualValue); - $actualValue = $actualRequestObject->getUpdateMask(); - $this->assertProtobufEquals($updateMask, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function updateSpaceReadStateExceptionTest() - { - $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 - $spaceReadState = new SpaceReadState(); - $updateMask = new FieldMask(); - $request = (new UpdateSpaceReadStateRequest()) - ->setSpaceReadState($spaceReadState) - ->setUpdateMask($updateMask); - try { - $gapicClient->updateSpaceReadState($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 uploadAttachmentTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new UploadAttachmentResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedParent = $gapicClient->spaceName('[SPACE]'); - $filename = 'filename-734768633'; - $request = (new UploadAttachmentRequest()) - ->setParent($formattedParent) - ->setFilename($filename); - $response = $gapicClient->uploadAttachment($request); - $this->assertEquals($expectedResponse, $response); - $actualRequests = $transport->popReceivedCalls(); - $this->assertSame(1, count($actualRequests)); - $actualFuncCall = $actualRequests[0]->getFuncCall(); - $actualRequestObject = $actualRequests[0]->getRequestObject(); - $this->assertSame('/google.chat.v1.ChatService/UploadAttachment', $actualFuncCall); - $actualValue = $actualRequestObject->getParent(); - $this->assertProtobufEquals($formattedParent, $actualValue); - $actualValue = $actualRequestObject->getFilename(); - $this->assertProtobufEquals($filename, $actualValue); - $this->assertTrue($transport->isExhausted()); - } - - /** @test */ - public function uploadAttachmentExceptionTest() - { - $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->spaceName('[SPACE]'); - $filename = 'filename-734768633'; - $request = (new UploadAttachmentRequest()) - ->setParent($formattedParent) - ->setFilename($filename); - try { - $gapicClient->uploadAttachment($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 completeImportSpaceAsyncTest() - { - $transport = $this->createTransport(); - $gapicClient = $this->createClient([ - 'transport' => $transport, - ]); - $this->assertTrue($transport->isExhausted()); - // Mock response - $expectedResponse = new CompleteImportSpaceResponse(); - $transport->addResponse($expectedResponse); - // Mock request - $formattedName = $gapicClient->spaceName('[SPACE]'); - $request = (new CompleteImportSpaceRequest()) - ->setName($formattedName); - $response = $gapicClient->completeImportSpaceAsync($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.chat.v1.ChatService/CompleteImportSpace', $actualFuncCall); - $actualValue = $actualRequestObject->getName(); - $this->assertProtobufEquals($formattedName, $actualValue); - $this->assertTrue($transport->isExhausted()); - } -}