Skip to content

Commit

Permalink
feat: [aiplatform] add encryption_spec to index.proto and index_endpo…
Browse files Browse the repository at this point in the history
…int.proto (#9805)

* feat: add encryption_spec to index.proto and index_endpoint.proto
feat: add TrialContext to study.proto
feat: add contexts to SuggestTrialsRequest in vizier_service.proto

PiperOrigin-RevId: 563249077

Source-Link: googleapis/googleapis@0e828f8

Source-Link: googleapis/googleapis-gen@e3d5760
Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiJlM2Q1NzYwNGU5NTlkNGQ2NWMxY2UwYzYxOTZhNmI2NjkzMTYyYzk2In0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: add encryption_spec to index.proto and index_endpoint.proto
feat: add TrialContext to study.proto
feat: add contexts to SuggestTrialsRequest in vizier_service.proto

PiperOrigin-RevId: 563257278

Source-Link: googleapis/googleapis@7534629

Source-Link: googleapis/googleapis-gen@63658af
Copy-Tag: eyJwIjoiamF2YS1haXBsYXRmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiI2MzY1OGFmNmMxNjY0YWNmYWJkYjRmNTU3Yzc0OTcxMDE4OTU0OTJhIn0=

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 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>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Sep 8, 2023
1 parent ab08654 commit 1ce4fa6
Show file tree
Hide file tree
Showing 53 changed files with 8,487 additions and 688 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,7 @@ public final UnaryCallable<LookupStudyRequest, Study> lookupStudyCallable() {
* .setParent(StudyName.of("[PROJECT]", "[LOCATION]", "[STUDY]").toString())
* .setSuggestionCount(390130452)
* .setClientId("clientId908408390")
* .addAllContexts(new ArrayList<TrialContext>())
* .build();
* SuggestTrialsResponse response = vizierServiceClient.suggestTrialsAsync(request).get();
* }
Expand Down Expand Up @@ -862,6 +863,7 @@ public final OperationFuture<SuggestTrialsResponse, SuggestTrialsMetadata> sugge
* .setParent(StudyName.of("[PROJECT]", "[LOCATION]", "[STUDY]").toString())
* .setSuggestionCount(390130452)
* .setClientId("clientId908408390")
* .addAllContexts(new ArrayList<TrialContext>())
* .build();
* OperationFuture<SuggestTrialsResponse, SuggestTrialsMetadata> future =
* vizierServiceClient.suggestTrialsOperationCallable().futureCall(request);
Expand Down Expand Up @@ -896,6 +898,7 @@ public final OperationFuture<SuggestTrialsResponse, SuggestTrialsMetadata> sugge
* .setParent(StudyName.of("[PROJECT]", "[LOCATION]", "[STUDY]").toString())
* .setSuggestionCount(390130452)
* .setClientId("clientId908408390")
* .addAllContexts(new ArrayList<TrialContext>())
* .build();
* ApiFuture<Operation> future = vizierServiceClient.suggestTrialsCallable().futureCall(request);
* // Do something.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -830,6 +830,7 @@ public final UnaryCallable<LookupStudyRequest, Study> lookupStudyCallable() {
* .setParent(StudyName.of("[PROJECT]", "[LOCATION]", "[STUDY]").toString())
* .setSuggestionCount(390130452)
* .setClientId("clientId908408390")
* .addAllContexts(new ArrayList<TrialContext>())
* .build();
* SuggestTrialsResponse response = vizierServiceClient.suggestTrialsAsync(request).get();
* }
Expand Down Expand Up @@ -864,6 +865,7 @@ public final OperationFuture<SuggestTrialsResponse, SuggestTrialsMetadata> sugge
* .setParent(StudyName.of("[PROJECT]", "[LOCATION]", "[STUDY]").toString())
* .setSuggestionCount(390130452)
* .setClientId("clientId908408390")
* .addAllContexts(new ArrayList<TrialContext>())
* .build();
* OperationFuture<SuggestTrialsResponse, SuggestTrialsMetadata> future =
* vizierServiceClient.suggestTrialsOperationCallable().futureCall(request);
Expand Down Expand Up @@ -898,6 +900,7 @@ public final OperationFuture<SuggestTrialsResponse, SuggestTrialsMetadata> sugge
* .setParent(StudyName.of("[PROJECT]", "[LOCATION]", "[STUDY]").toString())
* .setSuggestionCount(390130452)
* .setClientId("clientId908408390")
* .addAllContexts(new ArrayList<TrialContext>())
* .build();
* ApiFuture<Operation> future = vizierServiceClient.suggestTrialsCallable().futureCall(request);
* // Do something.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11213,6 +11213,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.aiplatform.v1.TrialContext",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.aiplatform.v1.TrialContext$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.aiplatform.v1.UndeployIndexOperationMetadata",
"queryAllDeclaredConstructors": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11762,6 +11762,24 @@
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.aiplatform.v1beta1.TrialContext",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.aiplatform.v1beta1.TrialContext$Builder",
"queryAllDeclaredConstructors": true,
"queryAllPublicConstructors": true,
"queryAllDeclaredMethods": true,
"allPublicMethods": true,
"allDeclaredClasses": true,
"allPublicClasses": true
},
{
"name": "com.google.cloud.aiplatform.v1beta1.UndeployIndexOperationMetadata",
"queryAllDeclaredConstructors": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public void createIndexEndpointTest() throws Exception {
.setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build())
.setPublicEndpointEnabled(true)
.setPublicEndpointDomainName("publicEndpointDomainName1244171053")
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -184,6 +185,7 @@ public void createIndexEndpointTest2() throws Exception {
.setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build())
.setPublicEndpointEnabled(true)
.setPublicEndpointDomainName("publicEndpointDomainName1244171053")
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -245,6 +247,7 @@ public void getIndexEndpointTest() throws Exception {
.setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build())
.setPublicEndpointEnabled(true)
.setPublicEndpointDomainName("publicEndpointDomainName1244171053")
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
mockIndexEndpointService.addResponse(expectedResponse);

Expand Down Expand Up @@ -295,6 +298,7 @@ public void getIndexEndpointTest2() throws Exception {
.setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build())
.setPublicEndpointEnabled(true)
.setPublicEndpointDomainName("publicEndpointDomainName1244171053")
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
mockIndexEndpointService.addResponse(expectedResponse);

Expand Down Expand Up @@ -433,6 +437,7 @@ public void updateIndexEndpointTest() throws Exception {
.setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build())
.setPublicEndpointEnabled(true)
.setPublicEndpointDomainName("publicEndpointDomainName1244171053")
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
mockIndexEndpointService.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public void createIndexTest() throws Exception {
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
.setIndexStats(IndexStats.newBuilder().build())
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -181,6 +182,7 @@ public void createIndexTest2() throws Exception {
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
.setIndexStats(IndexStats.newBuilder().build())
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -240,6 +242,7 @@ public void getIndexTest() throws Exception {
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
.setIndexStats(IndexStats.newBuilder().build())
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
mockIndexService.addResponse(expectedResponse);

Expand Down Expand Up @@ -288,6 +291,7 @@ public void getIndexTest2() throws Exception {
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
.setIndexStats(IndexStats.newBuilder().build())
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
mockIndexService.addResponse(expectedResponse);

Expand Down Expand Up @@ -424,6 +428,7 @@ public void updateIndexTest() throws Exception {
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
.setIndexStats(IndexStats.newBuilder().build())
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ public void suggestTrialsTest() throws Exception {
.setParent(StudyName.of("[PROJECT]", "[LOCATION]", "[STUDY]").toString())
.setSuggestionCount(390130452)
.setClientId("clientId908408390")
.addAllContexts(new ArrayList<TrialContext>())
.build();

SuggestTrialsResponse actualResponse = client.suggestTrialsAsync(request).get();
Expand All @@ -554,6 +555,7 @@ public void suggestTrialsTest() throws Exception {
Assert.assertEquals(request.getParent(), actualRequest.getParent());
Assert.assertEquals(request.getSuggestionCount(), actualRequest.getSuggestionCount());
Assert.assertEquals(request.getClientId(), actualRequest.getClientId());
Assert.assertEquals(request.getContextsList(), actualRequest.getContextsList());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
Expand All @@ -571,6 +573,7 @@ public void suggestTrialsExceptionTest() throws Exception {
.setParent(StudyName.of("[PROJECT]", "[LOCATION]", "[STUDY]").toString())
.setSuggestionCount(390130452)
.setClientId("clientId908408390")
.addAllContexts(new ArrayList<TrialContext>())
.build();
client.suggestTrialsAsync(request).get();
Assert.fail("No exception raised");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public void createIndexEndpointTest() throws Exception {
.setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build())
.setPublicEndpointEnabled(true)
.setPublicEndpointDomainName("publicEndpointDomainName1244171053")
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -184,6 +185,7 @@ public void createIndexEndpointTest2() throws Exception {
.setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build())
.setPublicEndpointEnabled(true)
.setPublicEndpointDomainName("publicEndpointDomainName1244171053")
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -245,6 +247,7 @@ public void getIndexEndpointTest() throws Exception {
.setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build())
.setPublicEndpointEnabled(true)
.setPublicEndpointDomainName("publicEndpointDomainName1244171053")
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
mockIndexEndpointService.addResponse(expectedResponse);

Expand Down Expand Up @@ -295,6 +298,7 @@ public void getIndexEndpointTest2() throws Exception {
.setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build())
.setPublicEndpointEnabled(true)
.setPublicEndpointDomainName("publicEndpointDomainName1244171053")
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
mockIndexEndpointService.addResponse(expectedResponse);

Expand Down Expand Up @@ -433,6 +437,7 @@ public void updateIndexEndpointTest() throws Exception {
.setPrivateServiceConnectConfig(PrivateServiceConnectConfig.newBuilder().build())
.setPublicEndpointEnabled(true)
.setPublicEndpointDomainName("publicEndpointDomainName1244171053")
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
mockIndexEndpointService.addResponse(expectedResponse);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ public void createIndexTest() throws Exception {
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
.setIndexStats(IndexStats.newBuilder().build())
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -181,6 +182,7 @@ public void createIndexTest2() throws Exception {
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
.setIndexStats(IndexStats.newBuilder().build())
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down Expand Up @@ -240,6 +242,7 @@ public void getIndexTest() throws Exception {
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
.setIndexStats(IndexStats.newBuilder().build())
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
mockIndexService.addResponse(expectedResponse);

Expand Down Expand Up @@ -288,6 +291,7 @@ public void getIndexTest2() throws Exception {
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
.setIndexStats(IndexStats.newBuilder().build())
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
mockIndexService.addResponse(expectedResponse);

Expand Down Expand Up @@ -424,6 +428,7 @@ public void updateIndexTest() throws Exception {
.setCreateTime(Timestamp.newBuilder().build())
.setUpdateTime(Timestamp.newBuilder().build())
.setIndexStats(IndexStats.newBuilder().build())
.setEncryptionSpec(EncryptionSpec.newBuilder().build())
.build();
Operation resultOperation =
Operation.newBuilder()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,7 @@ public void suggestTrialsTest() throws Exception {
.setParent(StudyName.of("[PROJECT]", "[LOCATION]", "[STUDY]").toString())
.setSuggestionCount(390130452)
.setClientId("clientId908408390")
.addAllContexts(new ArrayList<TrialContext>())
.build();

SuggestTrialsResponse actualResponse = client.suggestTrialsAsync(request).get();
Expand All @@ -554,6 +555,7 @@ public void suggestTrialsTest() throws Exception {
Assert.assertEquals(request.getParent(), actualRequest.getParent());
Assert.assertEquals(request.getSuggestionCount(), actualRequest.getSuggestionCount());
Assert.assertEquals(request.getClientId(), actualRequest.getClientId());
Assert.assertEquals(request.getContextsList(), actualRequest.getContextsList());
Assert.assertTrue(
channelProvider.isHeaderSent(
ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
Expand All @@ -571,6 +573,7 @@ public void suggestTrialsExceptionTest() throws Exception {
.setParent(StudyName.of("[PROJECT]", "[LOCATION]", "[STUDY]").toString())
.setSuggestionCount(390130452)
.setClientId("clientId908408390")
.addAllContexts(new ArrayList<TrialContext>())
.build();
client.suggestTrialsAsync(request).get();
Assert.fail("No exception raised");
Expand Down
Loading

0 comments on commit 1ce4fa6

Please sign in to comment.