diff --git a/AppsChat/metadata/Chat/V1/Space.php b/AppsChat/metadata/Chat/V1/Space.php index 6950102f17e..0378800862b 100644 --- a/AppsChat/metadata/Chat/V1/Space.php +++ b/AppsChat/metadata/Chat/V1/Space.php @@ -21,7 +21,7 @@ public static function initOnce() { \GPBMetadata\Google\Protobuf\FieldMask::initOnce(); \GPBMetadata\Google\Protobuf\Timestamp::initOnce(); $pool->internalAddGeneratedFile( - "\x0A\xF5'\x0A\x1Agoogle/chat/v1/space.proto\x12\x0Egoogle.chat.v1\x1A\x19google/api/resource.proto\x1A\x1Dgoogle/chat/v1/audience.proto\x1A\"google/chat/v1/history_state.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x8C\x1A\x0A\x05Space\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12/\x0A\x04type\x18\x02 \x01(\x0E2\x1A.google.chat.v1.Space.TypeB\x05\x18\x01\xE0A\x03\x128\x0A\x0Aspace_type\x18\x0A \x01(\x0E2\x1F.google.chat.v1.Space.SpaceTypeB\x03\xE0A\x01\x12\x1F\x0A\x12single_user_bot_dm\x18\x04 \x01(\x08B\x03\xE0A\x01\x12\x17\x0A\x08threaded\x18\x05 \x01(\x08B\x05\x18\x01\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x03 \x01(\x09B\x03\xE0A\x01\x12%\x0A\x15external_user_allowed\x18\x08 \x01(\x08B\x06\xE0A\x05\xE0A\x01\x12M\x0A\x15space_threading_state\x18\x09 \x01(\x0E2).google.chat.v1.Space.SpaceThreadingStateB\x03\xE0A\x03\x12>\x0A\x0Dspace_details\x18\x0B \x01(\x0B2\".google.chat.v1.Space.SpaceDetailsB\x03\xE0A\x01\x12>\x0A\x13space_history_state\x18\x0D \x01(\x0E2\x1C.google.chat.v1.HistoryStateB\x03\xE0A\x01\x12\x18\x0A\x0Bimport_mode\x18\x10 \x01(\x08B\x03\xE0A\x01\x127\x0A\x0Bcreate_time\x18\x11 \x01(\x0B2\x1A.google.protobuf.TimestampB\x06\xE0A\x05\xE0A\x01\x129\x0A\x10last_active_time\x18\x12 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1C\x0A\x0Fadmin_installed\x18\x13 \x01(\x08B\x03\xE0A\x03\x12D\x0A\x10membership_count\x18\x14 \x01(\x0B2%.google.chat.v1.Space.MembershipCountB\x03\xE0A\x03\x12B\x0A\x0Faccess_settings\x18\x17 \x01(\x0B2\$.google.chat.v1.Space.AccessSettingsB\x03\xE0A\x01\x12\x1D\x0A\x08customer\x18\x18 \x01(\x09B\x06\xE0A\x05\xE0A\x01H\x01\x88\x01\x01\x12\x16\x0A\x09space_uri\x18\x19 \x01(\x09B\x03\xE0A\x03\x12d\x0A\x1Epredefined_permission_settings\x18\x1A \x01(\x0E22.google.chat.v1.Space.PredefinedPermissionSettingsB\x06\xE0A\x04\xE0A\x01H\x00\x12L\x0A\x13permission_settings\x18\x1B \x01(\x0B2(.google.chat.v1.Space.PermissionSettingsB\x03\xE0A\x01H\x00\x12@\x0A\x17import_mode_expire_time\x18\x1C \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x1AA\x0A\x0CSpaceDetails\x12\x18\x0A\x0Bdescription\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Aguidelines\x18\x02 \x01(\x09B\x03\xE0A\x01\x1A_\x0A\x0FMembershipCount\x12+\x0A\x1Ejoined_direct_human_user_count\x18\x04 \x01(\x05B\x03\xE0A\x03\x12\x1F\x0A\x12joined_group_count\x18\x05 \x01(\x05B\x03\xE0A\x03\x1A\x99\x02\x0A\x0EAccessSettings\x12K\x0A\x0Caccess_state\x18\x01 \x01(\x0E20.google.chat.v1.Space.AccessSettings.AccessStateB\x03\xE0A\x03\x12\x15\x0A\x08audience\x18\x03 \x01(\x09B\x03\xE0A\x01\x12W\x0A\x1Aaccess_permission_settings\x18\x05 \x01(\x0B2..google.chat.v1.Space.AccessPermissionSettingsB\x03\xE0A\x01\"J\x0A\x0BAccessState\x12\x1C\x0A\x18ACCESS_STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PRIVATE\x10\x01\x12\x10\x0A\x0CDISCOVERABLE\x10\x02\x1A\xBE\x01\x0A\x18AccessPermissionSettings\x12R\x0A\x16discover_space_setting\x18\x01 \x01(\x0B2-.google.chat.v1.Space.AccessPermissionSettingB\x03\xE0A\x01\x12N\x0A\x12join_space_setting\x18\x02 \x01(\x0B2-.google.chat.v1.Space.AccessPermissionSettingB\x03\xE0A\x01\x1AV\x0A\x17AccessPermissionSetting\x12;\x0A\x0Aprincipals\x18\x01 \x03(\x0B2\x1F.google.chat.v1.Space.PrincipalB\x06\xE0A\x01\xE0A\x06\x1AK\x0A\x09Principal\x12,\x0A\x08audience\x18\x01 \x01(\x0B2\x18.google.chat.v1.AudienceH\x00B\x10\x0A\x0Eprincipal_type\x1A\xA8\x06\x0A\x12PermissionSettings\x12T\x0A\x19manage_members_and_groups\x18\x01 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x00\x88\x01\x01\x12O\x0A\x14modify_space_details\x18\x02 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x01\x88\x01\x01\x12I\x0A\x0Etoggle_history\x18\x03 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x02\x88\x01\x01\x12M\x0A\x12use_at_mention_all\x18\x04 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x03\x88\x01\x01\x12F\x0A\x0Bmanage_apps\x18\x05 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x04\x88\x01\x01\x12J\x0A\x0Fmanage_webhooks\x18\x06 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x05\x88\x01\x01\x12H\x0A\x0Dpost_messages\x18\x07 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x03H\x06\x88\x01\x01\x12I\x0A\x0Ereply_messages\x18\x08 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x07\x88\x01\x01B\x1C\x0A\x1A_manage_members_and_groupsB\x17\x0A\x15_modify_space_detailsB\x11\x0A\x0F_toggle_historyB\x15\x0A\x13_use_at_mention_allB\x0E\x0A\x0C_manage_appsB\x12\x0A\x10_manage_webhooksB\x10\x0A\x0E_post_messagesB\x11\x0A\x0F_reply_messages\x1A\x9D\x01\x0A\x11PermissionSetting\x12\x1D\x0A\x10managers_allowed\x18\x01 \x01(\x08B\x03\xE0A\x01\x12,\x0A\x1Aassistant_managers_allowed\x18\x03 \x01(\x08B\x03\xE0A\x01H\x00\x88\x01\x01\x12\x1C\x0A\x0Fmembers_allowed\x18\x02 \x01(\x08B\x03\xE0A\x01B\x1D\x0A\x1B_assistant_managers_allowed\".\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04ROOM\x10\x01\x12\x06\x0A\x02DM\x10\x02\"V\x0A\x09SpaceType\x12\x1A\x0A\x16SPACE_TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05SPACE\x10\x01\x12\x0E\x0A\x0AGROUP_CHAT\x10\x02\x12\x12\x0A\x0EDIRECT_MESSAGE\x10\x03\"\x82\x01\x0A\x13SpaceThreadingState\x12%\x0A!SPACE_THREADING_STATE_UNSPECIFIED\x10\x00\x12\x15\x0A\x11THREADED_MESSAGES\x10\x02\x12\x14\x0A\x10GROUPED_MESSAGES\x10\x03\x12\x17\x0A\x13UNTHREADED_MESSAGES\x10\x04\"\x7F\x0A\x1CPredefinedPermissionSettings\x12.\x0A*PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED\x10\x00\x12\x17\x0A\x13COLLABORATION_SPACE\x10\x01\x12\x16\x0A\x12ANNOUNCEMENT_SPACE\x10\x02:.\xEAA+\x0A\x19chat.googleapis.com/Space\x12\x0Espaces/{space}B\x1B\x0A\x19space_permission_settingsB\x0B\x0A\x09_customer\"X\x0A\x12CreateSpaceRequest\x12)\x0A\x05space\x18\x01 \x01(\x0B2\x15.google.chat.v1.SpaceB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"Y\x0A\x11ListSpacesRequest\x12\x16\x0A\x09page_size\x18\x01 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x03 \x01(\x09B\x03\xE0A\x01\"T\x0A\x12ListSpacesResponse\x12%\x0A\x06spaces\x18\x01 \x03(\x0B2\x15.google.chat.v1.Space\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"a\x0A\x0FGetSpaceRequest\x12/\x0A\x04name\x18\x01 \x01(\x09B!\xE0A\x02\xFAA\x1B\x0A\x19chat.googleapis.com/Space\x12\x1D\x0A\x10use_admin_access\x18\x02 \x01(\x08B\x03\xE0A\x01\"-\x0A\x18FindDirectMessageRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\"\x8B\x01\x0A\x15FindGroupChatsRequest\x12\x12\x0A\x05users\x18\x05 \x03(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12-\x0A\x0Aspace_view\x18\x04 \x01(\x0E2\x19.google.chat.v1.SpaceView\"X\x0A\x16FindGroupChatsResponse\x12%\x0A\x06spaces\x18\x01 \x03(\x0B2\x15.google.chat.v1.Space\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x94\x01\x0A\x12UpdateSpaceRequest\x12)\x0A\x05space\x18\x01 \x01(\x0B2\x15.google.chat.v1.SpaceB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x12\x1D\x0A\x10use_admin_access\x18\x03 \x01(\x08B\x03\xE0A\x01\"\x81\x01\x0A\x13SearchSpacesRequest\x12\x18\x0A\x10use_admin_access\x18\x01 \x01(\x08\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x12\x0A\x05query\x18\x04 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"j\x0A\x14SearchSpacesResponse\x12%\x0A\x06spaces\x18\x01 \x03(\x0B2\x15.google.chat.v1.Space\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x12\x0A\x0Atotal_size\x18\x03 \x01(\x05\"d\x0A\x12DeleteSpaceRequest\x12/\x0A\x04name\x18\x01 \x01(\x09B!\xE0A\x02\xFAA\x1B\x0A\x19chat.googleapis.com/Space\x12\x1D\x0A\x10use_admin_access\x18\x02 \x01(\x08B\x03\xE0A\x01\"M\x0A\x1ACompleteImportSpaceRequest\x12/\x0A\x04name\x18\x01 \x01(\x09B!\xE0A\x02\xFAA\x1B\x0A\x19chat.googleapis.com/Space\"C\x0A\x1BCompleteImportSpaceResponse\x12\$\x0A\x05space\x18\x01 \x01(\x0B2\x15.google.chat.v1.Space*c\x0A\x09SpaceView\x12\x1A\x0A\x16SPACE_VIEW_UNSPECIFIED\x10\x00\x12!\x0A\x1DSPACE_VIEW_RESOURCE_NAME_ONLY\x10\x03\x12\x17\x0A\x13SPACE_VIEW_EXPANDED\x10\x04B\xA3\x01\x0A\x12com.google.chat.v1B\x0ASpaceProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xA2\x02\x0BDYNAPIProto\xAA\x02\x13Google.Apps.Chat.V1\xCA\x02\x13Google\\Apps\\Chat\\V1\xEA\x02\x16Google::Apps::Chat::V1b\x06proto3" + "\x0A\x88)\x0A\x1Agoogle/chat/v1/space.proto\x12\x0Egoogle.chat.v1\x1A\x19google/api/resource.proto\x1A\x1Dgoogle/chat/v1/audience.proto\x1A\"google/chat/v1/history_state.proto\x1A google/protobuf/field_mask.proto\x1A\x1Fgoogle/protobuf/timestamp.proto\"\x8C\x1A\x0A\x05Space\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x08\x12/\x0A\x04type\x18\x02 \x01(\x0E2\x1A.google.chat.v1.Space.TypeB\x05\x18\x01\xE0A\x03\x128\x0A\x0Aspace_type\x18\x0A \x01(\x0E2\x1F.google.chat.v1.Space.SpaceTypeB\x03\xE0A\x01\x12\x1F\x0A\x12single_user_bot_dm\x18\x04 \x01(\x08B\x03\xE0A\x01\x12\x17\x0A\x08threaded\x18\x05 \x01(\x08B\x05\x18\x01\xE0A\x03\x12\x19\x0A\x0Cdisplay_name\x18\x03 \x01(\x09B\x03\xE0A\x01\x12%\x0A\x15external_user_allowed\x18\x08 \x01(\x08B\x06\xE0A\x05\xE0A\x01\x12M\x0A\x15space_threading_state\x18\x09 \x01(\x0E2).google.chat.v1.Space.SpaceThreadingStateB\x03\xE0A\x03\x12>\x0A\x0Dspace_details\x18\x0B \x01(\x0B2\".google.chat.v1.Space.SpaceDetailsB\x03\xE0A\x01\x12>\x0A\x13space_history_state\x18\x0D \x01(\x0E2\x1C.google.chat.v1.HistoryStateB\x03\xE0A\x01\x12\x18\x0A\x0Bimport_mode\x18\x10 \x01(\x08B\x03\xE0A\x01\x127\x0A\x0Bcreate_time\x18\x11 \x01(\x0B2\x1A.google.protobuf.TimestampB\x06\xE0A\x05\xE0A\x01\x129\x0A\x10last_active_time\x18\x12 \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x12\x1C\x0A\x0Fadmin_installed\x18\x13 \x01(\x08B\x03\xE0A\x03\x12D\x0A\x10membership_count\x18\x14 \x01(\x0B2%.google.chat.v1.Space.MembershipCountB\x03\xE0A\x03\x12B\x0A\x0Faccess_settings\x18\x17 \x01(\x0B2\$.google.chat.v1.Space.AccessSettingsB\x03\xE0A\x01\x12\x1D\x0A\x08customer\x18\x18 \x01(\x09B\x06\xE0A\x05\xE0A\x01H\x01\x88\x01\x01\x12\x16\x0A\x09space_uri\x18\x19 \x01(\x09B\x03\xE0A\x03\x12d\x0A\x1Epredefined_permission_settings\x18\x1A \x01(\x0E22.google.chat.v1.Space.PredefinedPermissionSettingsB\x06\xE0A\x04\xE0A\x01H\x00\x12L\x0A\x13permission_settings\x18\x1B \x01(\x0B2(.google.chat.v1.Space.PermissionSettingsB\x03\xE0A\x01H\x00\x12@\x0A\x17import_mode_expire_time\x18\x1C \x01(\x0B2\x1A.google.protobuf.TimestampB\x03\xE0A\x03\x1AA\x0A\x0CSpaceDetails\x12\x18\x0A\x0Bdescription\x18\x01 \x01(\x09B\x03\xE0A\x01\x12\x17\x0A\x0Aguidelines\x18\x02 \x01(\x09B\x03\xE0A\x01\x1A_\x0A\x0FMembershipCount\x12+\x0A\x1Ejoined_direct_human_user_count\x18\x04 \x01(\x05B\x03\xE0A\x03\x12\x1F\x0A\x12joined_group_count\x18\x05 \x01(\x05B\x03\xE0A\x03\x1A\x99\x02\x0A\x0EAccessSettings\x12K\x0A\x0Caccess_state\x18\x01 \x01(\x0E20.google.chat.v1.Space.AccessSettings.AccessStateB\x03\xE0A\x03\x12\x15\x0A\x08audience\x18\x03 \x01(\x09B\x03\xE0A\x01\x12W\x0A\x1Aaccess_permission_settings\x18\x05 \x01(\x0B2..google.chat.v1.Space.AccessPermissionSettingsB\x03\xE0A\x01\"J\x0A\x0BAccessState\x12\x1C\x0A\x18ACCESS_STATE_UNSPECIFIED\x10\x00\x12\x0B\x0A\x07PRIVATE\x10\x01\x12\x10\x0A\x0CDISCOVERABLE\x10\x02\x1A\xBE\x01\x0A\x18AccessPermissionSettings\x12R\x0A\x16discover_space_setting\x18\x01 \x01(\x0B2-.google.chat.v1.Space.AccessPermissionSettingB\x03\xE0A\x01\x12N\x0A\x12join_space_setting\x18\x02 \x01(\x0B2-.google.chat.v1.Space.AccessPermissionSettingB\x03\xE0A\x01\x1AV\x0A\x17AccessPermissionSetting\x12;\x0A\x0Aprincipals\x18\x01 \x03(\x0B2\x1F.google.chat.v1.Space.PrincipalB\x06\xE0A\x01\xE0A\x06\x1AK\x0A\x09Principal\x12,\x0A\x08audience\x18\x01 \x01(\x0B2\x18.google.chat.v1.AudienceH\x00B\x10\x0A\x0Eprincipal_type\x1A\xA8\x06\x0A\x12PermissionSettings\x12T\x0A\x19manage_members_and_groups\x18\x01 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x00\x88\x01\x01\x12O\x0A\x14modify_space_details\x18\x02 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x01\x88\x01\x01\x12I\x0A\x0Etoggle_history\x18\x03 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x02\x88\x01\x01\x12M\x0A\x12use_at_mention_all\x18\x04 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x03\x88\x01\x01\x12F\x0A\x0Bmanage_apps\x18\x05 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x04\x88\x01\x01\x12J\x0A\x0Fmanage_webhooks\x18\x06 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x05\x88\x01\x01\x12H\x0A\x0Dpost_messages\x18\x07 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x03H\x06\x88\x01\x01\x12I\x0A\x0Ereply_messages\x18\x08 \x01(\x0B2'.google.chat.v1.Space.PermissionSettingB\x03\xE0A\x01H\x07\x88\x01\x01B\x1C\x0A\x1A_manage_members_and_groupsB\x17\x0A\x15_modify_space_detailsB\x11\x0A\x0F_toggle_historyB\x15\x0A\x13_use_at_mention_allB\x0E\x0A\x0C_manage_appsB\x12\x0A\x10_manage_webhooksB\x10\x0A\x0E_post_messagesB\x11\x0A\x0F_reply_messages\x1A\x9D\x01\x0A\x11PermissionSetting\x12\x1D\x0A\x10managers_allowed\x18\x01 \x01(\x08B\x03\xE0A\x01\x12,\x0A\x1Aassistant_managers_allowed\x18\x03 \x01(\x08B\x03\xE0A\x01H\x00\x88\x01\x01\x12\x1C\x0A\x0Fmembers_allowed\x18\x02 \x01(\x08B\x03\xE0A\x01B\x1D\x0A\x1B_assistant_managers_allowed\".\x0A\x04Type\x12\x14\x0A\x10TYPE_UNSPECIFIED\x10\x00\x12\x08\x0A\x04ROOM\x10\x01\x12\x06\x0A\x02DM\x10\x02\"V\x0A\x09SpaceType\x12\x1A\x0A\x16SPACE_TYPE_UNSPECIFIED\x10\x00\x12\x09\x0A\x05SPACE\x10\x01\x12\x0E\x0A\x0AGROUP_CHAT\x10\x02\x12\x12\x0A\x0EDIRECT_MESSAGE\x10\x03\"\x82\x01\x0A\x13SpaceThreadingState\x12%\x0A!SPACE_THREADING_STATE_UNSPECIFIED\x10\x00\x12\x15\x0A\x11THREADED_MESSAGES\x10\x02\x12\x14\x0A\x10GROUPED_MESSAGES\x10\x03\x12\x17\x0A\x13UNTHREADED_MESSAGES\x10\x04\"\x7F\x0A\x1CPredefinedPermissionSettings\x12.\x0A*PREDEFINED_PERMISSION_SETTINGS_UNSPECIFIED\x10\x00\x12\x17\x0A\x13COLLABORATION_SPACE\x10\x01\x12\x16\x0A\x12ANNOUNCEMENT_SPACE\x10\x02:.\xEAA+\x0A\x19chat.googleapis.com/Space\x12\x0Espaces/{space}B\x1B\x0A\x19space_permission_settingsB\x0B\x0A\x09_customer\"X\x0A\x12CreateSpaceRequest\x12)\x0A\x05space\x18\x01 \x01(\x0B2\x15.google.chat.v1.SpaceB\x03\xE0A\x02\x12\x17\x0A\x0Arequest_id\x18\x02 \x01(\x09B\x03\xE0A\x01\"Y\x0A\x11ListSpacesRequest\x12\x16\x0A\x09page_size\x18\x01 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x02 \x01(\x09B\x03\xE0A\x01\x12\x13\x0A\x06filter\x18\x03 \x01(\x09B\x03\xE0A\x01\"T\x0A\x12ListSpacesResponse\x12%\x0A\x06spaces\x18\x01 \x03(\x0B2\x15.google.chat.v1.Space\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"a\x0A\x0FGetSpaceRequest\x12/\x0A\x04name\x18\x01 \x01(\x09B!\xE0A\x02\xFAA\x1B\x0A\x19chat.googleapis.com/Space\x12\x1D\x0A\x10use_admin_access\x18\x02 \x01(\x08B\x03\xE0A\x01\"-\x0A\x18FindDirectMessageRequest\x12\x11\x0A\x04name\x18\x01 \x01(\x09B\x03\xE0A\x02\"\x8B\x01\x0A\x15FindGroupChatsRequest\x12\x12\x0A\x05users\x18\x05 \x03(\x09B\x03\xE0A\x01\x12\x16\x0A\x09page_size\x18\x02 \x01(\x05B\x03\xE0A\x01\x12\x17\x0A\x0Apage_token\x18\x03 \x01(\x09B\x03\xE0A\x01\x12-\x0A\x0Aspace_view\x18\x04 \x01(\x0E2\x19.google.chat.v1.SpaceView\"X\x0A\x16FindGroupChatsResponse\x12%\x0A\x06spaces\x18\x01 \x03(\x0B2\x15.google.chat.v1.Space\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\"\x94\x01\x0A\x12UpdateSpaceRequest\x12)\x0A\x05space\x18\x01 \x01(\x0B2\x15.google.chat.v1.SpaceB\x03\xE0A\x02\x124\x0A\x0Bupdate_mask\x18\x02 \x01(\x0B2\x1A.google.protobuf.FieldMaskB\x03\xE0A\x02\x12\x1D\x0A\x10use_admin_access\x18\x03 \x01(\x08B\x03\xE0A\x01\"\x81\x01\x0A\x13SearchSpacesRequest\x12\x18\x0A\x10use_admin_access\x18\x01 \x01(\x08\x12\x11\x0A\x09page_size\x18\x02 \x01(\x05\x12\x12\x0A\x0Apage_token\x18\x03 \x01(\x09\x12\x12\x0A\x05query\x18\x04 \x01(\x09B\x03\xE0A\x02\x12\x15\x0A\x08order_by\x18\x05 \x01(\x09B\x03\xE0A\x01\"\xFC\x01\x0A\x14SearchSpacesResponse\x12)\x0A\x06spaces\x18\x01 \x03(\x0B2\x15.google.chat.v1.SpaceB\x02\x18\x01\x12\x17\x0A\x0Fnext_page_token\x18\x02 \x01(\x09\x12\x12\x0A\x0Atotal_size\x18\x03 \x01(\x05\x12L\x0A\x07results\x18\x04 \x03(\x0B26.google.chat.v1.SearchSpacesResponse.SearchSpaceResultB\x03\xE0A\x03\x1A>\x0A\x11SearchSpaceResult\x12)\x0A\x05space\x18\x01 \x01(\x0B2\x15.google.chat.v1.SpaceB\x03\xE0A\x03\"d\x0A\x12DeleteSpaceRequest\x12/\x0A\x04name\x18\x01 \x01(\x09B!\xE0A\x02\xFAA\x1B\x0A\x19chat.googleapis.com/Space\x12\x1D\x0A\x10use_admin_access\x18\x02 \x01(\x08B\x03\xE0A\x01\"M\x0A\x1ACompleteImportSpaceRequest\x12/\x0A\x04name\x18\x01 \x01(\x09B!\xE0A\x02\xFAA\x1B\x0A\x19chat.googleapis.com/Space\"C\x0A\x1BCompleteImportSpaceResponse\x12\$\x0A\x05space\x18\x01 \x01(\x0B2\x15.google.chat.v1.Space*c\x0A\x09SpaceView\x12\x1A\x0A\x16SPACE_VIEW_UNSPECIFIED\x10\x00\x12!\x0A\x1DSPACE_VIEW_RESOURCE_NAME_ONLY\x10\x03\x12\x17\x0A\x13SPACE_VIEW_EXPANDED\x10\x04B\xA3\x01\x0A\x12com.google.chat.v1B\x0ASpaceProtoP\x01Z,cloud.google.com/go/chat/apiv1/chatpb;chatpb\xA2\x02\x0BDYNAPIProto\xAA\x02\x13Google.Apps.Chat.V1\xCA\x02\x13Google\\Apps\\Chat\\V1\xEA\x02\x16Google::Apps::Chat::V1b\x06proto3" , true); static::$is_initialized = true; diff --git a/AppsChat/samples/V1/ChatServiceClient/search_spaces.php b/AppsChat/samples/V1/ChatServiceClient/search_spaces.php index 172856994f9..327f3eb8158 100644 --- a/AppsChat/samples/V1/ChatServiceClient/search_spaces.php +++ b/AppsChat/samples/V1/ChatServiceClient/search_spaces.php @@ -30,23 +30,35 @@ use Google\Apps\Chat\V1\Space; /** - * Returns a list of spaces in a Google Workspace organization based on an - * administrator's search. In the request, set `use_admin_access` to `true`. - * For an example, see [Search for and manage + * Returns a list of spaces in a Google Workspace organization. For an + * example, see [Search for and manage * spaces](https://developers.google.com/workspace/chat/search-manage-admin). * - * Requires [user + * When `use_admin_access` is set to `false`, the results are limited to + * spaces where the calling user is a joined member. To search with + * administrator privileges, set `use_admin_access` to `true`. + * + * Supports the following types of + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): + * + * - [User + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following authorization scopes: + * - `https://www.googleapis.com/auth/chat.spaces.readonly` + * - `https://www.googleapis.com/auth/chat.spaces` + * + * - [User * authentication with administrator * privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) * and one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - * * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` * - `https://www.googleapis.com/auth/chat.admin.spaces` * * @param string $query A search query. * - * You can search by using the following parameters: + * You can search by using the following parameters when `useAdminAccess` + * is set to `true`: * * - `create_time` * - `customer` @@ -56,18 +68,27 @@ * - `space_history_state` * - `space_type` * + * When `useAdminAccess` is set to `false`: + * + * - `display_name` + * - `external_user_allowed` + * - `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. + * `customer` is required when `useAdminAccess` is set to `true`, 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`. + * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess` + * is set to `false`, `display_name` is required to retrieve meaningful + * results. Otherwise, the default behavior is to return an empty response. * * `external_user_allowed` accepts either `true` or `false`. * @@ -90,7 +111,8 @@ * < "2022-01-01T00:00:00+00:00" AND last_active_time > * "2023-01-01T00:00:00+00:00"`. * - * The following example queries are valid: + * The following example queries are valid when `useAdminAccess` is set to + * `true`: * * ``` * customer = "customers/my_customer" AND space_type = "SPACE" @@ -112,6 +134,21 @@ * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") * ``` + * + * The following example queries are valid when `useAdminAccess` is set to + * `false`: + * + * ``` + * display_name:"Hello World" AND space_type = "SPACE" + * + * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE" + * + * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an + * empty response. + * + * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = + * "SPACE") + * ``` */ function search_spaces_sample(string $query): void { diff --git a/AppsChat/src/Chat/V1/Client/ChatServiceClient.php b/AppsChat/src/Chat/V1/Client/ChatServiceClient.php index 84f9e2daf60..7659defb7cc 100644 --- a/AppsChat/src/Chat/V1/Client/ChatServiceClient.php +++ b/AppsChat/src/Chat/V1/Client/ChatServiceClient.php @@ -188,7 +188,11 @@ final class ChatServiceClient /** 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. */ + /** + * The default scopes required by the service. + * + * @internal + */ public static $serviceScopes = [ 'https://www.googleapis.com/auth/chat.admin.delete', 'https://www.googleapis.com/auth/chat.admin.memberships', @@ -2452,17 +2456,28 @@ public function searchMessages(SearchMessagesRequest $request, array $callOption } /** - * Returns a list of spaces in a Google Workspace organization based on an - * administrator's search. In the request, set `use_admin_access` to `true`. - * For an example, see [Search for and manage + * Returns a list of spaces in a Google Workspace organization. For an + * example, see [Search for and manage * spaces](https://developers.google.com/workspace/chat/search-manage-admin). * - * Requires [user + * When `use_admin_access` is set to `false`, the results are limited to + * spaces where the calling user is a joined member. To search with + * administrator privileges, set `use_admin_access` to `true`. + * + * Supports the following types of + * [authentication](https://developers.google.com/workspace/chat/authenticate-authorize): + * + * - [User + * authentication](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user) + * with one of the following authorization scopes: + * - `https://www.googleapis.com/auth/chat.spaces.readonly` + * - `https://www.googleapis.com/auth/chat.spaces` + * + * - [User * authentication with administrator * privileges](https://developers.google.com/workspace/chat/authenticate-authorize-chat-user#admin-privileges) * and one of the following [authorization * scopes](https://developers.google.com/workspace/chat/authenticate-authorize#chat-api-scopes): - * * - `https://www.googleapis.com/auth/chat.admin.spaces.readonly` * - `https://www.googleapis.com/auth/chat.admin.spaces` * diff --git a/AppsChat/src/Chat/V1/Message.php b/AppsChat/src/Chat/V1/Message.php index d9c578ae012..3fefa180b51 100644 --- a/AppsChat/src/Chat/V1/Message.php +++ b/AppsChat/src/Chat/V1/Message.php @@ -783,7 +783,7 @@ public function setFormattedText($var) */ public function getCards() { - if ($this->cards->count() !== 0) { + if (count($this->cards) !== 0) { @trigger_error('cards is deprecated.', E_USER_DEPRECATED); } return $this->cards; diff --git a/AppsChat/src/Chat/V1/SearchSpacesRequest.php b/AppsChat/src/Chat/V1/SearchSpacesRequest.php index 543b166b97f..c1537f6616d 100644 --- a/AppsChat/src/Chat/V1/SearchSpacesRequest.php +++ b/AppsChat/src/Chat/V1/SearchSpacesRequest.php @@ -24,8 +24,6 @@ class SearchSpacesRequest extends \Google\Protobuf\Internal\Message * 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; */ @@ -52,7 +50,8 @@ class SearchSpacesRequest extends \Google\Protobuf\Internal\Message protected $page_token = ''; /** * Required. A search query. - * You can search by using the following parameters: + * You can search by using the following parameters when `useAdminAccess` + * is set to `true`: * - `create_time` * - `customer` * - `display_name` @@ -60,16 +59,23 @@ class SearchSpacesRequest extends \Google\Protobuf\Internal\Message * - `last_active_time` * - `space_history_state` * - `space_type` + * When `useAdminAccess` is set to `false`: + * - `display_name` + * - `external_user_allowed` + * - `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. + * `customer` is required when `useAdminAccess` is set to `true`, 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`. + * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess` + * is set to `false`, `display_name` is required to retrieve meaningful + * results. Otherwise, the default behavior is to return an empty response. * `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) @@ -86,7 +92,8 @@ class SearchSpacesRequest extends \Google\Protobuf\Internal\Message * `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: + * The following example queries are valid when `useAdminAccess` is set to + * `true`: * ``` * customer = "customers/my_customer" AND space_type = "SPACE" * customer = "customers/my_customer" AND space_type = "SPACE" AND @@ -103,6 +110,16 @@ class SearchSpacesRequest extends \Google\Protobuf\Internal\Message * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") * ``` + * The following example queries are valid when `useAdminAccess` is set to + * `false`: + * ``` + * display_name:"Hello World" AND space_type = "SPACE" + * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE" + * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an + * empty response. + * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = + * "SPACE") + * ``` * * Generated from protobuf field string query = 4 [(.google.api.field_behavior) = REQUIRED]; */ @@ -115,16 +132,22 @@ class SearchSpacesRequest extends \Google\Protobuf\Internal\Message * - `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. + * When `useAdminAccess` is `false`, only `create_time` and `relevance` are + * supported for ordering. Only `DESC` is supported for these fields in + * non-admin searches. * Valid ordering operation values are: * - `ASC` for ascending. Default value. * - `DESC` for descending. - * The supported syntax are: + * The supported syntax are when `useAdminAccess` is set to `true`: * - `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` + * When `useAdminAccess` is set to `false`: + * - `create_time DESC` + * - `relevance DESC` * * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; */ @@ -145,8 +168,6 @@ class SearchSpacesRequest extends \Google\Protobuf\Internal\Message * 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. @@ -161,7 +182,8 @@ class SearchSpacesRequest extends \Google\Protobuf\Internal\Message * might lead to unexpected results. * @type string $query * Required. A search query. - * You can search by using the following parameters: + * You can search by using the following parameters when `useAdminAccess` + * is set to `true`: * - `create_time` * - `customer` * - `display_name` @@ -169,16 +191,23 @@ class SearchSpacesRequest extends \Google\Protobuf\Internal\Message * - `last_active_time` * - `space_history_state` * - `space_type` + * When `useAdminAccess` is set to `false`: + * - `display_name` + * - `external_user_allowed` + * - `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. + * `customer` is required when `useAdminAccess` is set to `true`, 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`. + * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess` + * is set to `false`, `display_name` is required to retrieve meaningful + * results. Otherwise, the default behavior is to return an empty response. * `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) @@ -195,7 +224,8 @@ class SearchSpacesRequest extends \Google\Protobuf\Internal\Message * `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: + * The following example queries are valid when `useAdminAccess` is set to + * `true`: * ``` * customer = "customers/my_customer" AND space_type = "SPACE" * customer = "customers/my_customer" AND space_type = "SPACE" AND @@ -212,6 +242,16 @@ class SearchSpacesRequest extends \Google\Protobuf\Internal\Message * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") * ``` + * The following example queries are valid when `useAdminAccess` is set to + * `false`: + * ``` + * display_name:"Hello World" AND space_type = "SPACE" + * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE" + * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an + * empty response. + * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = + * "SPACE") + * ``` * @type string $order_by * Optional. How the list of spaces is ordered. * Supported attributes to order by are: @@ -220,16 +260,22 @@ class SearchSpacesRequest extends \Google\Protobuf\Internal\Message * - `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. + * When `useAdminAccess` is `false`, only `create_time` and `relevance` are + * supported for ordering. Only `DESC` is supported for these fields in + * non-admin searches. * Valid ordering operation values are: * - `ASC` for ascending. Default value. * - `DESC` for descending. - * The supported syntax are: + * The supported syntax are when `useAdminAccess` is set to `true`: * - `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` + * When `useAdminAccess` is set to `false`: + * - `create_time DESC` + * - `relevance DESC` * } */ public function __construct($data = NULL) { @@ -246,8 +292,6 @@ public function __construct($data = NULL) { * 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 @@ -266,8 +310,6 @@ public function getUseAdminAccess() * 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 @@ -351,7 +393,8 @@ public function setPageToken($var) /** * Required. A search query. - * You can search by using the following parameters: + * You can search by using the following parameters when `useAdminAccess` + * is set to `true`: * - `create_time` * - `customer` * - `display_name` @@ -359,16 +402,23 @@ public function setPageToken($var) * - `last_active_time` * - `space_history_state` * - `space_type` + * When `useAdminAccess` is set to `false`: + * - `display_name` + * - `external_user_allowed` + * - `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. + * `customer` is required when `useAdminAccess` is set to `true`, 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`. + * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess` + * is set to `false`, `display_name` is required to retrieve meaningful + * results. Otherwise, the default behavior is to return an empty response. * `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) @@ -385,7 +435,8 @@ public function setPageToken($var) * `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: + * The following example queries are valid when `useAdminAccess` is set to + * `true`: * ``` * customer = "customers/my_customer" AND space_type = "SPACE" * customer = "customers/my_customer" AND space_type = "SPACE" AND @@ -402,6 +453,16 @@ public function setPageToken($var) * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") * ``` + * The following example queries are valid when `useAdminAccess` is set to + * `false`: + * ``` + * display_name:"Hello World" AND space_type = "SPACE" + * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE" + * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an + * empty response. + * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = + * "SPACE") + * ``` * * Generated from protobuf field string query = 4 [(.google.api.field_behavior) = REQUIRED]; * @return string @@ -413,7 +474,8 @@ public function getQuery() /** * Required. A search query. - * You can search by using the following parameters: + * You can search by using the following parameters when `useAdminAccess` + * is set to `true`: * - `create_time` * - `customer` * - `display_name` @@ -421,16 +483,23 @@ public function getQuery() * - `last_active_time` * - `space_history_state` * - `space_type` + * When `useAdminAccess` is set to `false`: + * - `display_name` + * - `external_user_allowed` + * - `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. + * `customer` is required when `useAdminAccess` is set to `true`, 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`. + * evening was fun`, but not `notFun event` or `even`. When `useAdminAccess` + * is set to `false`, `display_name` is required to retrieve meaningful + * results. Otherwise, the default behavior is to return an empty response. * `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) @@ -447,7 +516,8 @@ public function getQuery() * `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: + * The following example queries are valid when `useAdminAccess` is set to + * `true`: * ``` * customer = "customers/my_customer" AND space_type = "SPACE" * customer = "customers/my_customer" AND space_type = "SPACE" AND @@ -464,6 +534,16 @@ public function getQuery() * "2020-01-01T00:00:00+00:00") AND (external_user_allowed = "true") AND * (space_history_state = "HISTORY_ON" OR space_history_state = "HISTORY_OFF") * ``` + * The following example queries are valid when `useAdminAccess` is set to + * `false`: + * ``` + * display_name:"Hello World" AND space_type = "SPACE" + * (display_name:"Hello" OR display_name:"Fun") AND space_type = "SPACE" + * (external_user_allowed = "true" AND space_type = "SPACE") // Returns an + * empty response. + * (external_user_allowed = "true" AND display_name:"Hello" AND space_type = + * "SPACE") + * ``` * * Generated from protobuf field string query = 4 [(.google.api.field_behavior) = REQUIRED]; * @param string $var @@ -485,16 +565,22 @@ public function setQuery($var) * - `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. + * When `useAdminAccess` is `false`, only `create_time` and `relevance` are + * supported for ordering. Only `DESC` is supported for these fields in + * non-admin searches. * Valid ordering operation values are: * - `ASC` for ascending. Default value. * - `DESC` for descending. - * The supported syntax are: + * The supported syntax are when `useAdminAccess` is set to `true`: * - `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` + * When `useAdminAccess` is set to `false`: + * - `create_time DESC` + * - `relevance DESC` * * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @return string @@ -512,16 +598,22 @@ public function getOrderBy() * - `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. + * When `useAdminAccess` is `false`, only `create_time` and `relevance` are + * supported for ordering. Only `DESC` is supported for these fields in + * non-admin searches. * Valid ordering operation values are: * - `ASC` for ascending. Default value. * - `DESC` for descending. - * The supported syntax are: + * The supported syntax are when `useAdminAccess` is set to `true`: * - `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` + * When `useAdminAccess` is set to `false`: + * - `create_time DESC` + * - `relevance DESC` * * Generated from protobuf field string order_by = 5 [(.google.api.field_behavior) = OPTIONAL]; * @param string $var diff --git a/AppsChat/src/Chat/V1/SearchSpacesResponse.php b/AppsChat/src/Chat/V1/SearchSpacesResponse.php index 1661763cd36..60faeb78190 100644 --- a/AppsChat/src/Chat/V1/SearchSpacesResponse.php +++ b/AppsChat/src/Chat/V1/SearchSpacesResponse.php @@ -16,9 +16,13 @@ class SearchSpacesResponse extends \Google\Protobuf\Internal\Message { /** - * A page of the requested spaces. + * Deprecated: Please use the new `results` field instead. + * A page of the requested spaces. This field will be populated only when + * `useAdminAccess` is set to `true` and deprecated in favor of the new + * `results` field. * - * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; + * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1 [deprecated = true]; + * @deprecated */ private $spaces; /** @@ -35,6 +39,12 @@ class SearchSpacesResponse extends \Google\Protobuf\Internal\Message * Generated from protobuf field int32 total_size = 3; */ protected $total_size = 0; + /** + * Output only. The list of search results that matched the query. + * + * Generated from protobuf field repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + private $results; /** * Constructor. @@ -43,13 +53,18 @@ class SearchSpacesResponse extends \Google\Protobuf\Internal\Message * Optional. Data for populating the Message object. * * @type \Google\Apps\Chat\V1\Space[] $spaces - * A page of the requested spaces. + * Deprecated: Please use the new `results` field instead. + * A page of the requested spaces. This field will be populated only when + * `useAdminAccess` is set to `true` and deprecated in favor of the new + * `results` field. * @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. + * @type \Google\Apps\Chat\V1\SearchSpacesResponse\SearchSpaceResult[] $results + * Output only. The list of search results that matched the query. * } */ public function __construct($data = NULL) { @@ -58,26 +73,40 @@ public function __construct($data = NULL) { } /** - * A page of the requested spaces. + * Deprecated: Please use the new `results` field instead. + * A page of the requested spaces. This field will be populated only when + * `useAdminAccess` is set to `true` and deprecated in favor of the new + * `results` field. * - * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; + * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1 [deprecated = true]; * @return RepeatedField<\Google\Apps\Chat\V1\Space> + * @deprecated */ public function getSpaces() { + if (count($this->spaces) !== 0) { + @trigger_error('spaces is deprecated.', E_USER_DEPRECATED); + } return $this->spaces; } /** - * A page of the requested spaces. + * Deprecated: Please use the new `results` field instead. + * A page of the requested spaces. This field will be populated only when + * `useAdminAccess` is set to `true` and deprecated in favor of the new + * `results` field. * - * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1; + * Generated from protobuf field repeated .google.chat.v1.Space spaces = 1 [deprecated = true]; * @param \Google\Apps\Chat\V1\Space[] $var * @return $this + * @deprecated */ public function setSpaces($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\Space::class); + if (count($arr) !== 0) { + @trigger_error('spaces is deprecated.', E_USER_DEPRECATED); + } $this->spaces = $arr; return $this; @@ -139,5 +168,31 @@ public function setTotalSize($var) return $this; } + /** + * Output only. The list of search results that matched the query. + * + * Generated from protobuf field repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return RepeatedField<\Google\Apps\Chat\V1\SearchSpacesResponse\SearchSpaceResult> + */ + public function getResults() + { + return $this->results; + } + + /** + * Output only. The list of search results that matched the query. + * + * Generated from protobuf field repeated .google.chat.v1.SearchSpacesResponse.SearchSpaceResult results = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Chat\V1\SearchSpacesResponse\SearchSpaceResult[] $var + * @return $this + */ + public function setResults($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Chat\V1\SearchSpacesResponse\SearchSpaceResult::class); + $this->results = $arr; + + return $this; + } + } diff --git a/AppsChat/src/Chat/V1/SearchSpacesResponse/SearchSpaceResult.php b/AppsChat/src/Chat/V1/SearchSpacesResponse/SearchSpaceResult.php new file mode 100644 index 00000000000..50444c998fb --- /dev/null +++ b/AppsChat/src/Chat/V1/SearchSpacesResponse/SearchSpaceResult.php @@ -0,0 +1,77 @@ +google.chat.v1.SearchSpacesResponse.SearchSpaceResult + */ +class SearchSpaceResult extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The matched space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $space = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Chat\V1\Space $space + * Output only. The matched space. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Chat\V1\Space::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The matched space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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); + } + + /** + * Output only. The matched space. + * + * Generated from protobuf field .google.chat.v1.Space space = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @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/AppsChat/src/Chat/V1/gapic_metadata.json b/AppsChat/src/Chat/V1/gapic_metadata.json index 25633adefe6..08e699726bb 100644 --- a/AppsChat/src/Chat/V1/gapic_metadata.json +++ b/AppsChat/src/Chat/V1/gapic_metadata.json @@ -8,7 +8,7 @@ "ChatService": { "clients": { "grpc": { - "libraryClient": "ChatServiceGapicClient", + "libraryClient": "ChatServiceClient", "rpcs": { "CompleteImportSpace": { "methods": [