-
Notifications
You must be signed in to change notification settings - Fork 438
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(AppsMeet): Add new V2 client surface (#7143)
- Loading branch information
1 parent
f4c6c24
commit 6183bd8
Showing
70 changed files
with
9,681 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
71 changes: 71 additions & 0 deletions
71
AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_conference_record.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START meet_v2_generated_ConferenceRecordsService_GetConferenceRecord_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\Apps\Meet\V2\Client\ConferenceRecordsServiceClient; | ||
use Google\Apps\Meet\V2\ConferenceRecord; | ||
use Google\Apps\Meet\V2\GetConferenceRecordRequest; | ||
|
||
/** | ||
* Gets a conference record by conference ID. | ||
* | ||
* @param string $formattedName Resource name of the conference. Please see | ||
* {@see ConferenceRecordsServiceClient::conferenceRecordName()} for help formatting this field. | ||
*/ | ||
function get_conference_record_sample(string $formattedName): void | ||
{ | ||
// Create a client. | ||
$conferenceRecordsServiceClient = new ConferenceRecordsServiceClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new GetConferenceRecordRequest()) | ||
->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] |
74 changes: 74 additions & 0 deletions
74
AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_participant.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START meet_v2_generated_ConferenceRecordsService_GetParticipant_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\Apps\Meet\V2\Client\ConferenceRecordsServiceClient; | ||
use Google\Apps\Meet\V2\GetParticipantRequest; | ||
use Google\Apps\Meet\V2\Participant; | ||
|
||
/** | ||
* Gets a participant by participant ID. | ||
* | ||
* @param string $formattedName Resource name of the participant. Please see | ||
* {@see ConferenceRecordsServiceClient::participantName()} for help formatting this field. | ||
*/ | ||
function get_participant_sample(string $formattedName): void | ||
{ | ||
// Create a client. | ||
$conferenceRecordsServiceClient = new ConferenceRecordsServiceClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new GetParticipantRequest()) | ||
->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] |
75 changes: 75 additions & 0 deletions
75
AppsMeet/samples/V2/ConferenceRecordsServiceClient/get_participant_session.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?php | ||
/* | ||
* Copyright 2024 Google LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
/* | ||
* GENERATED CODE WARNING | ||
* This file was automatically generated - do not edit! | ||
*/ | ||
|
||
require_once __DIR__ . '/../../../vendor/autoload.php'; | ||
|
||
// [START meet_v2_generated_ConferenceRecordsService_GetParticipantSession_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\Apps\Meet\V2\Client\ConferenceRecordsServiceClient; | ||
use Google\Apps\Meet\V2\GetParticipantSessionRequest; | ||
use Google\Apps\Meet\V2\ParticipantSession; | ||
|
||
/** | ||
* Gets a participant session by participant session ID. | ||
* | ||
* @param string $formattedName Resource name of the participant. Please see | ||
* {@see ConferenceRecordsServiceClient::participantSessionName()} for help formatting this field. | ||
*/ | ||
function get_participant_session_sample(string $formattedName): void | ||
{ | ||
// Create a client. | ||
$conferenceRecordsServiceClient = new ConferenceRecordsServiceClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new GetParticipantSessionRequest()) | ||
->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] |
Oops, something went wrong.