Skip to content

Commit

Permalink
feat(AppsMeet): Add new V2 client surface (#7143)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajupazhamayil authored Mar 15, 2024
1 parent f4c6c24 commit 6183bd8
Show file tree
Hide file tree
Showing 70 changed files with 9,681 additions and 1 deletion.
2 changes: 1 addition & 1 deletion AppsMeet/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
},
"require": {
"php": "^8.0",
"google/gax": "^1.30"
"google/gax": "^1.30.0"
},
"require-dev": {
"phpunit/phpunit": "^9.0"
Expand Down
Binary file added AppsMeet/metadata/V2/Resource.php
Binary file not shown.
135 changes: 135 additions & 0 deletions AppsMeet/metadata/V2/Service.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

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]
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]
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]
Loading

0 comments on commit 6183bd8

Please sign in to comment.