-
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: Add GroundedGenerationService API (#7781)
feat: Add AdvancedCompleteQuery API feat: Add lite search API to allow public website search with API key feat: Add Sitemap APIs to preview channel feat: Support search personalization to preview channel feat: Support natural language understanding search feat: Add BillingEstimation in data store feat: Support Google Workspace search feat: Support advanced boost search feat: Add one_box_page_size on search feat: support query regex in control match rules docs: deprecate extractive_answers in answer generation docs: deprecate asynchronous mode in answer generation docs: keep the API doc up-to-date with recent changes PiperOrigin-RevId: 691212731 Source-Link: googleapis/googleapis@e6b6ff9 Source-Link: googleapis/googleapis-gen@67144fd Copy-Tag: eyJwIjoiRXZlbnRhcmNQdWJsaXNoaW5nLy5Pd2xCb3QueWFtbCIsImgiOiI2NzE0NGZkNDNjNWEzZTE2NDQxMGIzNjE3ZTU3NTJmMmUwNjZlYzI1In0=
- Loading branch information
1 parent
4d95d21
commit ab36815
Showing
13 changed files
with
1,040 additions
and
8 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
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 eventarcpublishing_v1_generated_Publisher_Publish_sync] | ||
use Google\ApiCore\ApiException; | ||
use Google\Cloud\Eventarc\Publishing\V1\Client\PublisherClient; | ||
use Google\Cloud\Eventarc\Publishing\V1\PublishRequest; | ||
use Google\Cloud\Eventarc\Publishing\V1\PublishResponse; | ||
|
||
/** | ||
* Publish events to a message bus. | ||
* | ||
* @param string $messageBus The full name of the message bus to publish events to. Format: | ||
* `projects/{project}/locations/{location}/messageBuses/{messageBus}`. | ||
*/ | ||
function publish_sample(string $messageBus): void | ||
{ | ||
// Create a client. | ||
$publisherClient = new PublisherClient(); | ||
|
||
// Prepare the request message. | ||
$request = (new PublishRequest()) | ||
->setMessageBus($messageBus); | ||
|
||
// Call the API and handle any network failures. | ||
try { | ||
/** @var PublishResponse $response */ | ||
$response = $publisherClient->publish($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 | ||
{ | ||
$messageBus = '[MESSAGE_BUS]'; | ||
|
||
publish_sample($messageBus); | ||
} | ||
// [END eventarcpublishing_v1_generated_Publisher_Publish_sync] |
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
Oops, something went wrong.