Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(AppsMeet): Add new V2 client surface #7143

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading