From 6183bd8b224caeebcdfc0261bf514258c495b134 Mon Sep 17 00:00:00 2001 From: Ajumal Date: Fri, 15 Mar 2024 18:02:15 +0000 Subject: [PATCH] feat(AppsMeet): Add new V2 client surface (#7143) --- AppsMeet/composer.json | 2 +- AppsMeet/metadata/V2/Resource.php | Bin 0 -> 4506 bytes AppsMeet/metadata/V2/Service.php | 135 +++ .../get_conference_record.php | 71 ++ .../get_participant.php | 74 ++ .../get_participant_session.php | 75 ++ .../get_recording.php | 74 ++ .../get_transcript.php | 74 ++ .../get_transcript_entry.php | 79 ++ .../list_conference_records.php | 63 ++ .../list_participant_sessions.php | 84 ++ .../list_participants.php | 80 ++ .../list_recordings.php | 77 ++ .../list_transcript_entries.php | 85 ++ .../list_transcripts.php | 77 ++ .../V2/SpacesServiceClient/create_space.php | 57 ++ .../end_active_conference.php | 69 ++ .../V2/SpacesServiceClient/get_space.php | 71 ++ .../V2/SpacesServiceClient/update_space.php | 59 ++ AppsMeet/src/V2/ActiveConference.php | 75 ++ AppsMeet/src/V2/AnonymousUser.php | 67 ++ .../Client/ConferenceRecordsServiceClient.php | 688 +++++++++++++ .../src/V2/Client/SpacesServiceClient.php | 334 +++++++ AppsMeet/src/V2/ConferenceRecord.php | 253 +++++ AppsMeet/src/V2/CreateSpaceRequest.php | 95 ++ AppsMeet/src/V2/DocsDestination.php | 125 +++ AppsMeet/src/V2/DriveDestination.php | 121 +++ .../src/V2/EndActiveConferenceRequest.php | 81 ++ .../src/V2/GetConferenceRecordRequest.php | 81 ++ AppsMeet/src/V2/GetParticipantRequest.php | 81 ++ .../src/V2/GetParticipantSessionRequest.php | 81 ++ AppsMeet/src/V2/GetRecordingRequest.php | 81 ++ AppsMeet/src/V2/GetSpaceRequest.php | 81 ++ AppsMeet/src/V2/GetTranscriptEntryRequest.php | 81 ++ AppsMeet/src/V2/GetTranscriptRequest.php | 81 ++ .../src/V2/ListConferenceRecordsRequest.php | 175 ++++ .../src/V2/ListConferenceRecordsResponse.php | 105 ++ .../src/V2/ListParticipantSessionsRequest.php | 225 +++++ .../V2/ListParticipantSessionsResponse.php | 105 ++ AppsMeet/src/V2/ListParticipantsRequest.php | 223 +++++ AppsMeet/src/V2/ListParticipantsResponse.php | 151 +++ AppsMeet/src/V2/ListRecordingsRequest.php | 165 +++ AppsMeet/src/V2/ListRecordingsResponse.php | 105 ++ .../src/V2/ListTranscriptEntriesRequest.php | 170 ++++ .../src/V2/ListTranscriptEntriesResponse.php | 105 ++ AppsMeet/src/V2/ListTranscriptsRequest.php | 165 +++ AppsMeet/src/V2/ListTranscriptsResponse.php | 105 ++ AppsMeet/src/V2/Participant.php | 271 +++++ AppsMeet/src/V2/ParticipantSession.php | 163 +++ AppsMeet/src/V2/PhoneUser.php | 68 ++ AppsMeet/src/V2/Recording.php | 249 +++++ AppsMeet/src/V2/Recording/State.php | 70 ++ AppsMeet/src/V2/SignedinUser.php | 116 +++ AppsMeet/src/V2/Space.php | 240 +++++ AppsMeet/src/V2/SpaceConfig.php | 117 +++ AppsMeet/src/V2/SpaceConfig/AccessType.php | 73 ++ .../src/V2/SpaceConfig/EntryPointAccess.php | 65 ++ AppsMeet/src/V2/Transcript.php | 244 +++++ AppsMeet/src/V2/Transcript/State.php | 70 ++ AppsMeet/src/V2/TranscriptEntry.php | 269 +++++ AppsMeet/src/V2/UpdateSpaceRequest.php | 151 +++ AppsMeet/src/V2/gapic_metadata.json | 107 ++ ...ference_records_service_client_config.json | 94 ++ ...ence_records_service_descriptor_config.php | 200 ++++ ...nce_records_service_rest_client_config.php | 134 +++ .../spaces_service_client_config.json | 64 ++ .../spaces_service_descriptor_config.php | 53 + .../spaces_service_rest_client_config.php | 50 + .../ConferenceRecordsServiceClientTest.php | 944 ++++++++++++++++++ .../V2/Client/SpacesServiceClientTest.php | 359 +++++++ 70 files changed, 9681 insertions(+), 1 deletion(-) create mode 100644 AppsMeet/metadata/V2/Resource.php create mode 100644 AppsMeet/metadata/V2/Service.php create mode 100644 AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_conference_record.php create mode 100644 AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_participant.php create mode 100644 AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_participant_session.php create mode 100644 AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_recording.php create mode 100644 AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_transcript.php create mode 100644 AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_transcript_entry.php create mode 100644 AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_conference_records.php create mode 100644 AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_participant_sessions.php create mode 100644 AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_participants.php create mode 100644 AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_recordings.php create mode 100644 AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_transcript_entries.php create mode 100644 AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_transcripts.php create mode 100644 AppsMeet/samples/V2/SpacesServiceClient/create_space.php create mode 100644 AppsMeet/samples/V2/SpacesServiceClient/end_active_conference.php create mode 100644 AppsMeet/samples/V2/SpacesServiceClient/get_space.php create mode 100644 AppsMeet/samples/V2/SpacesServiceClient/update_space.php create mode 100644 AppsMeet/src/V2/ActiveConference.php create mode 100644 AppsMeet/src/V2/AnonymousUser.php create mode 100644 AppsMeet/src/V2/Client/ConferenceRecordsServiceClient.php create mode 100644 AppsMeet/src/V2/Client/SpacesServiceClient.php create mode 100644 AppsMeet/src/V2/ConferenceRecord.php create mode 100644 AppsMeet/src/V2/CreateSpaceRequest.php create mode 100644 AppsMeet/src/V2/DocsDestination.php create mode 100644 AppsMeet/src/V2/DriveDestination.php create mode 100644 AppsMeet/src/V2/EndActiveConferenceRequest.php create mode 100644 AppsMeet/src/V2/GetConferenceRecordRequest.php create mode 100644 AppsMeet/src/V2/GetParticipantRequest.php create mode 100644 AppsMeet/src/V2/GetParticipantSessionRequest.php create mode 100644 AppsMeet/src/V2/GetRecordingRequest.php create mode 100644 AppsMeet/src/V2/GetSpaceRequest.php create mode 100644 AppsMeet/src/V2/GetTranscriptEntryRequest.php create mode 100644 AppsMeet/src/V2/GetTranscriptRequest.php create mode 100644 AppsMeet/src/V2/ListConferenceRecordsRequest.php create mode 100644 AppsMeet/src/V2/ListConferenceRecordsResponse.php create mode 100644 AppsMeet/src/V2/ListParticipantSessionsRequest.php create mode 100644 AppsMeet/src/V2/ListParticipantSessionsResponse.php create mode 100644 AppsMeet/src/V2/ListParticipantsRequest.php create mode 100644 AppsMeet/src/V2/ListParticipantsResponse.php create mode 100644 AppsMeet/src/V2/ListRecordingsRequest.php create mode 100644 AppsMeet/src/V2/ListRecordingsResponse.php create mode 100644 AppsMeet/src/V2/ListTranscriptEntriesRequest.php create mode 100644 AppsMeet/src/V2/ListTranscriptEntriesResponse.php create mode 100644 AppsMeet/src/V2/ListTranscriptsRequest.php create mode 100644 AppsMeet/src/V2/ListTranscriptsResponse.php create mode 100644 AppsMeet/src/V2/Participant.php create mode 100644 AppsMeet/src/V2/ParticipantSession.php create mode 100644 AppsMeet/src/V2/PhoneUser.php create mode 100644 AppsMeet/src/V2/Recording.php create mode 100644 AppsMeet/src/V2/Recording/State.php create mode 100644 AppsMeet/src/V2/SignedinUser.php create mode 100644 AppsMeet/src/V2/Space.php create mode 100644 AppsMeet/src/V2/SpaceConfig.php create mode 100644 AppsMeet/src/V2/SpaceConfig/AccessType.php create mode 100644 AppsMeet/src/V2/SpaceConfig/EntryPointAccess.php create mode 100644 AppsMeet/src/V2/Transcript.php create mode 100644 AppsMeet/src/V2/Transcript/State.php create mode 100644 AppsMeet/src/V2/TranscriptEntry.php create mode 100644 AppsMeet/src/V2/UpdateSpaceRequest.php create mode 100644 AppsMeet/src/V2/gapic_metadata.json create mode 100644 AppsMeet/src/V2/resources/conference_records_service_client_config.json create mode 100644 AppsMeet/src/V2/resources/conference_records_service_descriptor_config.php create mode 100644 AppsMeet/src/V2/resources/conference_records_service_rest_client_config.php create mode 100644 AppsMeet/src/V2/resources/spaces_service_client_config.json create mode 100644 AppsMeet/src/V2/resources/spaces_service_descriptor_config.php create mode 100644 AppsMeet/src/V2/resources/spaces_service_rest_client_config.php create mode 100644 AppsMeet/tests/Unit/V2/Client/ConferenceRecordsServiceClientTest.php create mode 100644 AppsMeet/tests/Unit/V2/Client/SpacesServiceClientTest.php diff --git a/AppsMeet/composer.json b/AppsMeet/composer.json index caac3fb397e8..43b15fcf9ec0 100644 --- a/AppsMeet/composer.json +++ b/AppsMeet/composer.json @@ -18,7 +18,7 @@ }, "require": { "php": "^8.0", - "google/gax": "^1.30" + "google/gax": "^1.30.0" }, "require-dev": { "phpunit/phpunit": "^9.0" diff --git a/AppsMeet/metadata/V2/Resource.php b/AppsMeet/metadata/V2/Resource.php new file mode 100644 index 0000000000000000000000000000000000000000..7dd64e4c8eaea3cbe4ee13cf3721a5af1221eda5 GIT binary patch literal 4506 zcmdT|zi-<{6pkd@v7cgFrrXAGkc4KO#Bow7VKStQlZLWo*M%($k{lqd0D`8@G7Fg` zNXm_xszCpY3|%_*f9TMuK)0e@3j`UBZrwWd-JL{IGHVOSP*jV^mMLQOa)Enu^HU zHX>`!<;MUZDK*XQZ+H0DI==r*je~YH4nU?9Bdei(0*ZxG@*P9+e@JZSI zmSy;+ZHW}HV;N-Ww#ao-*+s|3y*?3pYbnv~2`Nos?OXOm-reL<-{VNh`!q*(b+}OC4S4b9nw zBhz*jCEQi0NBMm&sCUWhu3?NAmoo0B8=-Z2nsJ6C)iuG3WPI&3P#Om4ML-rJ*nbBb1YK2{ExW zkx#u*M};{^(>YA5p|xCdF4_B%5-!1o-WS8Jletv*=^l(3wzY3I=0F^dv~C#0^EAKh zaQjZlcVagdfn`;OsUk$!27y?<+twT#`J{1e%pFtm{WBF6D6~Y8T%}Y3h$z1d7uD6( zLZzZrUz7^kZn07-tZuGv7S=N7gmDqRCh{h7q! zz{}jcCwV$9JOIFx==vIEH?vDxp6}VENBwMYU@5s%!hIMgR-HpAeTRTNgfw~Sm@eU{ zk>ODHV3g60orj710wdGqQ|PL+j#YO!vI#dr&T{)8$-|*8jXTQ`YInutOeoeR?(Zo` zm(Yx+VLH0y3kpnnX2T+N)6!ZVap(Ak7kZYB2BB=FE4hn;pPUm`U`n@at9@vO=%f;WB24?lw(~)LMih=ZEv$BbaVtC4ks~ zDdR&Sm2VTr>NjvLE?z_}{A|z%vEIu$p;J&G^43|t5P9?DbmT2R1|!sK(r-x+N}+}d zMj}l9|KT}OenRW~n1GvSn5VbWFW%KkQ3H0B_S;eOxKTRGvk?pSL}lURptJ%PqLioR zq}C48Crgrb({q}7TVt6u%%9RSO!je}Ce%LJAPc9Yn=lcu{4}{gQZT_!GA3-A&gw4B zsdeP9Xq#QSp%g@>cZNB#7Oui?U#{NMTU^|9K9 zt8x4Y_b5Cajv#*EA7n`Q(pgT2FP;qH%OFWqm>zHx9)WRmbn6gH$f0=hItA0!U>&Tk ziwgoP5Y0B-=Ad?qRW}P~r#@t^PhR@b&S4%Vo4VC#=?&TmU{^uo18YT610~*YQJ}BH z<3+?-fkXKYQ`74NTtD5N+$hC&^Jxwp;$mfzdqp4GSfqt+r4!&MdAfh7o&P=o7qPF2 zi@5p8UN_5n)KcQJ`$p4l)qAqE9ctK-TM2BE@M41Q)Y*H?|9(i$Zm=teEWLurZqp9) zx%^9Sw8n2H_|*j7O&ljb;Nprx?RH^$2D2e*PY_bzYsBR2yyg_uUntpJnc Ky?X~b0RI3xh^;^X literal 0 HcmV?d00001 diff --git a/AppsMeet/metadata/V2/Service.php b/AppsMeet/metadata/V2/Service.php new file mode 100644 index 000000000000..51b98cc90a2d --- /dev/null +++ b/AppsMeet/metadata/V2/Service.php @@ -0,0 +1,135 @@ +internalAddGeneratedFile( + ' +ä, +!google/apps/meet/v2/service.protogoogle.apps.meet.v2google/api/client.protogoogle/api/field_behavior.protogoogle/api/resource.proto"google/apps/meet/v2/resource.protogoogle/protobuf/empty.proto google/protobuf/field_mask.proto"? +CreateSpaceRequest) +space ( 2.google.apps.meet.v2.Space"B +GetSpaceRequest/ +name ( B!àAúA +meet.googleapis.com/Space"z +UpdateSpaceRequest. +space ( 2.google.apps.meet.v2.SpaceBàA4 + update_mask ( 2.google.protobuf.FieldMaskBàA"M +EndActiveConferenceRequest/ +name ( B!àAúA +meet.googleapis.com/Space"X +GetConferenceRecordRequest: +name ( B,àAúA& +$meet.googleapis.com/ConferenceRecord"d +ListConferenceRecordsRequest + page_size (BàA + +page_token ( BàA +filter ( BàA"{ +ListConferenceRecordsResponseA +conference_records ( 2%.google.apps.meet.v2.ConferenceRecord +next_page_token ( "N +GetParticipantRequest5 +name ( B\'àAúA! +meet.googleapis.com/Participant"Ž +ListParticipantsRequest7 +parent ( B\'àAúA!meet.googleapis.com/Participant + page_size ( + +page_token (  +filter ( BàA" +ListParticipantsResponse6 + participants ( 2 .google.apps.meet.v2.Participant +next_page_token (  + +total_size ("\\ +GetParticipantSessionRequest< +name ( B.àAúA( +&meet.googleapis.com/ParticipantSession"¦ +ListParticipantSessionsRequest> +parent ( B.àAúA(&meet.googleapis.com/ParticipantSession + page_size (BàA + +page_token ( BàA +filter ( BàA" +ListParticipantSessionsResponseE +participant_sessions ( 2\'.google.apps.meet.v2.ParticipantSession +next_page_token ( "J +GetRecordingRequest3 +name ( B%àAúA +meet.googleapis.com/Recording"u +ListRecordingsRequest5 +parent ( B%àAúAmeet.googleapis.com/Recording + page_size ( + +page_token ( "e +ListRecordingsResponse2 + +recordings ( 2.google.apps.meet.v2.Recording +next_page_token ( "L +GetTranscriptRequest4 +name ( B&àAúA +meet.googleapis.com/Transcript"w +ListTranscriptsRequest6 +parent ( B&àAúA meet.googleapis.com/Transcript + page_size ( + +page_token ( "h +ListTranscriptsResponse4 + transcripts ( 2.google.apps.meet.v2.Transcript +next_page_token ( "V +GetTranscriptEntryRequest9 +name ( B+àAúA% +#meet.googleapis.com/TranscriptEntry"‚ +ListTranscriptEntriesRequest; +parent ( B+àAúA%#meet.googleapis.com/TranscriptEntry + page_size ( + +page_token ( "z +ListTranscriptEntriesResponse@ +transcript_entries ( 2$.google.apps.meet.v2.TranscriptEntry +next_page_token ( 2± + SpacesServiceu + CreateSpace\'.google.apps.meet.v2.CreateSpaceRequest.google.apps.meet.v2.Space"!ÚAspace‚Óä“" +/v2/spaces:spacep +GetSpace$.google.apps.meet.v2.GetSpaceRequest.google.apps.meet.v2.Space""ÚAname‚Óä“/v2/{name=spaces/*} + UpdateSpace\'.google.apps.meet.v2.UpdateSpaceRequest.google.apps.meet.v2.Space"<ÚAspace,update_mask‚Óä“"2/v2/{space.name=spaces/*}:space™ +EndActiveConference/.google.apps.meet.v2.EndActiveConferenceRequest.google.protobuf.Empty"9ÚAname‚Óä“,"\'/v2/{name=spaces/*}:endActiveConference:*‡ÊAmeet.googleapis.comÒAnhttps://www.googleapis.com/auth/meetings.space.created,https://www.googleapis.com/auth/meetings.space.readonly2ã +ConferenceRecordsServiceœ +GetConferenceRecord/.google.apps.meet.v2.GetConferenceRecordRequest%.google.apps.meet.v2.ConferenceRecord"-ÚAname‚Óä“ /v2/{name=conferenceRecords/*} +ListConferenceRecords1.google.apps.meet.v2.ListConferenceRecordsRequest2.google.apps.meet.v2.ListConferenceRecordsResponse"‚Óä“/v2/conferenceRecordsœ +GetParticipant*.google.apps.meet.v2.GetParticipantRequest .google.apps.meet.v2.Participant"<ÚAname‚Óä“/-/v2/{name=conferenceRecords/*/participants/*}¯ +ListParticipants,.google.apps.meet.v2.ListParticipantsRequest-.google.apps.meet.v2.ListParticipantsResponse">ÚAparent‚Óä“/-/v2/{parent=conferenceRecords/*}/participantsÇ +GetParticipantSession1.google.apps.meet.v2.GetParticipantSessionRequest\'.google.apps.meet.v2.ParticipantSession"RÚAname‚Óä“EC/v2/{name=conferenceRecords/*/participants/*/participantSessions/*}Ú +ListParticipantSessions3.google.apps.meet.v2.ListParticipantSessionsRequest4.google.apps.meet.v2.ListParticipantSessionsResponse"TÚAparent‚Óä“EC/v2/{parent=conferenceRecords/*/participants/*}/participantSessions” + GetRecording(.google.apps.meet.v2.GetRecordingRequest.google.apps.meet.v2.Recording":ÚAname‚Óä“-+/v2/{name=conferenceRecords/*/recordings/*}§ +ListRecordings*.google.apps.meet.v2.ListRecordingsRequest+.google.apps.meet.v2.ListRecordingsResponse"<ÚAparent‚Óä“-+/v2/{parent=conferenceRecords/*}/recordings˜ + GetTranscript).google.apps.meet.v2.GetTranscriptRequest.google.apps.meet.v2.Transcript";ÚAname‚Óä“.,/v2/{name=conferenceRecords/*/transcripts/*}« +ListTranscripts+.google.apps.meet.v2.ListTranscriptsRequest,.google.apps.meet.v2.ListTranscriptsResponse"=ÚAparent‚Óä“.,/v2/{parent=conferenceRecords/*}/transcripts± +GetTranscriptEntry..google.apps.meet.v2.GetTranscriptEntryRequest$.google.apps.meet.v2.TranscriptEntry"EÚAname‚Óä“86/v2/{name=conferenceRecords/*/transcripts/*/entries/*}Ç +ListTranscriptEntries1.google.apps.meet.v2.ListTranscriptEntriesRequest2.google.apps.meet.v2.ListTranscriptEntriesResponse"GÚAparent‚Óä“86/v2/{parent=conferenceRecords/*/transcripts/*}/entries‡ÊAmeet.googleapis.comÒAnhttps://www.googleapis.com/auth/meetings.space.created,https://www.googleapis.com/auth/meetings.space.readonlyB¡ +com.google.apps.meet.v2B ServiceProtoPZ1cloud.google.com/go/apps/meet/apiv2/meetpb;meetpbªGoogle.Apps.Meet.V2ÊGoogle\\Apps\\Meet\\V2êGoogle::Apps::Meet::V2bproto3' + , true); + + static::$is_initialized = true; + } +} + diff --git a/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_conference_record.php b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_conference_record.php new file mode 100644 index 000000000000..61180acbcdf0 --- /dev/null +++ b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_conference_record.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ConferenceRecord $response */ + $response = $conferenceRecordsServiceClient->getConferenceRecord($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 = ConferenceRecordsServiceClient::conferenceRecordName('[CONFERENCE_RECORD]'); + + get_conference_record_sample($formattedName); +} +// [END meet_v2_generated_ConferenceRecordsService_GetConferenceRecord_sync] diff --git a/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_participant.php b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_participant.php new file mode 100644 index 000000000000..ad2ec6931e4c --- /dev/null +++ b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_participant.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Participant $response */ + $response = $conferenceRecordsServiceClient->getParticipant($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 = ConferenceRecordsServiceClient::participantName( + '[CONFERENCE_RECORD]', + '[PARTICIPANT]' + ); + + get_participant_sample($formattedName); +} +// [END meet_v2_generated_ConferenceRecordsService_GetParticipant_sync] diff --git a/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_participant_session.php b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_participant_session.php new file mode 100644 index 000000000000..acf23cf864bc --- /dev/null +++ b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_participant_session.php @@ -0,0 +1,75 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var ParticipantSession $response */ + $response = $conferenceRecordsServiceClient->getParticipantSession($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 = ConferenceRecordsServiceClient::participantSessionName( + '[CONFERENCE_RECORD]', + '[PARTICIPANT]', + '[PARTICIPANT_SESSION]' + ); + + get_participant_session_sample($formattedName); +} +// [END meet_v2_generated_ConferenceRecordsService_GetParticipantSession_sync] diff --git a/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_recording.php b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_recording.php new file mode 100644 index 000000000000..ec784301f85f --- /dev/null +++ b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_recording.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Recording $response */ + $response = $conferenceRecordsServiceClient->getRecording($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 = ConferenceRecordsServiceClient::recordingName( + '[CONFERENCE_RECORD]', + '[RECORDING]' + ); + + get_recording_sample($formattedName); +} +// [END meet_v2_generated_ConferenceRecordsService_GetRecording_sync] diff --git a/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_transcript.php b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_transcript.php new file mode 100644 index 000000000000..50a416dc9d6f --- /dev/null +++ b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_transcript.php @@ -0,0 +1,74 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Transcript $response */ + $response = $conferenceRecordsServiceClient->getTranscript($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 = ConferenceRecordsServiceClient::transcriptName( + '[CONFERENCE_RECORD]', + '[TRANSCRIPT]' + ); + + get_transcript_sample($formattedName); +} +// [END meet_v2_generated_ConferenceRecordsService_GetTranscript_sync] diff --git a/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_transcript_entry.php b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_transcript_entry.php new file mode 100644 index 000000000000..4616553ce469 --- /dev/null +++ b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_transcript_entry.php @@ -0,0 +1,79 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var TranscriptEntry $response */ + $response = $conferenceRecordsServiceClient->getTranscriptEntry($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 = ConferenceRecordsServiceClient::transcriptEntryName( + '[CONFERENCE_RECORD]', + '[TRANSCRIPT]', + '[ENTRY]' + ); + + get_transcript_entry_sample($formattedName); +} +// [END meet_v2_generated_ConferenceRecordsService_GetTranscriptEntry_sync] diff --git a/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_conference_records.php b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_conference_records.php new file mode 100644 index 000000000000..249e794704c2 --- /dev/null +++ b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_conference_records.php @@ -0,0 +1,63 @@ +listConferenceRecords($request); + + /** @var ConferenceRecord $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 meet_v2_generated_ConferenceRecordsService_ListConferenceRecords_sync] diff --git a/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_participant_sessions.php b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_participant_sessions.php new file mode 100644 index 000000000000..b1ae44b02ecc --- /dev/null +++ b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_participant_sessions.php @@ -0,0 +1,84 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conferenceRecordsServiceClient->listParticipantSessions($request); + + /** @var ParticipantSession $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 = ConferenceRecordsServiceClient::participantName( + '[CONFERENCE_RECORD]', + '[PARTICIPANT]' + ); + + list_participant_sessions_sample($formattedParent); +} +// [END meet_v2_generated_ConferenceRecordsService_ListParticipantSessions_sync] diff --git a/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_participants.php b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_participants.php new file mode 100644 index 000000000000..344c2ec09698 --- /dev/null +++ b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_participants.php @@ -0,0 +1,80 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conferenceRecordsServiceClient->listParticipants($request); + + /** @var Participant $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 = ConferenceRecordsServiceClient::conferenceRecordName('[CONFERENCE_RECORD]'); + + list_participants_sample($formattedParent); +} +// [END meet_v2_generated_ConferenceRecordsService_ListParticipants_sync] diff --git a/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_recordings.php b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_recordings.php new file mode 100644 index 000000000000..cc8a6dba923c --- /dev/null +++ b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_recordings.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conferenceRecordsServiceClient->listRecordings($request); + + /** @var Recording $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 = ConferenceRecordsServiceClient::conferenceRecordName('[CONFERENCE_RECORD]'); + + list_recordings_sample($formattedParent); +} +// [END meet_v2_generated_ConferenceRecordsService_ListRecordings_sync] diff --git a/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_transcript_entries.php b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_transcript_entries.php new file mode 100644 index 000000000000..b555b0695f18 --- /dev/null +++ b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_transcript_entries.php @@ -0,0 +1,85 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conferenceRecordsServiceClient->listTranscriptEntries($request); + + /** @var TranscriptEntry $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 = ConferenceRecordsServiceClient::transcriptName( + '[CONFERENCE_RECORD]', + '[TRANSCRIPT]' + ); + + list_transcript_entries_sample($formattedParent); +} +// [END meet_v2_generated_ConferenceRecordsService_ListTranscriptEntries_sync] diff --git a/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_transcripts.php b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_transcripts.php new file mode 100644 index 000000000000..faf747071f1c --- /dev/null +++ b/AppsMeet/samples/V2/ConferenceRecordsServiceClient/list_transcripts.php @@ -0,0 +1,77 @@ +setParent($formattedParent); + + // Call the API and handle any network failures. + try { + /** @var PagedListResponse $response */ + $response = $conferenceRecordsServiceClient->listTranscripts($request); + + /** @var Transcript $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 = ConferenceRecordsServiceClient::conferenceRecordName('[CONFERENCE_RECORD]'); + + list_transcripts_sample($formattedParent); +} +// [END meet_v2_generated_ConferenceRecordsService_ListTranscripts_sync] diff --git a/AppsMeet/samples/V2/SpacesServiceClient/create_space.php b/AppsMeet/samples/V2/SpacesServiceClient/create_space.php new file mode 100644 index 000000000000..6bf1efd6f128 --- /dev/null +++ b/AppsMeet/samples/V2/SpacesServiceClient/create_space.php @@ -0,0 +1,57 @@ +createSpace($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END meet_v2_generated_SpacesService_CreateSpace_sync] diff --git a/AppsMeet/samples/V2/SpacesServiceClient/end_active_conference.php b/AppsMeet/samples/V2/SpacesServiceClient/end_active_conference.php new file mode 100644 index 000000000000..5c19f9d55e79 --- /dev/null +++ b/AppsMeet/samples/V2/SpacesServiceClient/end_active_conference.php @@ -0,0 +1,69 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + $spacesServiceClient->endActiveConference($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 = SpacesServiceClient::spaceName('[SPACE]'); + + end_active_conference_sample($formattedName); +} +// [END meet_v2_generated_SpacesService_EndActiveConference_sync] diff --git a/AppsMeet/samples/V2/SpacesServiceClient/get_space.php b/AppsMeet/samples/V2/SpacesServiceClient/get_space.php new file mode 100644 index 000000000000..daf88d156dfb --- /dev/null +++ b/AppsMeet/samples/V2/SpacesServiceClient/get_space.php @@ -0,0 +1,71 @@ +setName($formattedName); + + // Call the API and handle any network failures. + try { + /** @var Space $response */ + $response = $spacesServiceClient->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 = SpacesServiceClient::spaceName('[SPACE]'); + + get_space_sample($formattedName); +} +// [END meet_v2_generated_SpacesService_GetSpace_sync] diff --git a/AppsMeet/samples/V2/SpacesServiceClient/update_space.php b/AppsMeet/samples/V2/SpacesServiceClient/update_space.php new file mode 100644 index 000000000000..a9552a740d85 --- /dev/null +++ b/AppsMeet/samples/V2/SpacesServiceClient/update_space.php @@ -0,0 +1,59 @@ +setSpace($space); + + // Call the API and handle any network failures. + try { + /** @var Space $response */ + $response = $spacesServiceClient->updateSpace($request); + printf('Response data: %s' . PHP_EOL, $response->serializeToJsonString()); + } catch (ApiException $ex) { + printf('Call failed with message: %s' . PHP_EOL, $ex->getMessage()); + } +} +// [END meet_v2_generated_SpacesService_UpdateSpace_sync] diff --git a/AppsMeet/src/V2/ActiveConference.php b/AppsMeet/src/V2/ActiveConference.php new file mode 100644 index 000000000000..ab7487c49e2a --- /dev/null +++ b/AppsMeet/src/V2/ActiveConference.php @@ -0,0 +1,75 @@ +google.apps.meet.v2.ActiveConference + */ +class ActiveConference extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Reference to 'ConferenceRecord' resource. + * Format: `conferenceRecords/{conference_record}` where `{conference_record}` + * is a unique ID for each instance of a call within a space. + * + * Generated from protobuf field string conference_record = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $conference_record = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $conference_record + * Output only. Reference to 'ConferenceRecord' resource. + * Format: `conferenceRecords/{conference_record}` where `{conference_record}` + * is a unique ID for each instance of a call within a space. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Reference to 'ConferenceRecord' resource. + * Format: `conferenceRecords/{conference_record}` where `{conference_record}` + * is a unique ID for each instance of a call within a space. + * + * Generated from protobuf field string conference_record = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getConferenceRecord() + { + return $this->conference_record; + } + + /** + * Output only. Reference to 'ConferenceRecord' resource. + * Format: `conferenceRecords/{conference_record}` where `{conference_record}` + * is a unique ID for each instance of a call within a space. + * + * Generated from protobuf field string conference_record = 1 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setConferenceRecord($var) + { + GPBUtil::checkString($var, True); + $this->conference_record = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/AnonymousUser.php b/AppsMeet/src/V2/AnonymousUser.php new file mode 100644 index 000000000000..d5fac10bcb7b --- /dev/null +++ b/AppsMeet/src/V2/AnonymousUser.php @@ -0,0 +1,67 @@ +google.apps.meet.v2.AnonymousUser + */ +class AnonymousUser extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. User provided name when they join a conference anonymously. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Output only. User provided name when they join a conference anonymously. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Output only. User provided name when they join a conference anonymously. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. User provided name when they join a conference anonymously. + * + * Generated from protobuf field string display_name = 1 [(.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; + } + +} + diff --git a/AppsMeet/src/V2/Client/ConferenceRecordsServiceClient.php b/AppsMeet/src/V2/Client/ConferenceRecordsServiceClient.php new file mode 100644 index 000000000000..805549154df5 --- /dev/null +++ b/AppsMeet/src/V2/Client/ConferenceRecordsServiceClient.php @@ -0,0 +1,688 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/conference_records_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/conference_records_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/conference_records_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => + __DIR__ . '/../resources/conference_records_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * conference_record resource. + * + * @param string $conferenceRecord + * + * @return string The formatted conference_record resource. + */ + public static function conferenceRecordName(string $conferenceRecord): string + { + return self::getPathTemplate('conferenceRecord')->render([ + 'conference_record' => $conferenceRecord, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a participant + * resource. + * + * @param string $conferenceRecord + * @param string $participant + * + * @return string The formatted participant resource. + */ + public static function participantName(string $conferenceRecord, string $participant): string + { + return self::getPathTemplate('participant')->render([ + 'conference_record' => $conferenceRecord, + 'participant' => $participant, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * participant_session resource. + * + * @param string $conferenceRecord + * @param string $participant + * @param string $participantSession + * + * @return string The formatted participant_session resource. + */ + public static function participantSessionName( + string $conferenceRecord, + string $participant, + string $participantSession + ): string { + return self::getPathTemplate('participantSession')->render([ + 'conference_record' => $conferenceRecord, + 'participant' => $participant, + 'participant_session' => $participantSession, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a recording + * resource. + * + * @param string $conferenceRecord + * @param string $recording + * + * @return string The formatted recording resource. + */ + public static function recordingName(string $conferenceRecord, string $recording): string + { + return self::getPathTemplate('recording')->render([ + 'conference_record' => $conferenceRecord, + 'recording' => $recording, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a transcript + * resource. + * + * @param string $conferenceRecord + * @param string $transcript + * + * @return string The formatted transcript resource. + */ + public static function transcriptName(string $conferenceRecord, string $transcript): string + { + return self::getPathTemplate('transcript')->render([ + 'conference_record' => $conferenceRecord, + 'transcript' => $transcript, + ]); + } + + /** + * Formats a string containing the fully-qualified path to represent a + * transcript_entry resource. + * + * @param string $conferenceRecord + * @param string $transcript + * @param string $entry + * + * @return string The formatted transcript_entry resource. + */ + public static function transcriptEntryName(string $conferenceRecord, string $transcript, string $entry): string + { + return self::getPathTemplate('transcriptEntry')->render([ + 'conference_record' => $conferenceRecord, + 'transcript' => $transcript, + 'entry' => $entry, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - conferenceRecord: conferenceRecords/{conference_record} + * - participant: conferenceRecords/{conference_record}/participants/{participant} + * - participantSession: conferenceRecords/{conference_record}/participants/{participant}/participantSessions/{participant_session} + * - recording: conferenceRecords/{conference_record}/recordings/{recording} + * - transcript: conferenceRecords/{conference_record}/transcripts/{transcript} + * - transcriptEntry: conferenceRecords/{conference_record}/transcripts/{transcript}/entries/{entry} + * + * 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 'meet.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); + } + + /** + * Gets a conference record by conference ID. + * + * The async variant is + * {@see ConferenceRecordsServiceClient::getConferenceRecordAsync()} . + * + * @example samples/V2/ConferenceRecordsServiceClient/get_conference_record.php + * + * @param GetConferenceRecordRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ConferenceRecord + * + * @throws ApiException Thrown if the API call fails. + */ + public function getConferenceRecord(GetConferenceRecordRequest $request, array $callOptions = []): ConferenceRecord + { + return $this->startApiCall('GetConferenceRecord', $request, $callOptions)->wait(); + } + + /** + * Gets a participant by participant ID. + * + * The async variant is + * {@see ConferenceRecordsServiceClient::getParticipantAsync()} . + * + * @example samples/V2/ConferenceRecordsServiceClient/get_participant.php + * + * @param GetParticipantRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Participant + * + * @throws ApiException Thrown if the API call fails. + */ + public function getParticipant(GetParticipantRequest $request, array $callOptions = []): Participant + { + return $this->startApiCall('GetParticipant', $request, $callOptions)->wait(); + } + + /** + * Gets a participant session by participant session ID. + * + * The async variant is + * {@see ConferenceRecordsServiceClient::getParticipantSessionAsync()} . + * + * @example samples/V2/ConferenceRecordsServiceClient/get_participant_session.php + * + * @param GetParticipantSessionRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return ParticipantSession + * + * @throws ApiException Thrown if the API call fails. + */ + public function getParticipantSession( + GetParticipantSessionRequest $request, + array $callOptions = [] + ): ParticipantSession { + return $this->startApiCall('GetParticipantSession', $request, $callOptions)->wait(); + } + + /** + * Gets a recording by recording ID. + * + * The async variant is {@see ConferenceRecordsServiceClient::getRecordingAsync()} + * . + * + * @example samples/V2/ConferenceRecordsServiceClient/get_recording.php + * + * @param GetRecordingRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Recording + * + * @throws ApiException Thrown if the API call fails. + */ + public function getRecording(GetRecordingRequest $request, array $callOptions = []): Recording + { + return $this->startApiCall('GetRecording', $request, $callOptions)->wait(); + } + + /** + * Gets a transcript by transcript ID. + * + * The async variant is {@see ConferenceRecordsServiceClient::getTranscriptAsync()} + * . + * + * @example samples/V2/ConferenceRecordsServiceClient/get_transcript.php + * + * @param GetTranscriptRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return Transcript + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTranscript(GetTranscriptRequest $request, array $callOptions = []): Transcript + { + return $this->startApiCall('GetTranscript', $request, $callOptions)->wait(); + } + + /** + * Gets a `TranscriptEntry` resource by entry ID. + * + * Note: The transcript entries returned by the Google Meet API might not + * match the transcription found in the Google Docs transcript file. This can + * occur when the Google Docs transcript file is modified after generation. + * + * The async variant is + * {@see ConferenceRecordsServiceClient::getTranscriptEntryAsync()} . + * + * @example samples/V2/ConferenceRecordsServiceClient/get_transcript_entry.php + * + * @param GetTranscriptEntryRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. Can be a {@see RetrySettings} object, or an + * associative array of retry settings parameters. See the documentation on + * {@see RetrySettings} for example usage. + * } + * + * @return TranscriptEntry + * + * @throws ApiException Thrown if the API call fails. + */ + public function getTranscriptEntry(GetTranscriptEntryRequest $request, array $callOptions = []): TranscriptEntry + { + return $this->startApiCall('GetTranscriptEntry', $request, $callOptions)->wait(); + } + + /** + * Lists the conference records. By default, ordered by start time and in + * descending order. + * + * The async variant is + * {@see ConferenceRecordsServiceClient::listConferenceRecordsAsync()} . + * + * @example samples/V2/ConferenceRecordsServiceClient/list_conference_records.php + * + * @param ListConferenceRecordsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listConferenceRecords( + ListConferenceRecordsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListConferenceRecords', $request, $callOptions); + } + + /** + * Lists the participant sessions of a participant in a conference record. By + * default, ordered by join time and in descending order. This API supports + * `fields` as standard parameters like every other API. However, when the + * `fields` request parameter is omitted this API defaults to + * `'participantsessions/*, next_page_token'`. + * + * The async variant is + * {@see ConferenceRecordsServiceClient::listParticipantSessionsAsync()} . + * + * @example samples/V2/ConferenceRecordsServiceClient/list_participant_sessions.php + * + * @param ListParticipantSessionsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listParticipantSessions( + ListParticipantSessionsRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListParticipantSessions', $request, $callOptions); + } + + /** + * Lists the participants in a conference record. By default, ordered by join + * time and in descending order. This API supports `fields` as standard + * parameters like every other API. However, when the `fields` request + * parameter is omitted, this API defaults to `'participants/*, + * next_page_token'`. + * + * The async variant is + * {@see ConferenceRecordsServiceClient::listParticipantsAsync()} . + * + * @example samples/V2/ConferenceRecordsServiceClient/list_participants.php + * + * @param ListParticipantsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listParticipants(ListParticipantsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListParticipants', $request, $callOptions); + } + + /** + * Lists the recording resources from the conference record. By default, + * ordered by start time and in ascending order. + * + * The async variant is + * {@see ConferenceRecordsServiceClient::listRecordingsAsync()} . + * + * @example samples/V2/ConferenceRecordsServiceClient/list_recordings.php + * + * @param ListRecordingsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listRecordings(ListRecordingsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListRecordings', $request, $callOptions); + } + + /** + * Lists the structured transcript entries per transcript. By default, ordered + * by start time and in ascending order. + * + * Note: The transcript entries returned by the Google Meet API might not + * match the transcription found in the Google Docs transcript file. This can + * occur when the Google Docs transcript file is modified after generation. + * + * The async variant is + * {@see ConferenceRecordsServiceClient::listTranscriptEntriesAsync()} . + * + * @example samples/V2/ConferenceRecordsServiceClient/list_transcript_entries.php + * + * @param ListTranscriptEntriesRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTranscriptEntries( + ListTranscriptEntriesRequest $request, + array $callOptions = [] + ): PagedListResponse { + return $this->startApiCall('ListTranscriptEntries', $request, $callOptions); + } + + /** + * Lists the set of transcripts from the conference record. By default, + * ordered by start time and in ascending order. + * + * The async variant is + * {@see ConferenceRecordsServiceClient::listTranscriptsAsync()} . + * + * @example samples/V2/ConferenceRecordsServiceClient/list_transcripts.php + * + * @param ListTranscriptsRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this call. 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 listTranscripts(ListTranscriptsRequest $request, array $callOptions = []): PagedListResponse + { + return $this->startApiCall('ListTranscripts', $request, $callOptions); + } +} diff --git a/AppsMeet/src/V2/Client/SpacesServiceClient.php b/AppsMeet/src/V2/Client/SpacesServiceClient.php new file mode 100644 index 000000000000..381f8fb71fbd --- /dev/null +++ b/AppsMeet/src/V2/Client/SpacesServiceClient.php @@ -0,0 +1,334 @@ + self::SERVICE_NAME, + 'apiEndpoint' => self::SERVICE_ADDRESS . ':' . self::DEFAULT_SERVICE_PORT, + 'clientConfig' => __DIR__ . '/../resources/spaces_service_client_config.json', + 'descriptorsConfigPath' => __DIR__ . '/../resources/spaces_service_descriptor_config.php', + 'gcpApiConfigPath' => __DIR__ . '/../resources/spaces_service_grpc_config.json', + 'credentialsConfig' => [ + 'defaultScopes' => self::$serviceScopes, + ], + 'transportConfig' => [ + 'rest' => [ + 'restClientConfigPath' => __DIR__ . '/../resources/spaces_service_rest_client_config.php', + ], + ], + ]; + } + + /** + * Formats a string containing the fully-qualified path to represent a + * conference_record resource. + * + * @param string $conferenceRecord + * + * @return string The formatted conference_record resource. + */ + public static function conferenceRecordName(string $conferenceRecord): string + { + return self::getPathTemplate('conferenceRecord')->render([ + 'conference_record' => $conferenceRecord, + ]); + } + + /** + * 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, + ]); + } + + /** + * Parses a formatted name string and returns an associative array of the components in the name. + * The following name formats are supported: + * Template: Pattern + * - conferenceRecord: conferenceRecords/{conference_record} + * - space: spaces/{space} + * + * 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 'meet.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); + } + + /** + * Creates a space. + * + * The async variant is {@see SpacesServiceClient::createSpaceAsync()} . + * + * @example samples/V2/SpacesServiceClient/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(); + } + + /** + * Ends an active conference (if there's one). + * + * The async variant is {@see SpacesServiceClient::endActiveConferenceAsync()} . + * + * @example samples/V2/SpacesServiceClient/end_active_conference.php + * + * @param EndActiveConferenceRequest $request A request to house fields associated with the call. + * @param array $callOptions { + * Optional. + * + * @type RetrySettings|array $retrySettings + * Retry settings to use for this 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 endActiveConference(EndActiveConferenceRequest $request, array $callOptions = []): void + { + $this->startApiCall('EndActiveConference', $request, $callOptions)->wait(); + } + + /** + * Gets a space by `space_id` or `meeting_code`. + * + * The async variant is {@see SpacesServiceClient::getSpaceAsync()} . + * + * @example samples/V2/SpacesServiceClient/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(); + } + + /** + * Updates a space. + * + * The async variant is {@see SpacesServiceClient::updateSpaceAsync()} . + * + * @example samples/V2/SpacesServiceClient/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(); + } +} diff --git a/AppsMeet/src/V2/ConferenceRecord.php b/AppsMeet/src/V2/ConferenceRecord.php new file mode 100644 index 000000000000..e70dcffd2d49 --- /dev/null +++ b/AppsMeet/src/V2/ConferenceRecord.php @@ -0,0 +1,253 @@ +google.apps.meet.v2.ConferenceRecord + */ +class ConferenceRecord extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Resource name of the conference record. + * Format: `conferenceRecords/{conference_record}` where `{conference_record}` + * is a unique ID for each instance of a call within a space. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Timestamp when the conference started. Always set. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. Timestamp when the conference ended. + * Set for past conferences. Unset if the conference is ongoing. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + /** + * Output only. Server enforced expiration time for when this conference + * record resource is deleted. The resource is deleted 30 days after the + * conference ends. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $expire_time = null; + /** + * Output only. The space where the conference was held. + * + * Generated from protobuf field string space = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $space = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Resource name of the conference record. + * Format: `conferenceRecords/{conference_record}` where `{conference_record}` + * is a unique ID for each instance of a call within a space. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. Timestamp when the conference started. Always set. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Timestamp when the conference ended. + * Set for past conferences. Unset if the conference is ongoing. + * @type \Google\Protobuf\Timestamp $expire_time + * Output only. Server enforced expiration time for when this conference + * record resource is deleted. The resource is deleted 30 days after the + * conference ends. + * @type string $space + * Output only. The space where the conference was held. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Resource name of the conference record. + * Format: `conferenceRecords/{conference_record}` where `{conference_record}` + * is a unique ID for each instance of a call within a space. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Resource name of the conference record. + * Format: `conferenceRecords/{conference_record}` where `{conference_record}` + * is a unique ID for each instance of a call within a space. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Timestamp when the conference started. Always set. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. Timestamp when the conference started. Always set. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. Timestamp when the conference ended. + * Set for past conferences. Unset if the conference is ongoing. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Timestamp when the conference ended. + * Set for past conferences. Unset if the conference is ongoing. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * Output only. Server enforced expiration time for when this conference + * record resource is deleted. The resource is deleted 30 days after the + * conference ends. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getExpireTime() + { + return $this->expire_time; + } + + public function hasExpireTime() + { + return isset($this->expire_time); + } + + public function clearExpireTime() + { + unset($this->expire_time); + } + + /** + * Output only. Server enforced expiration time for when this conference + * record resource is deleted. The resource is deleted 30 days after the + * conference ends. + * + * Generated from protobuf field .google.protobuf.Timestamp expire_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setExpireTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->expire_time = $var; + + return $this; + } + + /** + * Output only. The space where the conference was held. + * + * Generated from protobuf field string space = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getSpace() + { + return $this->space; + } + + /** + * Output only. The space where the conference was held. + * + * Generated from protobuf field string space = 5 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkString($var, True); + $this->space = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/CreateSpaceRequest.php b/AppsMeet/src/V2/CreateSpaceRequest.php new file mode 100644 index 000000000000..94613d4c31fd --- /dev/null +++ b/AppsMeet/src/V2/CreateSpaceRequest.php @@ -0,0 +1,95 @@ +google.apps.meet.v2.CreateSpaceRequest + */ +class CreateSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Space to be created. As of May 2023, the input space can be empty. Later on + * the input space can be non-empty when space configuration is introduced. + * + * Generated from protobuf field .google.apps.meet.v2.Space space = 1; + */ + protected $space = null; + + /** + * @param \Google\Apps\Meet\V2\Space $space Space to be created. As of May 2023, the input space can be empty. Later on + * the input space can be non-empty when space configuration is introduced. + * + * @return \Google\Apps\Meet\V2\CreateSpaceRequest + * + * @experimental + */ + public static function build(\Google\Apps\Meet\V2\Space $space): self + { + return (new self()) + ->setSpace($space); + } + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Meet\V2\Space $space + * Space to be created. As of May 2023, the input space can be empty. Later on + * the input space can be non-empty when space configuration is introduced. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Space to be created. As of May 2023, the input space can be empty. Later on + * the input space can be non-empty when space configuration is introduced. + * + * Generated from protobuf field .google.apps.meet.v2.Space space = 1; + * @return \Google\Apps\Meet\V2\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * Space to be created. As of May 2023, the input space can be empty. Later on + * the input space can be non-empty when space configuration is introduced. + * + * Generated from protobuf field .google.apps.meet.v2.Space space = 1; + * @param \Google\Apps\Meet\V2\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Meet\V2\Space::class); + $this->space = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/DocsDestination.php b/AppsMeet/src/V2/DocsDestination.php new file mode 100644 index 000000000000..83f19cc2d084 --- /dev/null +++ b/AppsMeet/src/V2/DocsDestination.php @@ -0,0 +1,125 @@ +google.apps.meet.v2.DocsDestination + */ +class DocsDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The document ID for the underlying Google Docs transcript + * file. For example, "1kuceFZohVoCh6FulBHxwy6I15Ogpc4hP". Use the + * `documents.get` method of the Google Docs API + * (https://developers.google.com/docs/api/reference/rest/v1/documents/get) to + * fetch the content. + * + * Generated from protobuf field string document = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $document = ''; + /** + * Output only. URI for the Google Docs transcript file. Use + * `https://docs.google.com/document/d/{$DocumentId}/view` to browse the + * transcript in the browser. + * + * Generated from protobuf field string export_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $export_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $document + * Output only. The document ID for the underlying Google Docs transcript + * file. For example, "1kuceFZohVoCh6FulBHxwy6I15Ogpc4hP". Use the + * `documents.get` method of the Google Docs API + * (https://developers.google.com/docs/api/reference/rest/v1/documents/get) to + * fetch the content. + * @type string $export_uri + * Output only. URI for the Google Docs transcript file. Use + * `https://docs.google.com/document/d/{$DocumentId}/view` to browse the + * transcript in the browser. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The document ID for the underlying Google Docs transcript + * file. For example, "1kuceFZohVoCh6FulBHxwy6I15Ogpc4hP". Use the + * `documents.get` method of the Google Docs API + * (https://developers.google.com/docs/api/reference/rest/v1/documents/get) to + * fetch the content. + * + * Generated from protobuf field string document = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDocument() + { + return $this->document; + } + + /** + * Output only. The document ID for the underlying Google Docs transcript + * file. For example, "1kuceFZohVoCh6FulBHxwy6I15Ogpc4hP". Use the + * `documents.get` method of the Google Docs API + * (https://developers.google.com/docs/api/reference/rest/v1/documents/get) to + * fetch the content. + * + * Generated from protobuf field string document = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setDocument($var) + { + GPBUtil::checkString($var, True); + $this->document = $var; + + return $this; + } + + /** + * Output only. URI for the Google Docs transcript file. Use + * `https://docs.google.com/document/d/{$DocumentId}/view` to browse the + * transcript in the browser. + * + * Generated from protobuf field string export_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExportUri() + { + return $this->export_uri; + } + + /** + * Output only. URI for the Google Docs transcript file. Use + * `https://docs.google.com/document/d/{$DocumentId}/view` to browse the + * transcript in the browser. + * + * Generated from protobuf field string export_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExportUri($var) + { + GPBUtil::checkString($var, True); + $this->export_uri = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/DriveDestination.php b/AppsMeet/src/V2/DriveDestination.php new file mode 100644 index 000000000000..18ce48ff4fac --- /dev/null +++ b/AppsMeet/src/V2/DriveDestination.php @@ -0,0 +1,121 @@ +google.apps.meet.v2.DriveDestination + */ +class DriveDestination extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. The `fileId` for the underlying MP4 file. For example, + * "1kuceFZohVoCh6FulBHxwy6I15Ogpc4hP". Use `$ GET + * https://www.googleapis.com/drive/v3/files/{$fileId}?alt=media` to download + * the blob. For more information, see + * https://developers.google.com/drive/api/v3/reference/files/get. + * + * Generated from protobuf field string file = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $file = ''; + /** + * Output only. Link used to play back the recording file in the browser. For + * example, `https://drive.google.com/file/d/{$fileId}/view`. + * + * Generated from protobuf field string export_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $export_uri = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $file + * Output only. The `fileId` for the underlying MP4 file. For example, + * "1kuceFZohVoCh6FulBHxwy6I15Ogpc4hP". Use `$ GET + * https://www.googleapis.com/drive/v3/files/{$fileId}?alt=media` to download + * the blob. For more information, see + * https://developers.google.com/drive/api/v3/reference/files/get. + * @type string $export_uri + * Output only. Link used to play back the recording file in the browser. For + * example, `https://drive.google.com/file/d/{$fileId}/view`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Output only. The `fileId` for the underlying MP4 file. For example, + * "1kuceFZohVoCh6FulBHxwy6I15Ogpc4hP". Use `$ GET + * https://www.googleapis.com/drive/v3/files/{$fileId}?alt=media` to download + * the blob. For more information, see + * https://developers.google.com/drive/api/v3/reference/files/get. + * + * Generated from protobuf field string file = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getFile() + { + return $this->file; + } + + /** + * Output only. The `fileId` for the underlying MP4 file. For example, + * "1kuceFZohVoCh6FulBHxwy6I15Ogpc4hP". Use `$ GET + * https://www.googleapis.com/drive/v3/files/{$fileId}?alt=media` to download + * the blob. For more information, see + * https://developers.google.com/drive/api/v3/reference/files/get. + * + * Generated from protobuf field string file = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setFile($var) + { + GPBUtil::checkString($var, True); + $this->file = $var; + + return $this; + } + + /** + * Output only. Link used to play back the recording file in the browser. For + * example, `https://drive.google.com/file/d/{$fileId}/view`. + * + * Generated from protobuf field string export_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getExportUri() + { + return $this->export_uri; + } + + /** + * Output only. Link used to play back the recording file in the browser. For + * example, `https://drive.google.com/file/d/{$fileId}/view`. + * + * Generated from protobuf field string export_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setExportUri($var) + { + GPBUtil::checkString($var, True); + $this->export_uri = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/EndActiveConferenceRequest.php b/AppsMeet/src/V2/EndActiveConferenceRequest.php new file mode 100644 index 000000000000..b9513f4d1a98 --- /dev/null +++ b/AppsMeet/src/V2/EndActiveConferenceRequest.php @@ -0,0 +1,81 @@ +google.apps.meet.v2.EndActiveConferenceRequest + */ +class EndActiveConferenceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the space. + * + * 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. Please see + * {@see SpacesServiceClient::spaceName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\EndActiveConferenceRequest + * + * @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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the 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. + * + * 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/AppsMeet/src/V2/GetConferenceRecordRequest.php b/AppsMeet/src/V2/GetConferenceRecordRequest.php new file mode 100644 index 000000000000..ead117879574 --- /dev/null +++ b/AppsMeet/src/V2/GetConferenceRecordRequest.php @@ -0,0 +1,81 @@ +google.apps.meet.v2.GetConferenceRecordRequest + */ +class GetConferenceRecordRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the conference. + * + * 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 conference. Please see + * {@see ConferenceRecordsServiceClient::conferenceRecordName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\GetConferenceRecordRequest + * + * @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 conference. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the conference. + * + * 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 conference. + * + * 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/AppsMeet/src/V2/GetParticipantRequest.php b/AppsMeet/src/V2/GetParticipantRequest.php new file mode 100644 index 000000000000..6035875677c2 --- /dev/null +++ b/AppsMeet/src/V2/GetParticipantRequest.php @@ -0,0 +1,81 @@ +google.apps.meet.v2.GetParticipantRequest + */ +class GetParticipantRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the participant. + * + * 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 participant. Please see + * {@see ConferenceRecordsServiceClient::participantName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\GetParticipantRequest + * + * @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 participant. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the participant. + * + * 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 participant. + * + * 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/AppsMeet/src/V2/GetParticipantSessionRequest.php b/AppsMeet/src/V2/GetParticipantSessionRequest.php new file mode 100644 index 000000000000..c228651edb31 --- /dev/null +++ b/AppsMeet/src/V2/GetParticipantSessionRequest.php @@ -0,0 +1,81 @@ +google.apps.meet.v2.GetParticipantSessionRequest + */ +class GetParticipantSessionRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the participant. + * + * 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 participant. Please see + * {@see ConferenceRecordsServiceClient::participantSessionName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\GetParticipantSessionRequest + * + * @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 participant. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the participant. + * + * 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 participant. + * + * 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/AppsMeet/src/V2/GetRecordingRequest.php b/AppsMeet/src/V2/GetRecordingRequest.php new file mode 100644 index 000000000000..cb69bbe52bb4 --- /dev/null +++ b/AppsMeet/src/V2/GetRecordingRequest.php @@ -0,0 +1,81 @@ +google.apps.meet.v2.GetRecordingRequest + */ +class GetRecordingRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the recording. + * + * 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 recording. Please see + * {@see ConferenceRecordsServiceClient::recordingName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\GetRecordingRequest + * + * @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 recording. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the recording. + * + * 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 recording. + * + * 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/AppsMeet/src/V2/GetSpaceRequest.php b/AppsMeet/src/V2/GetSpaceRequest.php new file mode 100644 index 000000000000..c0828dbbbbcd --- /dev/null +++ b/AppsMeet/src/V2/GetSpaceRequest.php @@ -0,0 +1,81 @@ +google.apps.meet.v2.GetSpaceRequest + */ +class GetSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the space. + * + * 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. Please see + * {@see SpacesServiceClient::spaceName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\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. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the 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. + * + * 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/AppsMeet/src/V2/GetTranscriptEntryRequest.php b/AppsMeet/src/V2/GetTranscriptEntryRequest.php new file mode 100644 index 000000000000..975d7f0938dd --- /dev/null +++ b/AppsMeet/src/V2/GetTranscriptEntryRequest.php @@ -0,0 +1,81 @@ +google.apps.meet.v2.GetTranscriptEntryRequest + */ +class GetTranscriptEntryRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the `TranscriptEntry`. + * + * 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 `TranscriptEntry`. Please see + * {@see ConferenceRecordsServiceClient::transcriptEntryName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\GetTranscriptEntryRequest + * + * @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 `TranscriptEntry`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the `TranscriptEntry`. + * + * 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 `TranscriptEntry`. + * + * 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/AppsMeet/src/V2/GetTranscriptRequest.php b/AppsMeet/src/V2/GetTranscriptRequest.php new file mode 100644 index 000000000000..ca7aec59a1ca --- /dev/null +++ b/AppsMeet/src/V2/GetTranscriptRequest.php @@ -0,0 +1,81 @@ +google.apps.meet.v2.GetTranscriptRequest + */ +class GetTranscriptRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Resource name of the transcript. + * + * 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 transcript. Please see + * {@see ConferenceRecordsServiceClient::transcriptName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\GetTranscriptRequest + * + * @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 transcript. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Resource name of the transcript. + * + * 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 transcript. + * + * 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/AppsMeet/src/V2/ListConferenceRecordsRequest.php b/AppsMeet/src/V2/ListConferenceRecordsRequest.php new file mode 100644 index 000000000000..b0eb79c85b79 --- /dev/null +++ b/AppsMeet/src/V2/ListConferenceRecordsRequest.php @@ -0,0 +1,175 @@ +google.apps.meet.v2.ListConferenceRecordsRequest + */ +class ListConferenceRecordsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Optional. Maximum number of conference records to return. The service might + * return fewer than this value. If unspecified, at most 25 conference records + * are returned. The maximum value is 100; values above 100 are coerced to + * 100. Maximum might change in the future. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. User specified filtering condition in [EBNF + * format](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form). + * The following are the filterable fields: + * * `space.meeting_code` + * * `space.name` + * * `start_time` + * * `end_time` + * For example, `space.meeting_code = "abc-mnop-xyz"`. + * + * 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. Maximum number of conference records to return. The service might + * return fewer than this value. If unspecified, at most 25 conference records + * are returned. The maximum value is 100; values above 100 are coerced to + * 100. Maximum might change in the future. + * @type string $page_token + * Optional. Page token returned from previous List Call. + * @type string $filter + * Optional. User specified filtering condition in [EBNF + * format](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form). + * The following are the filterable fields: + * * `space.meeting_code` + * * `space.name` + * * `start_time` + * * `end_time` + * For example, `space.meeting_code = "abc-mnop-xyz"`. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Optional. Maximum number of conference records to return. The service might + * return fewer than this value. If unspecified, at most 25 conference records + * are returned. The maximum value is 100; values above 100 are coerced to + * 100. Maximum might change in the future. + * + * Generated from protobuf field int32 page_size = 1 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of conference records to return. The service might + * return fewer than this value. If unspecified, at most 25 conference records + * are returned. The maximum value is 100; values above 100 are coerced to + * 100. Maximum might change in the future. + * + * 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. Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Page token returned from previous List Call. + * + * 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. User specified filtering condition in [EBNF + * format](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form). + * The following are the filterable fields: + * * `space.meeting_code` + * * `space.name` + * * `start_time` + * * `end_time` + * For example, `space.meeting_code = "abc-mnop-xyz"`. + * + * Generated from protobuf field string filter = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. User specified filtering condition in [EBNF + * format](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form). + * The following are the filterable fields: + * * `space.meeting_code` + * * `space.name` + * * `start_time` + * * `end_time` + * For example, `space.meeting_code = "abc-mnop-xyz"`. + * + * 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/AppsMeet/src/V2/ListConferenceRecordsResponse.php b/AppsMeet/src/V2/ListConferenceRecordsResponse.php new file mode 100644 index 000000000000..b3dd9857225d --- /dev/null +++ b/AppsMeet/src/V2/ListConferenceRecordsResponse.php @@ -0,0 +1,105 @@ +google.apps.meet.v2.ListConferenceRecordsResponse + */ +class ListConferenceRecordsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of conferences in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.ConferenceRecord conference_records = 1; + */ + private $conference_records; + /** + * Token to be circulated back for further List call if current List does NOT + * include all the Conferences. Unset if all conferences have been returned. + * + * 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\Meet\V2\ConferenceRecord>|\Google\Protobuf\Internal\RepeatedField $conference_records + * List of conferences in one page. + * @type string $next_page_token + * Token to be circulated back for further List call if current List does NOT + * include all the Conferences. Unset if all conferences have been returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * List of conferences in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.ConferenceRecord conference_records = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getConferenceRecords() + { + return $this->conference_records; + } + + /** + * List of conferences in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.ConferenceRecord conference_records = 1; + * @param array<\Google\Apps\Meet\V2\ConferenceRecord>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setConferenceRecords($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Meet\V2\ConferenceRecord::class); + $this->conference_records = $arr; + + return $this; + } + + /** + * Token to be circulated back for further List call if current List does NOT + * include all the Conferences. Unset if all conferences have been returned. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to be circulated back for further List call if current List does NOT + * include all the Conferences. Unset if all conferences have been returned. + * + * 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/AppsMeet/src/V2/ListParticipantSessionsRequest.php b/AppsMeet/src/V2/ListParticipantSessionsRequest.php new file mode 100644 index 000000000000..5e3275b5aba6 --- /dev/null +++ b/AppsMeet/src/V2/ListParticipantSessionsRequest.php @@ -0,0 +1,225 @@ +google.apps.meet.v2.ListParticipantSessionsRequest + */ +class ListParticipantSessionsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `conferenceRecords/{conference_record}/participants/{participant}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Optional. Maximum number of participant sessions to return. The service + * might return fewer than this value. If unspecified, at most 100 + * participants are returned. The maximum value is 250; values above 250 are + * coerced to 250. Maximum might change in the future. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_size = 0; + /** + * Optional. Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $page_token = ''; + /** + * Optional. User specified filtering condition in [EBNF + * format](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form). + * The following are the filterable fields: + * * `start_time` + * * `end_time` + * For example, `end_time IS NULL` returns active participant sessions in + * the conference record. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Format: + * `conferenceRecords/{conference_record}/participants/{participant}` + * Please see {@see ConferenceRecordsServiceClient::participantName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\ListParticipantSessionsRequest + * + * @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. Format: + * `conferenceRecords/{conference_record}/participants/{participant}` + * @type int $page_size + * Optional. Maximum number of participant sessions to return. The service + * might return fewer than this value. If unspecified, at most 100 + * participants are returned. The maximum value is 250; values above 250 are + * coerced to 250. Maximum might change in the future. + * @type string $page_token + * Optional. Page token returned from previous List Call. + * @type string $filter + * Optional. User specified filtering condition in [EBNF + * format](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form). + * The following are the filterable fields: + * * `start_time` + * * `end_time` + * For example, `end_time IS NULL` returns active participant sessions in + * the conference record. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `conferenceRecords/{conference_record}/participants/{participant}` + * + * 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. Format: + * `conferenceRecords/{conference_record}/participants/{participant}` + * + * 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. Maximum number of participant sessions to return. The service + * might return fewer than this value. If unspecified, at most 100 + * participants are returned. The maximum value is 250; values above 250 are + * coerced to 250. Maximum might change in the future. + * + * Generated from protobuf field int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Optional. Maximum number of participant sessions to return. The service + * might return fewer than this value. If unspecified, at most 100 + * participants are returned. The maximum value is 250; values above 250 are + * coerced to 250. Maximum might change in the future. + * + * 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. Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Optional. Page token returned from previous List Call. + * + * 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. User specified filtering condition in [EBNF + * format](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form). + * The following are the filterable fields: + * * `start_time` + * * `end_time` + * For example, `end_time IS NULL` returns active participant sessions in + * the conference record. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. User specified filtering condition in [EBNF + * format](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form). + * The following are the filterable fields: + * * `start_time` + * * `end_time` + * For example, `end_time IS NULL` returns active participant sessions in + * the conference record. + * + * 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/AppsMeet/src/V2/ListParticipantSessionsResponse.php b/AppsMeet/src/V2/ListParticipantSessionsResponse.php new file mode 100644 index 000000000000..c73741b620e4 --- /dev/null +++ b/AppsMeet/src/V2/ListParticipantSessionsResponse.php @@ -0,0 +1,105 @@ +google.apps.meet.v2.ListParticipantSessionsResponse + */ +class ListParticipantSessionsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of participants in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.ParticipantSession participant_sessions = 1; + */ + private $participant_sessions; + /** + * Token to be circulated back for further List call if current List doesn't + * include all the participants. Unset if all participants are returned. + * + * 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\Meet\V2\ParticipantSession>|\Google\Protobuf\Internal\RepeatedField $participant_sessions + * List of participants in one page. + * @type string $next_page_token + * Token to be circulated back for further List call if current List doesn't + * include all the participants. Unset if all participants are returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * List of participants in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.ParticipantSession participant_sessions = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParticipantSessions() + { + return $this->participant_sessions; + } + + /** + * List of participants in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.ParticipantSession participant_sessions = 1; + * @param array<\Google\Apps\Meet\V2\ParticipantSession>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParticipantSessions($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Meet\V2\ParticipantSession::class); + $this->participant_sessions = $arr; + + return $this; + } + + /** + * Token to be circulated back for further List call if current List doesn't + * include all the participants. Unset if all participants are returned. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to be circulated back for further List call if current List doesn't + * include all the participants. Unset if all participants are returned. + * + * 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/AppsMeet/src/V2/ListParticipantsRequest.php b/AppsMeet/src/V2/ListParticipantsRequest.php new file mode 100644 index 000000000000..72499bab0666 --- /dev/null +++ b/AppsMeet/src/V2/ListParticipantsRequest.php @@ -0,0 +1,223 @@ +google.apps.meet.v2.ListParticipantsRequest + */ +class ListParticipantsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `conferenceRecords/{conference_record}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of participants to return. The service might return fewer + * than this value. + * If unspecified, at most 100 participants are returned. + * The maximum value is 250; values above 250 are coerced to 250. + * Maximum might change in the future. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + /** + * Optional. User specified filtering condition in [EBNF + * format](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form). + * The following are the filterable fields: + * * `earliest_start_time` + * * `latest_end_time` + * For example, `latest_end_time IS NULL` returns active participants in + * the conference. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $filter = ''; + + /** + * @param string $parent Required. Format: `conferenceRecords/{conference_record}` + * Please see {@see ConferenceRecordsServiceClient::conferenceRecordName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\ListParticipantsRequest + * + * @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. Format: `conferenceRecords/{conference_record}` + * @type int $page_size + * Maximum number of participants to return. The service might return fewer + * than this value. + * If unspecified, at most 100 participants are returned. + * The maximum value is 250; values above 250 are coerced to 250. + * Maximum might change in the future. + * @type string $page_token + * Page token returned from previous List Call. + * @type string $filter + * Optional. User specified filtering condition in [EBNF + * format](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form). + * The following are the filterable fields: + * * `earliest_start_time` + * * `latest_end_time` + * For example, `latest_end_time IS NULL` returns active participants in + * the conference. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `conferenceRecords/{conference_record}` + * + * 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. Format: `conferenceRecords/{conference_record}` + * + * 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; + } + + /** + * Maximum number of participants to return. The service might return fewer + * than this value. + * If unspecified, at most 100 participants are returned. + * The maximum value is 250; values above 250 are coerced to 250. + * Maximum might change in the future. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of participants to return. The service might return fewer + * than this value. + * If unspecified, at most 100 participants are returned. + * The maximum value is 250; values above 250 are coerced to 250. + * Maximum might change in the future. + * + * 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; + } + + /** + * Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + + /** + * Optional. User specified filtering condition in [EBNF + * format](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form). + * The following are the filterable fields: + * * `earliest_start_time` + * * `latest_end_time` + * For example, `latest_end_time IS NULL` returns active participants in + * the conference. + * + * Generated from protobuf field string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * @return string + */ + public function getFilter() + { + return $this->filter; + } + + /** + * Optional. User specified filtering condition in [EBNF + * format](https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form). + * The following are the filterable fields: + * * `earliest_start_time` + * * `latest_end_time` + * For example, `latest_end_time IS NULL` returns active participants in + * the conference. + * + * 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/AppsMeet/src/V2/ListParticipantsResponse.php b/AppsMeet/src/V2/ListParticipantsResponse.php new file mode 100644 index 000000000000..76bebd0be596 --- /dev/null +++ b/AppsMeet/src/V2/ListParticipantsResponse.php @@ -0,0 +1,151 @@ +google.apps.meet.v2.ListParticipantsResponse + */ +class ListParticipantsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of participants in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.Participant participants = 1; + */ + private $participants; + /** + * Token to be circulated back for further List call if current List doesn't + * include all the participants. Unset if all participants are returned. + * + * Generated from protobuf field string next_page_token = 2; + */ + protected $next_page_token = ''; + /** + * Total, exact number of `participants`. By default, this field isn't + * included in the response. Set the field mask in + * [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters) + * to receive this field in the response. + * + * 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\Meet\V2\Participant>|\Google\Protobuf\Internal\RepeatedField $participants + * List of participants in one page. + * @type string $next_page_token + * Token to be circulated back for further List call if current List doesn't + * include all the participants. Unset if all participants are returned. + * @type int $total_size + * Total, exact number of `participants`. By default, this field isn't + * included in the response. Set the field mask in + * [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters) + * to receive this field in the response. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * List of participants in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.Participant participants = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getParticipants() + { + return $this->participants; + } + + /** + * List of participants in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.Participant participants = 1; + * @param array<\Google\Apps\Meet\V2\Participant>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setParticipants($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Meet\V2\Participant::class); + $this->participants = $arr; + + return $this; + } + + /** + * Token to be circulated back for further List call if current List doesn't + * include all the participants. Unset if all participants are returned. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to be circulated back for further List call if current List doesn't + * include all the participants. Unset if all participants are returned. + * + * 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; + } + + /** + * Total, exact number of `participants`. By default, this field isn't + * included in the response. Set the field mask in + * [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters) + * to receive this field in the response. + * + * Generated from protobuf field int32 total_size = 3; + * @return int + */ + public function getTotalSize() + { + return $this->total_size; + } + + /** + * Total, exact number of `participants`. By default, this field isn't + * included in the response. Set the field mask in + * [SystemParameterContext](https://cloud.google.com/apis/docs/system-parameters) + * to receive this field in the response. + * + * 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/AppsMeet/src/V2/ListRecordingsRequest.php b/AppsMeet/src/V2/ListRecordingsRequest.php new file mode 100644 index 000000000000..7d8d76f265e5 --- /dev/null +++ b/AppsMeet/src/V2/ListRecordingsRequest.php @@ -0,0 +1,165 @@ +google.apps.meet.v2.ListRecordingsRequest + */ +class ListRecordingsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `conferenceRecords/{conference_record}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of recordings to return. The service might return fewer + * than this value. + * If unspecified, at most 10 recordings are returned. + * The maximum value is 100; values above 100 are coerced to 100. + * Maximum might change in the future. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Format: `conferenceRecords/{conference_record}` + * Please see {@see ConferenceRecordsServiceClient::conferenceRecordName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\ListRecordingsRequest + * + * @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. Format: `conferenceRecords/{conference_record}` + * @type int $page_size + * Maximum number of recordings to return. The service might return fewer + * than this value. + * If unspecified, at most 10 recordings are returned. + * The maximum value is 100; values above 100 are coerced to 100. + * Maximum might change in the future. + * @type string $page_token + * Page token returned from previous List Call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `conferenceRecords/{conference_record}` + * + * 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. Format: `conferenceRecords/{conference_record}` + * + * 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; + } + + /** + * Maximum number of recordings to return. The service might return fewer + * than this value. + * If unspecified, at most 10 recordings are returned. + * The maximum value is 100; values above 100 are coerced to 100. + * Maximum might change in the future. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of recordings to return. The service might return fewer + * than this value. + * If unspecified, at most 10 recordings are returned. + * The maximum value is 100; values above 100 are coerced to 100. + * Maximum might change in the future. + * + * 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; + } + + /** + * Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/ListRecordingsResponse.php b/AppsMeet/src/V2/ListRecordingsResponse.php new file mode 100644 index 000000000000..3e25a5d5ecfa --- /dev/null +++ b/AppsMeet/src/V2/ListRecordingsResponse.php @@ -0,0 +1,105 @@ +google.apps.meet.v2.ListRecordingsResponse + */ +class ListRecordingsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of recordings in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.Recording recordings = 1; + */ + private $recordings; + /** + * Token to be circulated back for further List call if current List doesn't + * include all the recordings. Unset if all recordings are returned. + * + * 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\Meet\V2\Recording>|\Google\Protobuf\Internal\RepeatedField $recordings + * List of recordings in one page. + * @type string $next_page_token + * Token to be circulated back for further List call if current List doesn't + * include all the recordings. Unset if all recordings are returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * List of recordings in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.Recording recordings = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getRecordings() + { + return $this->recordings; + } + + /** + * List of recordings in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.Recording recordings = 1; + * @param array<\Google\Apps\Meet\V2\Recording>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setRecordings($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Meet\V2\Recording::class); + $this->recordings = $arr; + + return $this; + } + + /** + * Token to be circulated back for further List call if current List doesn't + * include all the recordings. Unset if all recordings are returned. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to be circulated back for further List call if current List doesn't + * include all the recordings. Unset if all recordings are returned. + * + * 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/AppsMeet/src/V2/ListTranscriptEntriesRequest.php b/AppsMeet/src/V2/ListTranscriptEntriesRequest.php new file mode 100644 index 000000000000..c7cc6f561a8a --- /dev/null +++ b/AppsMeet/src/V2/ListTranscriptEntriesRequest.php @@ -0,0 +1,170 @@ +google.apps.meet.v2.ListTranscriptEntriesRequest + */ +class ListTranscriptEntriesRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: + * `conferenceRecords/{conference_record}/transcripts/{transcript}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of entries to return. The service might return fewer than + * this value. + * If unspecified, at most 10 entries are returned. + * The maximum value is 100; values above 100 are coerced to 100. + * Maximum might change in the future. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Format: + * `conferenceRecords/{conference_record}/transcripts/{transcript}` + * Please see {@see ConferenceRecordsServiceClient::transcriptName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\ListTranscriptEntriesRequest + * + * @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. Format: + * `conferenceRecords/{conference_record}/transcripts/{transcript}` + * @type int $page_size + * Maximum number of entries to return. The service might return fewer than + * this value. + * If unspecified, at most 10 entries are returned. + * The maximum value is 100; values above 100 are coerced to 100. + * Maximum might change in the future. + * @type string $page_token + * Page token returned from previous List Call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: + * `conferenceRecords/{conference_record}/transcripts/{transcript}` + * + * 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. Format: + * `conferenceRecords/{conference_record}/transcripts/{transcript}` + * + * 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; + } + + /** + * Maximum number of entries to return. The service might return fewer than + * this value. + * If unspecified, at most 10 entries are returned. + * The maximum value is 100; values above 100 are coerced to 100. + * Maximum might change in the future. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of entries to return. The service might return fewer than + * this value. + * If unspecified, at most 10 entries are returned. + * The maximum value is 100; values above 100 are coerced to 100. + * Maximum might change in the future. + * + * 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; + } + + /** + * Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/ListTranscriptEntriesResponse.php b/AppsMeet/src/V2/ListTranscriptEntriesResponse.php new file mode 100644 index 000000000000..fc6ac0bb2e79 --- /dev/null +++ b/AppsMeet/src/V2/ListTranscriptEntriesResponse.php @@ -0,0 +1,105 @@ +google.apps.meet.v2.ListTranscriptEntriesResponse + */ +class ListTranscriptEntriesResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of TranscriptEntries in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.TranscriptEntry transcript_entries = 1; + */ + private $transcript_entries; + /** + * Token to be circulated back for further List call if current List doesn't + * include all the transcript entries. Unset if all entries are returned. + * + * 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\Meet\V2\TranscriptEntry>|\Google\Protobuf\Internal\RepeatedField $transcript_entries + * List of TranscriptEntries in one page. + * @type string $next_page_token + * Token to be circulated back for further List call if current List doesn't + * include all the transcript entries. Unset if all entries are returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * List of TranscriptEntries in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.TranscriptEntry transcript_entries = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTranscriptEntries() + { + return $this->transcript_entries; + } + + /** + * List of TranscriptEntries in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.TranscriptEntry transcript_entries = 1; + * @param array<\Google\Apps\Meet\V2\TranscriptEntry>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTranscriptEntries($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Meet\V2\TranscriptEntry::class); + $this->transcript_entries = $arr; + + return $this; + } + + /** + * Token to be circulated back for further List call if current List doesn't + * include all the transcript entries. Unset if all entries are returned. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to be circulated back for further List call if current List doesn't + * include all the transcript entries. Unset if all entries are returned. + * + * 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/AppsMeet/src/V2/ListTranscriptsRequest.php b/AppsMeet/src/V2/ListTranscriptsRequest.php new file mode 100644 index 000000000000..82aef9bf81a6 --- /dev/null +++ b/AppsMeet/src/V2/ListTranscriptsRequest.php @@ -0,0 +1,165 @@ +google.apps.meet.v2.ListTranscriptsRequest + */ +class ListTranscriptsRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Format: `conferenceRecords/{conference_record}` + * + * Generated from protobuf field string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { + */ + protected $parent = ''; + /** + * Maximum number of transcripts to return. The service might return fewer + * than this value. + * If unspecified, at most 10 transcripts are returned. + * The maximum value is 100; values above 100 are coerced to 100. + * Maximum might change in the future. + * + * Generated from protobuf field int32 page_size = 2; + */ + protected $page_size = 0; + /** + * Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3; + */ + protected $page_token = ''; + + /** + * @param string $parent Required. Format: `conferenceRecords/{conference_record}` + * Please see {@see ConferenceRecordsServiceClient::conferenceRecordName()} for help formatting this field. + * + * @return \Google\Apps\Meet\V2\ListTranscriptsRequest + * + * @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. Format: `conferenceRecords/{conference_record}` + * @type int $page_size + * Maximum number of transcripts to return. The service might return fewer + * than this value. + * If unspecified, at most 10 transcripts are returned. + * The maximum value is 100; values above 100 are coerced to 100. + * Maximum might change in the future. + * @type string $page_token + * Page token returned from previous List Call. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Format: `conferenceRecords/{conference_record}` + * + * 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. Format: `conferenceRecords/{conference_record}` + * + * 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; + } + + /** + * Maximum number of transcripts to return. The service might return fewer + * than this value. + * If unspecified, at most 10 transcripts are returned. + * The maximum value is 100; values above 100 are coerced to 100. + * Maximum might change in the future. + * + * Generated from protobuf field int32 page_size = 2; + * @return int + */ + public function getPageSize() + { + return $this->page_size; + } + + /** + * Maximum number of transcripts to return. The service might return fewer + * than this value. + * If unspecified, at most 10 transcripts are returned. + * The maximum value is 100; values above 100 are coerced to 100. + * Maximum might change in the future. + * + * 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; + } + + /** + * Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3; + * @return string + */ + public function getPageToken() + { + return $this->page_token; + } + + /** + * Page token returned from previous List Call. + * + * Generated from protobuf field string page_token = 3; + * @param string $var + * @return $this + */ + public function setPageToken($var) + { + GPBUtil::checkString($var, True); + $this->page_token = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/ListTranscriptsResponse.php b/AppsMeet/src/V2/ListTranscriptsResponse.php new file mode 100644 index 000000000000..e51f64f1c23d --- /dev/null +++ b/AppsMeet/src/V2/ListTranscriptsResponse.php @@ -0,0 +1,105 @@ +google.apps.meet.v2.ListTranscriptsResponse + */ +class ListTranscriptsResponse extends \Google\Protobuf\Internal\Message +{ + /** + * List of transcripts in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.Transcript transcripts = 1; + */ + private $transcripts; + /** + * Token to be circulated back for further List call if current List doesn't + * include all the transcripts. Unset if all transcripts are returned. + * + * 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\Meet\V2\Transcript>|\Google\Protobuf\Internal\RepeatedField $transcripts + * List of transcripts in one page. + * @type string $next_page_token + * Token to be circulated back for further List call if current List doesn't + * include all the transcripts. Unset if all transcripts are returned. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * List of transcripts in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.Transcript transcripts = 1; + * @return \Google\Protobuf\Internal\RepeatedField + */ + public function getTranscripts() + { + return $this->transcripts; + } + + /** + * List of transcripts in one page. + * + * Generated from protobuf field repeated .google.apps.meet.v2.Transcript transcripts = 1; + * @param array<\Google\Apps\Meet\V2\Transcript>|\Google\Protobuf\Internal\RepeatedField $var + * @return $this + */ + public function setTranscripts($var) + { + $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Apps\Meet\V2\Transcript::class); + $this->transcripts = $arr; + + return $this; + } + + /** + * Token to be circulated back for further List call if current List doesn't + * include all the transcripts. Unset if all transcripts are returned. + * + * Generated from protobuf field string next_page_token = 2; + * @return string + */ + public function getNextPageToken() + { + return $this->next_page_token; + } + + /** + * Token to be circulated back for further List call if current List doesn't + * include all the transcripts. Unset if all transcripts are returned. + * + * 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/AppsMeet/src/V2/Participant.php b/AppsMeet/src/V2/Participant.php new file mode 100644 index 000000000000..8188fd3f85f5 --- /dev/null +++ b/AppsMeet/src/V2/Participant.php @@ -0,0 +1,271 @@ +google.apps.meet.v2.Participant + */ +class Participant extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of the participant. + * Format: `conferenceRecords/{conference_record}/participants/{participant}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Time when the participant first joined the meeting. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $earliest_start_time = null; + /** + * Output only. Time when the participant left the meeting for the last time. + * This can be null if it's an active meeting. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $latest_end_time = null; + protected $user; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Meet\V2\SignedinUser $signedin_user + * Signed-in user. + * @type \Google\Apps\Meet\V2\AnonymousUser $anonymous_user + * Anonymous user. + * @type \Google\Apps\Meet\V2\PhoneUser $phone_user + * User calling from their phone. + * @type string $name + * Output only. Resource name of the participant. + * Format: `conferenceRecords/{conference_record}/participants/{participant}` + * @type \Google\Protobuf\Timestamp $earliest_start_time + * Output only. Time when the participant first joined the meeting. + * @type \Google\Protobuf\Timestamp $latest_end_time + * Output only. Time when the participant left the meeting for the last time. + * This can be null if it's an active meeting. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Signed-in user. + * + * Generated from protobuf field .google.apps.meet.v2.SignedinUser signedin_user = 4; + * @return \Google\Apps\Meet\V2\SignedinUser|null + */ + public function getSignedinUser() + { + return $this->readOneof(4); + } + + public function hasSignedinUser() + { + return $this->hasOneof(4); + } + + /** + * Signed-in user. + * + * Generated from protobuf field .google.apps.meet.v2.SignedinUser signedin_user = 4; + * @param \Google\Apps\Meet\V2\SignedinUser $var + * @return $this + */ + public function setSignedinUser($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Meet\V2\SignedinUser::class); + $this->writeOneof(4, $var); + + return $this; + } + + /** + * Anonymous user. + * + * Generated from protobuf field .google.apps.meet.v2.AnonymousUser anonymous_user = 5; + * @return \Google\Apps\Meet\V2\AnonymousUser|null + */ + public function getAnonymousUser() + { + return $this->readOneof(5); + } + + public function hasAnonymousUser() + { + return $this->hasOneof(5); + } + + /** + * Anonymous user. + * + * Generated from protobuf field .google.apps.meet.v2.AnonymousUser anonymous_user = 5; + * @param \Google\Apps\Meet\V2\AnonymousUser $var + * @return $this + */ + public function setAnonymousUser($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Meet\V2\AnonymousUser::class); + $this->writeOneof(5, $var); + + return $this; + } + + /** + * User calling from their phone. + * + * Generated from protobuf field .google.apps.meet.v2.PhoneUser phone_user = 6; + * @return \Google\Apps\Meet\V2\PhoneUser|null + */ + public function getPhoneUser() + { + return $this->readOneof(6); + } + + public function hasPhoneUser() + { + return $this->hasOneof(6); + } + + /** + * User calling from their phone. + * + * Generated from protobuf field .google.apps.meet.v2.PhoneUser phone_user = 6; + * @param \Google\Apps\Meet\V2\PhoneUser $var + * @return $this + */ + public function setPhoneUser($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Meet\V2\PhoneUser::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Output only. Resource name of the participant. + * Format: `conferenceRecords/{conference_record}/participants/{participant}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of the participant. + * Format: `conferenceRecords/{conference_record}/participants/{participant}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Time when the participant first joined the meeting. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEarliestStartTime() + { + return $this->earliest_start_time; + } + + public function hasEarliestStartTime() + { + return isset($this->earliest_start_time); + } + + public function clearEarliestStartTime() + { + unset($this->earliest_start_time); + } + + /** + * Output only. Time when the participant first joined the meeting. + * + * Generated from protobuf field .google.protobuf.Timestamp earliest_start_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEarliestStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->earliest_start_time = $var; + + return $this; + } + + /** + * Output only. Time when the participant left the meeting for the last time. + * This can be null if it's an active meeting. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getLatestEndTime() + { + return $this->latest_end_time; + } + + public function hasLatestEndTime() + { + return isset($this->latest_end_time); + } + + public function clearLatestEndTime() + { + unset($this->latest_end_time); + } + + /** + * Output only. Time when the participant left the meeting for the last time. + * This can be null if it's an active meeting. + * + * Generated from protobuf field .google.protobuf.Timestamp latest_end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setLatestEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->latest_end_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getUser() + { + return $this->whichOneof("user"); + } + +} + diff --git a/AppsMeet/src/V2/ParticipantSession.php b/AppsMeet/src/V2/ParticipantSession.php new file mode 100644 index 000000000000..e859cdcadc24 --- /dev/null +++ b/AppsMeet/src/V2/ParticipantSession.php @@ -0,0 +1,163 @@ +google.apps.meet.v2.ParticipantSession + */ +class ParticipantSession extends \Google\Protobuf\Internal\Message +{ + /** + * Identifier. Session id. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + */ + protected $name = ''; + /** + * Output only. Timestamp when the user session starts. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. Timestamp when the user session ends. Unset if the user + * session hasn’t ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Identifier. Session id. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. Timestamp when the user session starts. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Timestamp when the user session ends. Unset if the user + * session hasn’t ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Identifier. Session id. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Identifier. Session id. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IDENTIFIER]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Timestamp when the user session starts. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. Timestamp when the user session starts. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. Timestamp when the user session ends. Unset if the user + * session hasn’t ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Timestamp when the user session ends. Unset if the user + * session hasn’t ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/PhoneUser.php b/AppsMeet/src/V2/PhoneUser.php new file mode 100644 index 000000000000..9789c4084b04 --- /dev/null +++ b/AppsMeet/src/V2/PhoneUser.php @@ -0,0 +1,68 @@ +google.apps.meet.v2.PhoneUser + */ +class PhoneUser extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Partially redacted user's phone number when calling. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $display_name + * Output only. Partially redacted user's phone number when calling. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Partially redacted user's phone number when calling. + * + * Generated from protobuf field string display_name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getDisplayName() + { + return $this->display_name; + } + + /** + * Output only. Partially redacted user's phone number when calling. + * + * Generated from protobuf field string display_name = 1 [(.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; + } + +} + diff --git a/AppsMeet/src/V2/Recording.php b/AppsMeet/src/V2/Recording.php new file mode 100644 index 000000000000..85a9ecc404a9 --- /dev/null +++ b/AppsMeet/src/V2/Recording.php @@ -0,0 +1,249 @@ +google.apps.meet.v2.Recording + */ +class Recording extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of the recording. + * Format: `conferenceRecords/{conference_record}/recordings/{recording}` + * where `{recording}` is a 1:1 mapping to each unique recording session + * during the conference. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Current state. + * + * Generated from protobuf field .google.apps.meet.v2.Recording.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Timestamp when the recording started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. Timestamp when the recording ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Meet\V2\DriveDestination $drive_destination + * Output only. Recording is saved to Google Drive as an MP4 file. The + * `drive_destination` includes the Drive `fileId` that can be used to + * download the file using the `files.get` method of the Drive API. + * @type string $name + * Output only. Resource name of the recording. + * Format: `conferenceRecords/{conference_record}/recordings/{recording}` + * where `{recording}` is a 1:1 mapping to each unique recording session + * during the conference. + * @type int $state + * Output only. Current state. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. Timestamp when the recording started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Timestamp when the recording ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Recording is saved to Google Drive as an MP4 file. The + * `drive_destination` includes the Drive `fileId` that can be used to + * download the file using the `files.get` method of the Drive API. + * + * Generated from protobuf field .google.apps.meet.v2.DriveDestination drive_destination = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Meet\V2\DriveDestination|null + */ + public function getDriveDestination() + { + return $this->readOneof(6); + } + + public function hasDriveDestination() + { + return $this->hasOneof(6); + } + + /** + * Output only. Recording is saved to Google Drive as an MP4 file. The + * `drive_destination` includes the Drive `fileId` that can be used to + * download the file using the `files.get` method of the Drive API. + * + * Generated from protobuf field .google.apps.meet.v2.DriveDestination drive_destination = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Meet\V2\DriveDestination $var + * @return $this + */ + public function setDriveDestination($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Meet\V2\DriveDestination::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Output only. Resource name of the recording. + * Format: `conferenceRecords/{conference_record}/recordings/{recording}` + * where `{recording}` is a 1:1 mapping to each unique recording session + * during the conference. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of the recording. + * Format: `conferenceRecords/{conference_record}/recordings/{recording}` + * where `{recording}` is a 1:1 mapping to each unique recording session + * during the conference. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Current state. + * + * Generated from protobuf field .google.apps.meet.v2.Recording.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state. + * + * Generated from protobuf field .google.apps.meet.v2.Recording.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Meet\V2\Recording\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Timestamp when the recording started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. Timestamp when the recording started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. Timestamp when the recording ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Timestamp when the recording ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/AppsMeet/src/V2/Recording/State.php b/AppsMeet/src/V2/Recording/State.php new file mode 100644 index 000000000000..0d61923cb23e --- /dev/null +++ b/AppsMeet/src/V2/Recording/State.php @@ -0,0 +1,70 @@ +google.apps.meet.v2.Recording.State + */ +class State +{ + /** + * Default, never used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * An active recording session has started. + * + * Generated from protobuf enum STARTED = 1; + */ + const STARTED = 1; + /** + * This recording session has ended, but the recording file hasn't been + * generated yet. + * + * Generated from protobuf enum ENDED = 2; + */ + const ENDED = 2; + /** + * Recording file is generated and ready to download. + * + * Generated from protobuf enum FILE_GENERATED = 3; + */ + const FILE_GENERATED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::STARTED => 'STARTED', + self::ENDED => 'ENDED', + self::FILE_GENERATED => 'FILE_GENERATED', + ]; + + 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/AppsMeet/src/V2/SignedinUser.php b/AppsMeet/src/V2/SignedinUser.php new file mode 100644 index 000000000000..5b042d0097c9 --- /dev/null +++ b/AppsMeet/src/V2/SignedinUser.php @@ -0,0 +1,116 @@ +google.apps.meet.v2.SignedinUser + */ +class SignedinUser extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Unique ID for the user. Interoperable with Admin SDK API and + * People API. Format: `users/{user}` + * + * Generated from protobuf field string user = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $user = ''; + /** + * Output only. For a personal device, it's the user's first name and last + * name. For a robot account, it's the administrator-specified device name. + * For example, "Altostrat Room". + * + * Generated from protobuf field string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $display_name = ''; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $user + * Output only. Unique ID for the user. Interoperable with Admin SDK API and + * People API. Format: `users/{user}` + * @type string $display_name + * Output only. For a personal device, it's the user's first name and last + * name. For a robot account, it's the administrator-specified device name. + * For example, "Altostrat Room". + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Unique ID for the user. Interoperable with Admin SDK API and + * People API. Format: `users/{user}` + * + * Generated from protobuf field string user = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getUser() + { + return $this->user; + } + + /** + * Output only. Unique ID for the user. Interoperable with Admin SDK API and + * People API. Format: `users/{user}` + * + * Generated from protobuf field string user = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setUser($var) + { + GPBUtil::checkString($var, True); + $this->user = $var; + + return $this; + } + + /** + * Output only. For a personal device, it's the user's first name and last + * name. For a robot account, it's the administrator-specified device name. + * For example, "Altostrat Room". + * + * 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. For a personal device, it's the user's first name and last + * name. For a robot account, it's the administrator-specified device name. + * For example, "Altostrat Room". + * + * 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; + } + +} + diff --git a/AppsMeet/src/V2/Space.php b/AppsMeet/src/V2/Space.php new file mode 100644 index 000000000000..2ff86cf88efe --- /dev/null +++ b/AppsMeet/src/V2/Space.php @@ -0,0 +1,240 @@ +google.apps.meet.v2.Space + */ +class Space extends \Google\Protobuf\Internal\Message +{ + /** + * Immutable. Resource name of the space. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + */ + protected $name = ''; + /** + * Output only. URI used to join meetings, such as + * `https://meet.google.com/abc-mnop-xyz`. + * + * Generated from protobuf field string meeting_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $meeting_uri = ''; + /** + * Output only. Type friendly code to join the meeting. Format: + * `[a-z]+-[a-z]+-[a-z]+` such as `abc-mnop-xyz`. The maximum length is 128 + * characters. Can only be used as an alias of the space ID to get the space. + * + * Generated from protobuf field string meeting_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $meeting_code = ''; + /** + * Configuration pertaining to the meeting space. + * + * Generated from protobuf field .google.apps.meet.v2.SpaceConfig config = 5; + */ + protected $config = null; + /** + * Active conference, if it exists. + * + * Generated from protobuf field .google.apps.meet.v2.ActiveConference active_conference = 6; + */ + protected $active_conference = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Immutable. Resource name of the space. + * Format: `spaces/{space}` + * @type string $meeting_uri + * Output only. URI used to join meetings, such as + * `https://meet.google.com/abc-mnop-xyz`. + * @type string $meeting_code + * Output only. Type friendly code to join the meeting. Format: + * `[a-z]+-[a-z]+-[a-z]+` such as `abc-mnop-xyz`. The maximum length is 128 + * characters. Can only be used as an alias of the space ID to get the space. + * @type \Google\Apps\Meet\V2\SpaceConfig $config + * Configuration pertaining to the meeting space. + * @type \Google\Apps\Meet\V2\ActiveConference $active_conference + * Active conference, if it exists. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Immutable. Resource name of the space. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Immutable. Resource name of the space. + * Format: `spaces/{space}` + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = IMMUTABLE]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. URI used to join meetings, such as + * `https://meet.google.com/abc-mnop-xyz`. + * + * Generated from protobuf field string meeting_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMeetingUri() + { + return $this->meeting_uri; + } + + /** + * Output only. URI used to join meetings, such as + * `https://meet.google.com/abc-mnop-xyz`. + * + * Generated from protobuf field string meeting_uri = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMeetingUri($var) + { + GPBUtil::checkString($var, True); + $this->meeting_uri = $var; + + return $this; + } + + /** + * Output only. Type friendly code to join the meeting. Format: + * `[a-z]+-[a-z]+-[a-z]+` such as `abc-mnop-xyz`. The maximum length is 128 + * characters. Can only be used as an alias of the space ID to get the space. + * + * Generated from protobuf field string meeting_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getMeetingCode() + { + return $this->meeting_code; + } + + /** + * Output only. Type friendly code to join the meeting. Format: + * `[a-z]+-[a-z]+-[a-z]+` such as `abc-mnop-xyz`. The maximum length is 128 + * characters. Can only be used as an alias of the space ID to get the space. + * + * Generated from protobuf field string meeting_code = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setMeetingCode($var) + { + GPBUtil::checkString($var, True); + $this->meeting_code = $var; + + return $this; + } + + /** + * Configuration pertaining to the meeting space. + * + * Generated from protobuf field .google.apps.meet.v2.SpaceConfig config = 5; + * @return \Google\Apps\Meet\V2\SpaceConfig|null + */ + public function getConfig() + { + return $this->config; + } + + public function hasConfig() + { + return isset($this->config); + } + + public function clearConfig() + { + unset($this->config); + } + + /** + * Configuration pertaining to the meeting space. + * + * Generated from protobuf field .google.apps.meet.v2.SpaceConfig config = 5; + * @param \Google\Apps\Meet\V2\SpaceConfig $var + * @return $this + */ + public function setConfig($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Meet\V2\SpaceConfig::class); + $this->config = $var; + + return $this; + } + + /** + * Active conference, if it exists. + * + * Generated from protobuf field .google.apps.meet.v2.ActiveConference active_conference = 6; + * @return \Google\Apps\Meet\V2\ActiveConference|null + */ + public function getActiveConference() + { + return $this->active_conference; + } + + public function hasActiveConference() + { + return isset($this->active_conference); + } + + public function clearActiveConference() + { + unset($this->active_conference); + } + + /** + * Active conference, if it exists. + * + * Generated from protobuf field .google.apps.meet.v2.ActiveConference active_conference = 6; + * @param \Google\Apps\Meet\V2\ActiveConference $var + * @return $this + */ + public function setActiveConference($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Meet\V2\ActiveConference::class); + $this->active_conference = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/SpaceConfig.php b/AppsMeet/src/V2/SpaceConfig.php new file mode 100644 index 000000000000..4230bc46ef0d --- /dev/null +++ b/AppsMeet/src/V2/SpaceConfig.php @@ -0,0 +1,117 @@ +google.apps.meet.v2.SpaceConfig + */ +class SpaceConfig extends \Google\Protobuf\Internal\Message +{ + /** + * Access type of the meeting space that determines who can join without + * knocking. Default: The user's default access settings. Controlled by the + * user's admin for enterprise users or RESTRICTED. + * + * Generated from protobuf field .google.apps.meet.v2.SpaceConfig.AccessType access_type = 1; + */ + protected $access_type = 0; + /** + * Defines the entry points that can be used to join meetings hosted in this + * meeting space. + * Default: EntryPointAccess.ALL + * + * Generated from protobuf field .google.apps.meet.v2.SpaceConfig.EntryPointAccess entry_point_access = 2; + */ + protected $entry_point_access = 0; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type int $access_type + * Access type of the meeting space that determines who can join without + * knocking. Default: The user's default access settings. Controlled by the + * user's admin for enterprise users or RESTRICTED. + * @type int $entry_point_access + * Defines the entry points that can be used to join meetings hosted in this + * meeting space. + * Default: EntryPointAccess.ALL + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Access type of the meeting space that determines who can join without + * knocking. Default: The user's default access settings. Controlled by the + * user's admin for enterprise users or RESTRICTED. + * + * Generated from protobuf field .google.apps.meet.v2.SpaceConfig.AccessType access_type = 1; + * @return int + */ + public function getAccessType() + { + return $this->access_type; + } + + /** + * Access type of the meeting space that determines who can join without + * knocking. Default: The user's default access settings. Controlled by the + * user's admin for enterprise users or RESTRICTED. + * + * Generated from protobuf field .google.apps.meet.v2.SpaceConfig.AccessType access_type = 1; + * @param int $var + * @return $this + */ + public function setAccessType($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Meet\V2\SpaceConfig\AccessType::class); + $this->access_type = $var; + + return $this; + } + + /** + * Defines the entry points that can be used to join meetings hosted in this + * meeting space. + * Default: EntryPointAccess.ALL + * + * Generated from protobuf field .google.apps.meet.v2.SpaceConfig.EntryPointAccess entry_point_access = 2; + * @return int + */ + public function getEntryPointAccess() + { + return $this->entry_point_access; + } + + /** + * Defines the entry points that can be used to join meetings hosted in this + * meeting space. + * Default: EntryPointAccess.ALL + * + * Generated from protobuf field .google.apps.meet.v2.SpaceConfig.EntryPointAccess entry_point_access = 2; + * @param int $var + * @return $this + */ + public function setEntryPointAccess($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Meet\V2\SpaceConfig\EntryPointAccess::class); + $this->entry_point_access = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/SpaceConfig/AccessType.php b/AppsMeet/src/V2/SpaceConfig/AccessType.php new file mode 100644 index 000000000000..4b6a75ac49c3 --- /dev/null +++ b/AppsMeet/src/V2/SpaceConfig/AccessType.php @@ -0,0 +1,73 @@ +google.apps.meet.v2.SpaceConfig.AccessType + */ +class AccessType +{ + /** + * Default value specified by the user's organization. + * Note: This is never returned, as the configured access type is + * returned instead. + * + * Generated from protobuf enum ACCESS_TYPE_UNSPECIFIED = 0; + */ + const ACCESS_TYPE_UNSPECIFIED = 0; + /** + * Anyone with the join information (for example, the URL or phone access + * information) can join without knocking. + * + * Generated from protobuf enum OPEN = 1; + */ + const OPEN = 1; + /** + * Members of the host's organization, invited external users, and dial-in + * users can join without knocking. Everyone else must knock. + * + * Generated from protobuf enum TRUSTED = 2; + */ + const TRUSTED = 2; + /** + * Only invitees can join without knocking. Everyone else must knock. + * + * Generated from protobuf enum RESTRICTED = 3; + */ + const RESTRICTED = 3; + + private static $valueToName = [ + self::ACCESS_TYPE_UNSPECIFIED => 'ACCESS_TYPE_UNSPECIFIED', + self::OPEN => 'OPEN', + self::TRUSTED => 'TRUSTED', + self::RESTRICTED => 'RESTRICTED', + ]; + + 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/AppsMeet/src/V2/SpaceConfig/EntryPointAccess.php b/AppsMeet/src/V2/SpaceConfig/EntryPointAccess.php new file mode 100644 index 000000000000..1b17d7c7c63c --- /dev/null +++ b/AppsMeet/src/V2/SpaceConfig/EntryPointAccess.php @@ -0,0 +1,65 @@ +google.apps.meet.v2.SpaceConfig.EntryPointAccess + */ +class EntryPointAccess +{ + /** + * Unused. + * + * Generated from protobuf enum ENTRY_POINT_ACCESS_UNSPECIFIED = 0; + */ + const ENTRY_POINT_ACCESS_UNSPECIFIED = 0; + /** + * All entry points are allowed. + * + * Generated from protobuf enum ALL = 1; + */ + const ALL = 1; + /** + * Only entry points owned by the Google Cloud project that created the + * space can be used to join meetings in this space. Apps can use the Meet + * Embed SDK Web or mobile Meet SDKs to create owned entry points. + * + * Generated from protobuf enum CREATOR_APP_ONLY = 2; + */ + const CREATOR_APP_ONLY = 2; + + private static $valueToName = [ + self::ENTRY_POINT_ACCESS_UNSPECIFIED => 'ENTRY_POINT_ACCESS_UNSPECIFIED', + self::ALL => 'ALL', + self::CREATOR_APP_ONLY => 'CREATOR_APP_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); + } +} + + diff --git a/AppsMeet/src/V2/Transcript.php b/AppsMeet/src/V2/Transcript.php new file mode 100644 index 000000000000..780c1ac0fad8 --- /dev/null +++ b/AppsMeet/src/V2/Transcript.php @@ -0,0 +1,244 @@ +google.apps.meet.v2.Transcript + */ +class Transcript extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of the transcript. + * Format: `conferenceRecords/{conference_record}/transcripts/{transcript}`, + * where `{transcript}` is a 1:1 mapping to each unique transcription session + * of the conference. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Current state. + * + * Generated from protobuf field .google.apps.meet.v2.Transcript.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $state = 0; + /** + * Output only. Timestamp when the transcript started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. Timestamp when the transcript stopped. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + protected $destination; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type \Google\Apps\Meet\V2\DocsDestination $docs_destination + * Output only. Where the Google Docs transcript is saved. + * @type string $name + * Output only. Resource name of the transcript. + * Format: `conferenceRecords/{conference_record}/transcripts/{transcript}`, + * where `{transcript}` is a 1:1 mapping to each unique transcription session + * of the conference. + * @type int $state + * Output only. Current state. + * @type \Google\Protobuf\Timestamp $start_time + * Output only. Timestamp when the transcript started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Timestamp when the transcript stopped. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Where the Google Docs transcript is saved. + * + * Generated from protobuf field .google.apps.meet.v2.DocsDestination docs_destination = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Apps\Meet\V2\DocsDestination|null + */ + public function getDocsDestination() + { + return $this->readOneof(6); + } + + public function hasDocsDestination() + { + return $this->hasOneof(6); + } + + /** + * Output only. Where the Google Docs transcript is saved. + * + * Generated from protobuf field .google.apps.meet.v2.DocsDestination docs_destination = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Apps\Meet\V2\DocsDestination $var + * @return $this + */ + public function setDocsDestination($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Meet\V2\DocsDestination::class); + $this->writeOneof(6, $var); + + return $this; + } + + /** + * Output only. Resource name of the transcript. + * Format: `conferenceRecords/{conference_record}/transcripts/{transcript}`, + * where `{transcript}` is a 1:1 mapping to each unique transcription session + * of the conference. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of the transcript. + * Format: `conferenceRecords/{conference_record}/transcripts/{transcript}`, + * where `{transcript}` is a 1:1 mapping to each unique transcription session + * of the conference. + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Current state. + * + * Generated from protobuf field .google.apps.meet.v2.Transcript.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return int + */ + public function getState() + { + return $this->state; + } + + /** + * Output only. Current state. + * + * Generated from protobuf field .google.apps.meet.v2.Transcript.State state = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param int $var + * @return $this + */ + public function setState($var) + { + GPBUtil::checkEnum($var, \Google\Apps\Meet\V2\Transcript\State::class); + $this->state = $var; + + return $this; + } + + /** + * Output only. Timestamp when the transcript started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. Timestamp when the transcript started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. Timestamp when the transcript stopped. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Timestamp when the transcript stopped. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->whichOneof("destination"); + } + +} + diff --git a/AppsMeet/src/V2/Transcript/State.php b/AppsMeet/src/V2/Transcript/State.php new file mode 100644 index 000000000000..71f9681248ff --- /dev/null +++ b/AppsMeet/src/V2/Transcript/State.php @@ -0,0 +1,70 @@ +google.apps.meet.v2.Transcript.State + */ +class State +{ + /** + * Default, never used. + * + * Generated from protobuf enum STATE_UNSPECIFIED = 0; + */ + const STATE_UNSPECIFIED = 0; + /** + * An active transcript session has started. + * + * Generated from protobuf enum STARTED = 1; + */ + const STARTED = 1; + /** + * This transcript session has ended, but the transcript file hasn't been + * generated yet. + * + * Generated from protobuf enum ENDED = 2; + */ + const ENDED = 2; + /** + * Transcript file is generated and ready to download. + * + * Generated from protobuf enum FILE_GENERATED = 3; + */ + const FILE_GENERATED = 3; + + private static $valueToName = [ + self::STATE_UNSPECIFIED => 'STATE_UNSPECIFIED', + self::STARTED => 'STARTED', + self::ENDED => 'ENDED', + self::FILE_GENERATED => 'FILE_GENERATED', + ]; + + 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/AppsMeet/src/V2/TranscriptEntry.php b/AppsMeet/src/V2/TranscriptEntry.php new file mode 100644 index 000000000000..657c390882ac --- /dev/null +++ b/AppsMeet/src/V2/TranscriptEntry.php @@ -0,0 +1,269 @@ +google.apps.meet.v2.TranscriptEntry + */ +class TranscriptEntry extends \Google\Protobuf\Internal\Message +{ + /** + * Output only. Resource name of the entry. Format: + * "conferenceRecords/{conference_record}/transcripts/{transcript}/entries/{entry}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $name = ''; + /** + * Output only. Refers to the participant who speaks. + * + * Generated from protobuf field string participant = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + */ + protected $participant = ''; + /** + * Output only. The transcribed text of the participant's voice, at maximum + * 10K words. Note that the limit is subject to change. + * + * Generated from protobuf field string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $text = ''; + /** + * Output only. Language of spoken text, such as "en-US". + * IETF BCP 47 syntax (https://tools.ietf.org/html/bcp47) + * + * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $language_code = ''; + /** + * Output only. Timestamp when the transcript entry started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $start_time = null; + /** + * Output only. Timestamp when the transcript entry ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + */ + protected $end_time = null; + + /** + * Constructor. + * + * @param array $data { + * Optional. Data for populating the Message object. + * + * @type string $name + * Output only. Resource name of the entry. Format: + * "conferenceRecords/{conference_record}/transcripts/{transcript}/entries/{entry}" + * @type string $participant + * Output only. Refers to the participant who speaks. + * @type string $text + * Output only. The transcribed text of the participant's voice, at maximum + * 10K words. Note that the limit is subject to change. + * @type string $language_code + * Output only. Language of spoken text, such as "en-US". + * IETF BCP 47 syntax (https://tools.ietf.org/html/bcp47) + * @type \Google\Protobuf\Timestamp $start_time + * Output only. Timestamp when the transcript entry started. + * @type \Google\Protobuf\Timestamp $end_time + * Output only. Timestamp when the transcript entry ended. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Resource::initOnce(); + parent::__construct($data); + } + + /** + * Output only. Resource name of the entry. Format: + * "conferenceRecords/{conference_record}/transcripts/{transcript}/entries/{entry}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getName() + { + return $this->name; + } + + /** + * Output only. Resource name of the entry. Format: + * "conferenceRecords/{conference_record}/transcripts/{transcript}/entries/{entry}" + * + * Generated from protobuf field string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setName($var) + { + GPBUtil::checkString($var, True); + $this->name = $var; + + return $this; + } + + /** + * Output only. Refers to the participant who speaks. + * + * Generated from protobuf field string participant = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @return string + */ + public function getParticipant() + { + return $this->participant; + } + + /** + * Output only. Refers to the participant who speaks. + * + * Generated from protobuf field string participant = 2 [(.google.api.field_behavior) = OUTPUT_ONLY, (.google.api.resource_reference) = { + * @param string $var + * @return $this + */ + public function setParticipant($var) + { + GPBUtil::checkString($var, True); + $this->participant = $var; + + return $this; + } + + /** + * Output only. The transcribed text of the participant's voice, at maximum + * 10K words. Note that the limit is subject to change. + * + * Generated from protobuf field string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getText() + { + return $this->text; + } + + /** + * Output only. The transcribed text of the participant's voice, at maximum + * 10K words. Note that the limit is subject to change. + * + * Generated from protobuf field string text = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setText($var) + { + GPBUtil::checkString($var, True); + $this->text = $var; + + return $this; + } + + /** + * Output only. Language of spoken text, such as "en-US". + * IETF BCP 47 syntax (https://tools.ietf.org/html/bcp47) + * + * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return string + */ + public function getLanguageCode() + { + return $this->language_code; + } + + /** + * Output only. Language of spoken text, such as "en-US". + * IETF BCP 47 syntax (https://tools.ietf.org/html/bcp47) + * + * Generated from protobuf field string language_code = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param string $var + * @return $this + */ + public function setLanguageCode($var) + { + GPBUtil::checkString($var, True); + $this->language_code = $var; + + return $this; + } + + /** + * Output only. Timestamp when the transcript entry started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getStartTime() + { + return $this->start_time; + } + + public function hasStartTime() + { + return isset($this->start_time); + } + + public function clearStartTime() + { + unset($this->start_time); + } + + /** + * Output only. Timestamp when the transcript entry started. + * + * Generated from protobuf field .google.protobuf.Timestamp start_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setStartTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->start_time = $var; + + return $this; + } + + /** + * Output only. Timestamp when the transcript entry ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @return \Google\Protobuf\Timestamp|null + */ + public function getEndTime() + { + return $this->end_time; + } + + public function hasEndTime() + { + return isset($this->end_time); + } + + public function clearEndTime() + { + unset($this->end_time); + } + + /** + * Output only. Timestamp when the transcript entry ended. + * + * Generated from protobuf field .google.protobuf.Timestamp end_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * @param \Google\Protobuf\Timestamp $var + * @return $this + */ + public function setEndTime($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class); + $this->end_time = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/UpdateSpaceRequest.php b/AppsMeet/src/V2/UpdateSpaceRequest.php new file mode 100644 index 000000000000..2bdfc1671c1e --- /dev/null +++ b/AppsMeet/src/V2/UpdateSpaceRequest.php @@ -0,0 +1,151 @@ +google.apps.meet.v2.UpdateSpaceRequest + */ +class UpdateSpaceRequest extends \Google\Protobuf\Internal\Message +{ + /** + * Required. Space to be updated. + * + * Generated from protobuf field .google.apps.meet.v2.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + protected $space = null; + /** + * Optional. Field mask used to specify the fields to be updated in the space. + * If update_mask isn't provided, it defaults to '*' and updates all + * fields provided in the request, including deleting fields not set in the + * request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + protected $update_mask = null; + + /** + * @param \Google\Apps\Meet\V2\Space $space Required. Space to be updated. + * @param \Google\Protobuf\FieldMask $updateMask Optional. Field mask used to specify the fields to be updated in the space. + * If update_mask isn't provided, it defaults to '*' and updates all + * fields provided in the request, including deleting fields not set in the + * request. + * + * @return \Google\Apps\Meet\V2\UpdateSpaceRequest + * + * @experimental + */ + public static function build(\Google\Apps\Meet\V2\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\Meet\V2\Space $space + * Required. Space to be updated. + * @type \Google\Protobuf\FieldMask $update_mask + * Optional. Field mask used to specify the fields to be updated in the space. + * If update_mask isn't provided, it defaults to '*' and updates all + * fields provided in the request, including deleting fields not set in the + * request. + * } + */ + public function __construct($data = NULL) { + \GPBMetadata\Google\Apps\Meet\V2\Service::initOnce(); + parent::__construct($data); + } + + /** + * Required. Space to be updated. + * + * Generated from protobuf field .google.apps.meet.v2.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @return \Google\Apps\Meet\V2\Space|null + */ + public function getSpace() + { + return $this->space; + } + + public function hasSpace() + { + return isset($this->space); + } + + public function clearSpace() + { + unset($this->space); + } + + /** + * Required. Space to be updated. + * + * Generated from protobuf field .google.apps.meet.v2.Space space = 1 [(.google.api.field_behavior) = REQUIRED]; + * @param \Google\Apps\Meet\V2\Space $var + * @return $this + */ + public function setSpace($var) + { + GPBUtil::checkMessage($var, \Google\Apps\Meet\V2\Space::class); + $this->space = $var; + + return $this; + } + + /** + * Optional. Field mask used to specify the fields to be updated in the space. + * If update_mask isn't provided, it defaults to '*' and updates all + * fields provided in the request, including deleting fields not set in the + * request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @return \Google\Protobuf\FieldMask|null + */ + public function getUpdateMask() + { + return $this->update_mask; + } + + public function hasUpdateMask() + { + return isset($this->update_mask); + } + + public function clearUpdateMask() + { + unset($this->update_mask); + } + + /** + * Optional. Field mask used to specify the fields to be updated in the space. + * If update_mask isn't provided, it defaults to '*' and updates all + * fields provided in the request, including deleting fields not set in the + * request. + * + * Generated from protobuf field .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * @param \Google\Protobuf\FieldMask $var + * @return $this + */ + public function setUpdateMask($var) + { + GPBUtil::checkMessage($var, \Google\Protobuf\FieldMask::class); + $this->update_mask = $var; + + return $this; + } + +} + diff --git a/AppsMeet/src/V2/gapic_metadata.json b/AppsMeet/src/V2/gapic_metadata.json new file mode 100644 index 000000000000..47e570b1f975 --- /dev/null +++ b/AppsMeet/src/V2/gapic_metadata.json @@ -0,0 +1,107 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services\/RPCs to the corresponding library clients\/methods", + "language": "php", + "protoPackage": "google.apps.meet.v2", + "libraryPackage": "Google\\Apps\\Meet\\V2", + "services": { + "SpacesService": { + "clients": { + "grpc": { + "libraryClient": "SpacesServiceGapicClient", + "rpcs": { + "CreateSpace": { + "methods": [ + "createSpace" + ] + }, + "EndActiveConference": { + "methods": [ + "endActiveConference" + ] + }, + "GetSpace": { + "methods": [ + "getSpace" + ] + }, + "UpdateSpace": { + "methods": [ + "updateSpace" + ] + } + } + } + } + }, + "ConferenceRecordsService": { + "clients": { + "grpc": { + "libraryClient": "ConferenceRecordsServiceGapicClient", + "rpcs": { + "GetConferenceRecord": { + "methods": [ + "getConferenceRecord" + ] + }, + "GetParticipant": { + "methods": [ + "getParticipant" + ] + }, + "GetParticipantSession": { + "methods": [ + "getParticipantSession" + ] + }, + "GetRecording": { + "methods": [ + "getRecording" + ] + }, + "GetTranscript": { + "methods": [ + "getTranscript" + ] + }, + "GetTranscriptEntry": { + "methods": [ + "getTranscriptEntry" + ] + }, + "ListConferenceRecords": { + "methods": [ + "listConferenceRecords" + ] + }, + "ListParticipantSessions": { + "methods": [ + "listParticipantSessions" + ] + }, + "ListParticipants": { + "methods": [ + "listParticipants" + ] + }, + "ListRecordings": { + "methods": [ + "listRecordings" + ] + }, + "ListTranscriptEntries": { + "methods": [ + "listTranscriptEntries" + ] + }, + "ListTranscripts": { + "methods": [ + "listTranscripts" + ] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/AppsMeet/src/V2/resources/conference_records_service_client_config.json b/AppsMeet/src/V2/resources/conference_records_service_client_config.json new file mode 100644 index 000000000000..9e98eff43d7f --- /dev/null +++ b/AppsMeet/src/V2/resources/conference_records_service_client_config.json @@ -0,0 +1,94 @@ +{ + "interfaces": { + "google.apps.meet.v2.ConferenceRecordsService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "GetConferenceRecord": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetParticipant": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetParticipantSession": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetRecording": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTranscript": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "GetTranscriptEntry": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListConferenceRecords": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListParticipantSessions": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListParticipants": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListRecordings": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTranscriptEntries": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "ListTranscripts": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + } + } + } + } +} diff --git a/AppsMeet/src/V2/resources/conference_records_service_descriptor_config.php b/AppsMeet/src/V2/resources/conference_records_service_descriptor_config.php new file mode 100644 index 000000000000..a0e840b329b3 --- /dev/null +++ b/AppsMeet/src/V2/resources/conference_records_service_descriptor_config.php @@ -0,0 +1,200 @@ + [ + 'google.apps.meet.v2.ConferenceRecordsService' => [ + 'GetConferenceRecord' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Meet\V2\ConferenceRecord', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetParticipant' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Meet\V2\Participant', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetParticipantSession' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Meet\V2\ParticipantSession', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetRecording' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Meet\V2\Recording', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTranscript' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Meet\V2\Transcript', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetTranscriptEntry' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Meet\V2\TranscriptEntry', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'ListConferenceRecords' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getConferenceRecords', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Meet\V2\ListConferenceRecordsResponse', + ], + 'ListParticipantSessions' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getParticipantSessions', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Meet\V2\ListParticipantSessionsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListParticipants' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getParticipants', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Meet\V2\ListParticipantsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListRecordings' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getRecordings', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Meet\V2\ListRecordingsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTranscriptEntries' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTranscriptEntries', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Meet\V2\ListTranscriptEntriesResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'ListTranscripts' => [ + 'pageStreaming' => [ + 'requestPageTokenGetMethod' => 'getPageToken', + 'requestPageTokenSetMethod' => 'setPageToken', + 'requestPageSizeGetMethod' => 'getPageSize', + 'requestPageSizeSetMethod' => 'setPageSize', + 'responsePageTokenGetMethod' => 'getNextPageToken', + 'resourcesGetMethod' => 'getTranscripts', + ], + 'callType' => \Google\ApiCore\Call::PAGINATED_CALL, + 'responseType' => 'Google\Apps\Meet\V2\ListTranscriptsResponse', + 'headerParams' => [ + [ + 'keyName' => 'parent', + 'fieldAccessors' => [ + 'getParent', + ], + ], + ], + ], + 'templateMap' => [ + 'conferenceRecord' => 'conferenceRecords/{conference_record}', + 'participant' => 'conferenceRecords/{conference_record}/participants/{participant}', + 'participantSession' => 'conferenceRecords/{conference_record}/participants/{participant}/participantSessions/{participant_session}', + 'recording' => 'conferenceRecords/{conference_record}/recordings/{recording}', + 'transcript' => 'conferenceRecords/{conference_record}/transcripts/{transcript}', + 'transcriptEntry' => 'conferenceRecords/{conference_record}/transcripts/{transcript}/entries/{entry}', + ], + ], + ], +]; diff --git a/AppsMeet/src/V2/resources/conference_records_service_rest_client_config.php b/AppsMeet/src/V2/resources/conference_records_service_rest_client_config.php new file mode 100644 index 000000000000..94d206093ef8 --- /dev/null +++ b/AppsMeet/src/V2/resources/conference_records_service_rest_client_config.php @@ -0,0 +1,134 @@ + [ + 'google.apps.meet.v2.ConferenceRecordsService' => [ + 'GetConferenceRecord' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=conferenceRecords/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetParticipant' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=conferenceRecords/*/participants/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetParticipantSession' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=conferenceRecords/*/participants/*/participantSessions/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetRecording' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=conferenceRecords/*/recordings/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTranscript' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=conferenceRecords/*/transcripts/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetTranscriptEntry' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=conferenceRecords/*/transcripts/*/entries/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'ListConferenceRecords' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/conferenceRecords', + ], + 'ListParticipantSessions' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=conferenceRecords/*/participants/*}/participantSessions', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListParticipants' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=conferenceRecords/*}/participants', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListRecordings' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=conferenceRecords/*}/recordings', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTranscriptEntries' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=conferenceRecords/*/transcripts/*}/entries', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + 'ListTranscripts' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{parent=conferenceRecords/*}/transcripts', + 'placeholders' => [ + 'parent' => [ + 'getters' => [ + 'getParent', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AppsMeet/src/V2/resources/spaces_service_client_config.json b/AppsMeet/src/V2/resources/spaces_service_client_config.json new file mode 100644 index 000000000000..0afaf95a93f7 --- /dev/null +++ b/AppsMeet/src/V2/resources/spaces_service_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.apps.meet.v2.SpacesService": { + "retry_codes": { + "no_retry_codes": [], + "retry_policy_1_codes": [ + "UNAVAILABLE" + ], + "no_retry_1_codes": [] + }, + "retry_params": { + "no_retry_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 0, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 0, + "total_timeout_millis": 0 + }, + "retry_policy_1_params": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + }, + "no_retry_1_params": { + "initial_retry_delay_millis": 0, + "retry_delay_multiplier": 0.0, + "max_retry_delay_millis": 0, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1.0, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 60000 + } + }, + "methods": { + "CreateSpace": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "EndActiveConference": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + }, + "GetSpace": { + "timeout_millis": 60000, + "retry_codes_name": "retry_policy_1_codes", + "retry_params_name": "retry_policy_1_params" + }, + "UpdateSpace": { + "timeout_millis": 60000, + "retry_codes_name": "no_retry_1_codes", + "retry_params_name": "no_retry_1_params" + } + } + } + } +} diff --git a/AppsMeet/src/V2/resources/spaces_service_descriptor_config.php b/AppsMeet/src/V2/resources/spaces_service_descriptor_config.php new file mode 100644 index 000000000000..b4be613d067a --- /dev/null +++ b/AppsMeet/src/V2/resources/spaces_service_descriptor_config.php @@ -0,0 +1,53 @@ + [ + 'google.apps.meet.v2.SpacesService' => [ + 'CreateSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Meet\V2\Space', + ], + 'EndActiveConference' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Protobuf\GPBEmpty', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'GetSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Meet\V2\Space', + 'headerParams' => [ + [ + 'keyName' => 'name', + 'fieldAccessors' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSpace' => [ + 'callType' => \Google\ApiCore\Call::UNARY_CALL, + 'responseType' => 'Google\Apps\Meet\V2\Space', + 'headerParams' => [ + [ + 'keyName' => 'space.name', + 'fieldAccessors' => [ + 'getSpace', + 'getName', + ], + ], + ], + ], + 'templateMap' => [ + 'conferenceRecord' => 'conferenceRecords/{conference_record}', + 'space' => 'spaces/{space}', + ], + ], + ], +]; diff --git a/AppsMeet/src/V2/resources/spaces_service_rest_client_config.php b/AppsMeet/src/V2/resources/spaces_service_rest_client_config.php new file mode 100644 index 000000000000..bc49aea29a41 --- /dev/null +++ b/AppsMeet/src/V2/resources/spaces_service_rest_client_config.php @@ -0,0 +1,50 @@ + [ + 'google.apps.meet.v2.SpacesService' => [ + 'CreateSpace' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/spaces', + 'body' => 'space', + ], + 'EndActiveConference' => [ + 'method' => 'post', + 'uriTemplate' => '/v2/{name=spaces/*}:endActiveConference', + 'body' => '*', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'GetSpace' => [ + 'method' => 'get', + 'uriTemplate' => '/v2/{name=spaces/*}', + 'placeholders' => [ + 'name' => [ + 'getters' => [ + 'getName', + ], + ], + ], + ], + 'UpdateSpace' => [ + 'method' => 'patch', + 'uriTemplate' => '/v2/{space.name=spaces/*}', + 'body' => 'space', + 'placeholders' => [ + 'space.name' => [ + 'getters' => [ + 'getSpace', + 'getName', + ], + ], + ], + ], + ], + ], + 'numericEnums' => true, +]; diff --git a/AppsMeet/tests/Unit/V2/Client/ConferenceRecordsServiceClientTest.php b/AppsMeet/tests/Unit/V2/Client/ConferenceRecordsServiceClientTest.php new file mode 100644 index 000000000000..6c4f08c785da --- /dev/null +++ b/AppsMeet/tests/Unit/V2/Client/ConferenceRecordsServiceClientTest.php @@ -0,0 +1,944 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return ConferenceRecordsServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new ConferenceRecordsServiceClient($options); + } + + /** @test */ + public function getConferenceRecordTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $space = 'space109637894'; + $expectedResponse = new ConferenceRecord(); + $expectedResponse->setName($name2); + $expectedResponse->setSpace($space); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conferenceRecordName('[CONFERENCE_RECORD]'); + $request = (new GetConferenceRecordRequest())->setName($formattedName); + $response = $gapicClient->getConferenceRecord($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.ConferenceRecordsService/GetConferenceRecord', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConferenceRecordExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->conferenceRecordName('[CONFERENCE_RECORD]'); + $request = (new GetConferenceRecordRequest())->setName($formattedName); + try { + $gapicClient->getConferenceRecord($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getParticipantTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Participant(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->participantName('[CONFERENCE_RECORD]', '[PARTICIPANT]'); + $request = (new GetParticipantRequest())->setName($formattedName); + $response = $gapicClient->getParticipant($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.ConferenceRecordsService/GetParticipant', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getParticipantExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->participantName('[CONFERENCE_RECORD]', '[PARTICIPANT]'); + $request = (new GetParticipantRequest())->setName($formattedName); + try { + $gapicClient->getParticipant($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getParticipantSessionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new ParticipantSession(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->participantSessionName( + '[CONFERENCE_RECORD]', + '[PARTICIPANT]', + '[PARTICIPANT_SESSION]' + ); + $request = (new GetParticipantSessionRequest())->setName($formattedName); + $response = $gapicClient->getParticipantSession($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.ConferenceRecordsService/GetParticipantSession', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getParticipantSessionExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->participantSessionName( + '[CONFERENCE_RECORD]', + '[PARTICIPANT]', + '[PARTICIPANT_SESSION]' + ); + $request = (new GetParticipantSessionRequest())->setName($formattedName); + try { + $gapicClient->getParticipantSession($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRecordingTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Recording(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->recordingName('[CONFERENCE_RECORD]', '[RECORDING]'); + $request = (new GetRecordingRequest())->setName($formattedName); + $response = $gapicClient->getRecording($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.ConferenceRecordsService/GetRecording', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getRecordingExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->recordingName('[CONFERENCE_RECORD]', '[RECORDING]'); + $request = (new GetRecordingRequest())->setName($formattedName); + try { + $gapicClient->getRecording($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTranscriptTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $expectedResponse = new Transcript(); + $expectedResponse->setName($name2); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->transcriptName('[CONFERENCE_RECORD]', '[TRANSCRIPT]'); + $request = (new GetTranscriptRequest())->setName($formattedName); + $response = $gapicClient->getTranscript($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.ConferenceRecordsService/GetTranscript', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTranscriptExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->transcriptName('[CONFERENCE_RECORD]', '[TRANSCRIPT]'); + $request = (new GetTranscriptRequest())->setName($formattedName); + try { + $gapicClient->getTranscript($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTranscriptEntryTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $participant = 'participant767422259'; + $text = 'text3556653'; + $languageCode = 'languageCode-412800396'; + $expectedResponse = new TranscriptEntry(); + $expectedResponse->setName($name2); + $expectedResponse->setParticipant($participant); + $expectedResponse->setText($text); + $expectedResponse->setLanguageCode($languageCode); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->transcriptEntryName('[CONFERENCE_RECORD]', '[TRANSCRIPT]', '[ENTRY]'); + $request = (new GetTranscriptEntryRequest())->setName($formattedName); + $response = $gapicClient->getTranscriptEntry($request); + $this->assertEquals($expectedResponse, $response); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.ConferenceRecordsService/GetTranscriptEntry', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getTranscriptEntryExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->transcriptEntryName('[CONFERENCE_RECORD]', '[TRANSCRIPT]', '[ENTRY]'); + $request = (new GetTranscriptEntryRequest())->setName($formattedName); + try { + $gapicClient->getTranscriptEntry($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConferenceRecordsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $conferenceRecordsElement = new ConferenceRecord(); + $conferenceRecords = [$conferenceRecordsElement]; + $expectedResponse = new ListConferenceRecordsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setConferenceRecords($conferenceRecords); + $transport->addResponse($expectedResponse); + $request = new ListConferenceRecordsRequest(); + $response = $gapicClient->listConferenceRecords($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getConferenceRecords()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.ConferenceRecordsService/ListConferenceRecords', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listConferenceRecordsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 ListConferenceRecordsRequest(); + try { + $gapicClient->listConferenceRecords($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listParticipantSessionsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $participantSessionsElement = new ParticipantSession(); + $participantSessions = [$participantSessionsElement]; + $expectedResponse = new ListParticipantSessionsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setParticipantSessions($participantSessions); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->participantName('[CONFERENCE_RECORD]', '[PARTICIPANT]'); + $request = (new ListParticipantSessionsRequest())->setParent($formattedParent); + $response = $gapicClient->listParticipantSessions($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getParticipantSessions()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.ConferenceRecordsService/ListParticipantSessions', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listParticipantSessionsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->participantName('[CONFERENCE_RECORD]', '[PARTICIPANT]'); + $request = (new ListParticipantSessionsRequest())->setParent($formattedParent); + try { + $gapicClient->listParticipantSessions($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listParticipantsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $totalSize = 705419236; + $participantsElement = new Participant(); + $participants = [$participantsElement]; + $expectedResponse = new ListParticipantsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTotalSize($totalSize); + $expectedResponse->setParticipants($participants); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->conferenceRecordName('[CONFERENCE_RECORD]'); + $request = (new ListParticipantsRequest())->setParent($formattedParent); + $response = $gapicClient->listParticipants($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getParticipants()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.ConferenceRecordsService/ListParticipants', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listParticipantsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->conferenceRecordName('[CONFERENCE_RECORD]'); + $request = (new ListParticipantsRequest())->setParent($formattedParent); + try { + $gapicClient->listParticipants($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRecordingsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $recordingsElement = new Recording(); + $recordings = [$recordingsElement]; + $expectedResponse = new ListRecordingsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setRecordings($recordings); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->conferenceRecordName('[CONFERENCE_RECORD]'); + $request = (new ListRecordingsRequest())->setParent($formattedParent); + $response = $gapicClient->listRecordings($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getRecordings()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.ConferenceRecordsService/ListRecordings', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listRecordingsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->conferenceRecordName('[CONFERENCE_RECORD]'); + $request = (new ListRecordingsRequest())->setParent($formattedParent); + try { + $gapicClient->listRecordings($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTranscriptEntriesTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $transcriptEntriesElement = new TranscriptEntry(); + $transcriptEntries = [$transcriptEntriesElement]; + $expectedResponse = new ListTranscriptEntriesResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTranscriptEntries($transcriptEntries); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->transcriptName('[CONFERENCE_RECORD]', '[TRANSCRIPT]'); + $request = (new ListTranscriptEntriesRequest())->setParent($formattedParent); + $response = $gapicClient->listTranscriptEntries($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTranscriptEntries()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.ConferenceRecordsService/ListTranscriptEntries', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTranscriptEntriesExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->transcriptName('[CONFERENCE_RECORD]', '[TRANSCRIPT]'); + $request = (new ListTranscriptEntriesRequest())->setParent($formattedParent); + try { + $gapicClient->listTranscriptEntries($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTranscriptsTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $nextPageToken = ''; + $transcriptsElement = new Transcript(); + $transcripts = [$transcriptsElement]; + $expectedResponse = new ListTranscriptsResponse(); + $expectedResponse->setNextPageToken($nextPageToken); + $expectedResponse->setTranscripts($transcripts); + $transport->addResponse($expectedResponse); + // Mock request + $formattedParent = $gapicClient->conferenceRecordName('[CONFERENCE_RECORD]'); + $request = (new ListTranscriptsRequest())->setParent($formattedParent); + $response = $gapicClient->listTranscripts($request); + $this->assertEquals($expectedResponse, $response->getPage()->getResponseObject()); + $resources = iterator_to_array($response->iterateAllElements()); + $this->assertSame(1, count($resources)); + $this->assertEquals($expectedResponse->getTranscripts()[0], $resources[0]); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.ConferenceRecordsService/ListTranscripts', $actualFuncCall); + $actualValue = $actualRequestObject->getParent(); + $this->assertProtobufEquals($formattedParent, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function listTranscriptsExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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->conferenceRecordName('[CONFERENCE_RECORD]'); + $request = (new ListTranscriptsRequest())->setParent($formattedParent); + try { + $gapicClient->listTranscripts($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $ex->getCode()); + $this->assertEquals($expectedExceptionMessage, $ex->getMessage()); + } + // Call popReceivedCalls to ensure the stub is exhausted + $transport->popReceivedCalls(); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function getConferenceRecordAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name2 = 'name2-1052831874'; + $space = 'space109637894'; + $expectedResponse = new ConferenceRecord(); + $expectedResponse->setName($name2); + $expectedResponse->setSpace($space); + $transport->addResponse($expectedResponse); + // Mock request + $formattedName = $gapicClient->conferenceRecordName('[CONFERENCE_RECORD]'); + $request = (new GetConferenceRecordRequest())->setName($formattedName); + $response = $gapicClient->getConferenceRecordAsync($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.apps.meet.v2.ConferenceRecordsService/GetConferenceRecord', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } +} diff --git a/AppsMeet/tests/Unit/V2/Client/SpacesServiceClientTest.php b/AppsMeet/tests/Unit/V2/Client/SpacesServiceClientTest.php new file mode 100644 index 000000000000..f871893372c4 --- /dev/null +++ b/AppsMeet/tests/Unit/V2/Client/SpacesServiceClientTest.php @@ -0,0 +1,359 @@ +getMockBuilder(CredentialsWrapper::class) + ->disableOriginalConstructor() + ->getMock(); + } + + /** @return SpacesServiceClient */ + private function createClient(array $options = []) + { + $options += [ + 'credentials' => $this->createCredentials(), + ]; + return new SpacesServiceClient($options); + } + + /** @test */ + public function createSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $meetingUri = 'meetingUri-883054232'; + $meetingCode = 'meetingCode-1605416591'; + $expectedResponse = new Space(); + $expectedResponse->setName($name); + $expectedResponse->setMeetingUri($meetingUri); + $expectedResponse->setMeetingCode($meetingCode); + $transport->addResponse($expectedResponse); + $request = new CreateSpaceRequest(); + $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.apps.meet.v2.SpacesService/CreateSpace', $actualFuncCall); + $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); + $request = new CreateSpaceRequest(); + 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 endActiveConferenceTest() + { + $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 EndActiveConferenceRequest())->setName($formattedName); + $gapicClient->endActiveConference($request); + $actualRequests = $transport->popReceivedCalls(); + $this->assertSame(1, count($actualRequests)); + $actualFuncCall = $actualRequests[0]->getFuncCall(); + $actualRequestObject = $actualRequests[0]->getRequestObject(); + $this->assertSame('/google.apps.meet.v2.SpacesService/EndActiveConference', $actualFuncCall); + $actualValue = $actualRequestObject->getName(); + $this->assertProtobufEquals($formattedName, $actualValue); + $this->assertTrue($transport->isExhausted()); + } + + /** @test */ + public function endActiveConferenceExceptionTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + $status = new stdClass(); + $status->code = Code::DATA_LOSS; + $status->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 EndActiveConferenceRequest())->setName($formattedName); + try { + $gapicClient->endActiveConference($request); + // If the $gapicClient method call did not throw, fail the test + $this->fail('Expected an ApiException, but no exception was thrown.'); + } catch (ApiException $ex) { + $this->assertEquals($status->code, $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'; + $meetingUri = 'meetingUri-883054232'; + $meetingCode = 'meetingCode-1605416591'; + $expectedResponse = new Space(); + $expectedResponse->setName($name2); + $expectedResponse->setMeetingUri($meetingUri); + $expectedResponse->setMeetingCode($meetingCode); + $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.apps.meet.v2.SpacesService/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 updateSpaceTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $meetingUri = 'meetingUri-883054232'; + $meetingCode = 'meetingCode-1605416591'; + $expectedResponse = new Space(); + $expectedResponse->setName($name); + $expectedResponse->setMeetingUri($meetingUri); + $expectedResponse->setMeetingCode($meetingCode); + $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.apps.meet.v2.SpacesService/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 createSpaceAsyncTest() + { + $transport = $this->createTransport(); + $gapicClient = $this->createClient([ + 'transport' => $transport, + ]); + $this->assertTrue($transport->isExhausted()); + // Mock response + $name = 'name3373707'; + $meetingUri = 'meetingUri-883054232'; + $meetingCode = 'meetingCode-1605416591'; + $expectedResponse = new Space(); + $expectedResponse->setName($name); + $expectedResponse->setMeetingUri($meetingUri); + $expectedResponse->setMeetingCode($meetingCode); + $transport->addResponse($expectedResponse); + $request = new CreateSpaceRequest(); + $response = $gapicClient->createSpaceAsync($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.apps.meet.v2.SpacesService/CreateSpace', $actualFuncCall); + $this->assertTrue($transport->isExhausted()); + } +}