Skip to content

Commit 6addf47

Browse files
feat: [AiPlatform] add invoke_route_prefix to ModelContainerSpec in aiplatform v1 models.proto (#8394)
* feat: add PSCAutomationConfig to PrivateServiceConnectConfig in service_networking.proto feat: add GenAiAdvancedFeaturesConfig to endpoint.proto docs: update dedicateEndpointDns documentation PiperOrigin-RevId: 773868922 Source-Link: googleapis/googleapis@34b323e Source-Link: googleapis/googleapis-gen@709012c Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiNzA5MDEyYzQ4YzcyOGVjY2U3ZTQ5MjFlYTdkNDk4ZWIxOGFjMTVlMyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add invoke_route_prefix to ModelContainerSpec in aiplatform v1 models.proto PiperOrigin-RevId: 775862178 Source-Link: googleapis/googleapis@4667a43 Source-Link: googleapis/googleapis-gen@5034818 Copy-Tag: eyJwIjoiQWlQbGF0Zm9ybS8uT3dsQm90LnlhbWwiLCJoIjoiNTAzNDgxODUyYjBhZmVhNGJiNmUyZWQyZmVlMjI1YWIwYTNjMWQwNiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 3dec069 commit 6addf47

14 files changed

Lines changed: 546 additions & 100 deletions
251 Bytes
Binary file not shown.

AiPlatform/metadata/V1/Model.php

34 Bytes
Binary file not shown.
369 Bytes
Binary file not shown.

AiPlatform/samples/V1/EndpointServiceClient/deploy_model.php

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -34,30 +34,18 @@
3434
/**
3535
* Deploys a Model into this Endpoint, creating a DeployedModel within it.
3636
*
37-
* @param string $formattedEndpoint The name of the Endpoint resource into which to deploy a Model.
38-
* Format:
39-
* `projects/{project}/locations/{location}/endpoints/{endpoint}`
40-
* Please see {@see EndpointServiceClient::endpointName()} for help formatting this field.
41-
* @param string $formattedDeployedModelModel The resource name of the Model that this is the deployment of.
42-
* Note that the Model may be in a different location than the DeployedModel's
43-
* Endpoint.
44-
*
45-
* The resource name may contain version id or version alias to specify the
46-
* version.
47-
* Example: `projects/{project}/locations/{location}/models/{model}&#64;2`
48-
* or
49-
* `projects/{project}/locations/{location}/models/{model}&#64;golden`
50-
* if no version is specified, the default version will be deployed. Please see
51-
* {@see EndpointServiceClient::modelName()} for help formatting this field.
37+
* @param string $formattedEndpoint The name of the Endpoint resource into which to deploy a Model.
38+
* Format:
39+
* `projects/{project}/locations/{location}/endpoints/{endpoint}`
40+
* Please see {@see EndpointServiceClient::endpointName()} for help formatting this field.
5241
*/
53-
function deploy_model_sample(string $formattedEndpoint, string $formattedDeployedModelModel): void
42+
function deploy_model_sample(string $formattedEndpoint): void
5443
{
5544
// Create a client.
5645
$endpointServiceClient = new EndpointServiceClient();
5746

5847
// Prepare the request message.
59-
$deployedModel = (new DeployedModel())
60-
->setModel($formattedDeployedModelModel);
48+
$deployedModel = new DeployedModel();
6149
$request = (new DeployModelRequest())
6250
->setEndpoint($formattedEndpoint)
6351
->setDeployedModel($deployedModel);
@@ -94,12 +82,7 @@ function deploy_model_sample(string $formattedEndpoint, string $formattedDeploye
9482
function callSample(): void
9583
{
9684
$formattedEndpoint = EndpointServiceClient::endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]');
97-
$formattedDeployedModelModel = EndpointServiceClient::modelName(
98-
'[PROJECT]',
99-
'[LOCATION]',
100-
'[MODEL]'
101-
);
10285

103-
deploy_model_sample($formattedEndpoint, $formattedDeployedModelModel);
86+
deploy_model_sample($formattedEndpoint);
10487
}
10588
// [END aiplatform_v1_generated_EndpointService_DeployModel_sync]

AiPlatform/samples/V1/EndpointServiceClient/mutate_deployed_model.php

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -38,32 +38,18 @@
3838
* `disable_container_logging` (v1 only), and `enable_container_logging`
3939
* (v1beta1 only).
4040
*
41-
* @param string $formattedEndpoint The name of the Endpoint resource into which to mutate a
42-
* DeployedModel. Format:
43-
* `projects/{project}/locations/{location}/endpoints/{endpoint}`
44-
* Please see {@see EndpointServiceClient::endpointName()} for help formatting this field.
45-
* @param string $formattedDeployedModelModel The resource name of the Model that this is the deployment of.
46-
* Note that the Model may be in a different location than the DeployedModel's
47-
* Endpoint.
48-
*
49-
* The resource name may contain version id or version alias to specify the
50-
* version.
51-
* Example: `projects/{project}/locations/{location}/models/{model}&#64;2`
52-
* or
53-
* `projects/{project}/locations/{location}/models/{model}&#64;golden`
54-
* if no version is specified, the default version will be deployed. Please see
55-
* {@see EndpointServiceClient::modelName()} for help formatting this field.
41+
* @param string $formattedEndpoint The name of the Endpoint resource into which to mutate a
42+
* DeployedModel. Format:
43+
* `projects/{project}/locations/{location}/endpoints/{endpoint}`
44+
* Please see {@see EndpointServiceClient::endpointName()} for help formatting this field.
5645
*/
57-
function mutate_deployed_model_sample(
58-
string $formattedEndpoint,
59-
string $formattedDeployedModelModel
60-
): void {
46+
function mutate_deployed_model_sample(string $formattedEndpoint): void
47+
{
6148
// Create a client.
6249
$endpointServiceClient = new EndpointServiceClient();
6350

6451
// Prepare the request message.
65-
$deployedModel = (new DeployedModel())
66-
->setModel($formattedDeployedModelModel);
52+
$deployedModel = new DeployedModel();
6753
$updateMask = new FieldMask();
6854
$request = (new MutateDeployedModelRequest())
6955
->setEndpoint($formattedEndpoint)
@@ -102,12 +88,7 @@ function mutate_deployed_model_sample(
10288
function callSample(): void
10389
{
10490
$formattedEndpoint = EndpointServiceClient::endpointName('[PROJECT]', '[LOCATION]', '[ENDPOINT]');
105-
$formattedDeployedModelModel = EndpointServiceClient::modelName(
106-
'[PROJECT]',
107-
'[LOCATION]',
108-
'[MODEL]'
109-
);
11091

111-
mutate_deployed_model_sample($formattedEndpoint, $formattedDeployedModelModel);
92+
mutate_deployed_model_sample($formattedEndpoint);
11293
}
11394
// [END aiplatform_v1_generated_EndpointService_MutateDeployedModel_sync]

AiPlatform/src/V1/DeployedModel.php

Lines changed: 11 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AiPlatform/src/V1/Endpoint.php

Lines changed: 68 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

AiPlatform/src/V1/GenAiAdvancedFeaturesConfig.php

Lines changed: 77 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)