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: [aiplatform] add timestamp_outside_retention_rows_count to ImportFeatureValuesResponse and ImportFeatureValuesOperationMetadata in aiplatform v1 featurestore_service.proto #8429

Merged
merged 8 commits into from
Sep 20, 2022
Merged
145 changes: 2 additions & 143 deletions java-aiplatform/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1155,6 +1155,7 @@ public final ListArtifactsPagedResponse listArtifacts(String parent) {
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* for (Artifact element : metadataServiceClient.listArtifacts(request).iterateAll()) {
* // doThingsWith(element);
Expand Down Expand Up @@ -1189,6 +1190,7 @@ public final ListArtifactsPagedResponse listArtifacts(ListArtifactsRequest reque
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* ApiFuture<Artifact> future =
* metadataServiceClient.listArtifactsPagedCallable().futureCall(request);
Expand Down Expand Up @@ -1224,6 +1226,7 @@ public final ListArtifactsPagedResponse listArtifacts(ListArtifactsRequest reque
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* while (true) {
* ListArtifactsResponse response =
Expand Down Expand Up @@ -1991,6 +1994,7 @@ public final ListContextsPagedResponse listContexts(String parent) {
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* for (Context element : metadataServiceClient.listContexts(request).iterateAll()) {
* // doThingsWith(element);
Expand Down Expand Up @@ -2025,6 +2029,7 @@ public final ListContextsPagedResponse listContexts(ListContextsRequest request)
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* ApiFuture<Context> future =
* metadataServiceClient.listContextsPagedCallable().futureCall(request);
Expand Down Expand Up @@ -2060,6 +2065,7 @@ public final ListContextsPagedResponse listContexts(ListContextsRequest request)
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* while (true) {
* ListContextsResponse response = metadataServiceClient.listContextsCallable().call(request);
Expand Down Expand Up @@ -2792,6 +2798,148 @@ public final AddContextChildrenResponse addContextChildren(AddContextChildrenReq
return stub.addContextChildrenCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT
* added to the parent Context, they are simply skipped.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet 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 as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
* ContextName context =
* ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]");
* List<String> childContexts = new ArrayList<>();
* RemoveContextChildrenResponse response =
* metadataServiceClient.removeContextChildren(context, childContexts);
* }
* }</pre>
*
* @param context Required. The resource name of the parent Context.
* <p>Format:
* `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
* @param childContexts The resource names of the child Contexts.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final RemoveContextChildrenResponse removeContextChildren(
ContextName context, List<String> childContexts) {
RemoveContextChildrenRequest request =
RemoveContextChildrenRequest.newBuilder()
.setContext(context == null ? null : context.toString())
.addAllChildContexts(childContexts)
.build();
return removeContextChildren(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT
* added to the parent Context, they are simply skipped.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet 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 as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
* String context =
* ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]").toString();
* List<String> childContexts = new ArrayList<>();
* RemoveContextChildrenResponse response =
* metadataServiceClient.removeContextChildren(context, childContexts);
* }
* }</pre>
*
* @param context Required. The resource name of the parent Context.
* <p>Format:
* `projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`
* @param childContexts The resource names of the child Contexts.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final RemoveContextChildrenResponse removeContextChildren(
String context, List<String> childContexts) {
RemoveContextChildrenRequest request =
RemoveContextChildrenRequest.newBuilder()
.setContext(context)
.addAllChildContexts(childContexts)
.build();
return removeContextChildren(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT
* added to the parent Context, they are simply skipped.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet 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 as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
* RemoveContextChildrenRequest request =
* RemoveContextChildrenRequest.newBuilder()
* .setContext(
* ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
* .toString())
* .addAllChildContexts(new ArrayList<String>())
* .build();
* RemoveContextChildrenResponse response = metadataServiceClient.removeContextChildren(request);
* }
* }</pre>
*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
*/
public final RemoveContextChildrenResponse removeContextChildren(
RemoveContextChildrenRequest request) {
return removeContextChildrenCallable().call(request);
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Remove a set of children contexts from a parent Context. If any of the child Contexts were NOT
* added to the parent Context, they are simply skipped.
*
* <p>Sample code:
*
* <pre>{@code
* // This snippet 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 as shown in
* // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
* try (MetadataServiceClient metadataServiceClient = MetadataServiceClient.create()) {
* RemoveContextChildrenRequest request =
* RemoveContextChildrenRequest.newBuilder()
* .setContext(
* ContextName.of("[PROJECT]", "[LOCATION]", "[METADATA_STORE]", "[CONTEXT]")
* .toString())
* .addAllChildContexts(new ArrayList<String>())
* .build();
* ApiFuture<RemoveContextChildrenResponse> future =
* metadataServiceClient.removeContextChildrenCallable().futureCall(request);
* // Do something.
* RemoveContextChildrenResponse response = future.get();
* }
* }</pre>
*/
public final UnaryCallable<RemoveContextChildrenRequest, RemoveContextChildrenResponse>
removeContextChildrenCallable() {
return stub.removeContextChildrenCallable();
}

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Retrieves Artifacts and Executions within the specified Context, connected by Event edges and
Expand Down Expand Up @@ -3271,6 +3419,7 @@ public final ListExecutionsPagedResponse listExecutions(String parent) {
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* for (Execution element : metadataServiceClient.listExecutions(request).iterateAll()) {
* // doThingsWith(element);
Expand Down Expand Up @@ -3305,6 +3454,7 @@ public final ListExecutionsPagedResponse listExecutions(ListExecutionsRequest re
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* ApiFuture<Execution> future =
* metadataServiceClient.listExecutionsPagedCallable().futureCall(request);
Expand Down Expand Up @@ -3340,6 +3490,7 @@ public final ListExecutionsPagedResponse listExecutions(ListExecutionsRequest re
* .setPageSize(883849137)
* .setPageToken("pageToken873572522")
* .setFilter("filter-1274492040")
* .setOrderBy("orderBy-1207110587")
* .build();
* while (true) {
* ListExecutionsResponse response =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ public UnaryCallSettings<PurgeContextsRequest, Operation> purgeContextsSettings(
return ((MetadataServiceStubSettings) getStubSettings()).addContextChildrenSettings();
}

/** Returns the object with the settings used for calls to removeContextChildren. */
public UnaryCallSettings<RemoveContextChildrenRequest, RemoveContextChildrenResponse>
removeContextChildrenSettings() {
return ((MetadataServiceStubSettings) getStubSettings()).removeContextChildrenSettings();
}

/** Returns the object with the settings used for calls to queryContextLineageSubgraph. */
public UnaryCallSettings<QueryContextLineageSubgraphRequest, LineageSubgraph>
queryContextLineageSubgraphSettings() {
Expand Down Expand Up @@ -579,6 +585,12 @@ public UnaryCallSettings.Builder<PurgeContextsRequest, Operation> purgeContextsS
return getStubSettingsBuilder().addContextChildrenSettings();
}

/** Returns the builder for the settings used for calls to removeContextChildren. */
public UnaryCallSettings.Builder<RemoveContextChildrenRequest, RemoveContextChildrenResponse>
removeContextChildrenSettings() {
return getStubSettingsBuilder().removeContextChildrenSettings();
}

/** Returns the builder for the settings used for calls to queryContextLineageSubgraph. */
public UnaryCallSettings.Builder<QueryContextLineageSubgraphRequest, LineageSubgraph>
queryContextLineageSubgraphSettings() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,9 @@
"QueryExecutionInputsAndOutputs": {
"methods": ["queryExecutionInputsAndOutputs", "queryExecutionInputsAndOutputs", "queryExecutionInputsAndOutputs", "queryExecutionInputsAndOutputsCallable"]
},
"RemoveContextChildren": {
"methods": ["removeContextChildren", "removeContextChildren", "removeContextChildren", "removeContextChildrenCallable"]
},
"SetIamPolicy": {
"methods": ["setIamPolicy", "setIamPolicyCallable"]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@
import com.google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest;
import com.google.cloud.aiplatform.v1.QueryContextLineageSubgraphRequest;
import com.google.cloud.aiplatform.v1.QueryExecutionInputsAndOutputsRequest;
import com.google.cloud.aiplatform.v1.RemoveContextChildrenRequest;
import com.google.cloud.aiplatform.v1.RemoveContextChildrenResponse;
import com.google.cloud.aiplatform.v1.UpdateArtifactRequest;
import com.google.cloud.aiplatform.v1.UpdateContextRequest;
import com.google.cloud.aiplatform.v1.UpdateExecutionRequest;
Expand Down Expand Up @@ -297,6 +299,17 @@ public class GrpcMetadataServiceStub extends MetadataServiceStub {
ProtoUtils.marshaller(AddContextChildrenResponse.getDefaultInstance()))
.build();

private static final MethodDescriptor<RemoveContextChildrenRequest, RemoveContextChildrenResponse>
removeContextChildrenMethodDescriptor =
MethodDescriptor.<RemoveContextChildrenRequest, RemoveContextChildrenResponse>newBuilder()
.setType(MethodDescriptor.MethodType.UNARY)
.setFullMethodName("google.cloud.aiplatform.v1.MetadataService/RemoveContextChildren")
.setRequestMarshaller(
ProtoUtils.marshaller(RemoveContextChildrenRequest.getDefaultInstance()))
.setResponseMarshaller(
ProtoUtils.marshaller(RemoveContextChildrenResponse.getDefaultInstance()))
.build();

private static final MethodDescriptor<QueryContextLineageSubgraphRequest, LineageSubgraph>
queryContextLineageSubgraphMethodDescriptor =
MethodDescriptor.<QueryContextLineageSubgraphRequest, LineageSubgraph>newBuilder()
Expand Down Expand Up @@ -522,6 +535,8 @@ public class GrpcMetadataServiceStub extends MetadataServiceStub {
addContextArtifactsAndExecutionsCallable;
private final UnaryCallable<AddContextChildrenRequest, AddContextChildrenResponse>
addContextChildrenCallable;
private final UnaryCallable<RemoveContextChildrenRequest, RemoveContextChildrenResponse>
removeContextChildrenCallable;
private final UnaryCallable<QueryContextLineageSubgraphRequest, LineageSubgraph>
queryContextLineageSubgraphCallable;
private final UnaryCallable<CreateExecutionRequest, Execution> createExecutionCallable;
Expand Down Expand Up @@ -789,6 +804,18 @@ protected GrpcMetadataServiceStub(
return params.build();
})
.build();
GrpcCallSettings<RemoveContextChildrenRequest, RemoveContextChildrenResponse>
removeContextChildrenTransportSettings =
GrpcCallSettings
.<RemoveContextChildrenRequest, RemoveContextChildrenResponse>newBuilder()
.setMethodDescriptor(removeContextChildrenMethodDescriptor)
.setParamsExtractor(
request -> {
ImmutableMap.Builder<String, String> params = ImmutableMap.builder();
params.put("context", String.valueOf(request.getContext()));
return params.build();
})
.build();
GrpcCallSettings<QueryContextLineageSubgraphRequest, LineageSubgraph>
queryContextLineageSubgraphTransportSettings =
GrpcCallSettings.<QueryContextLineageSubgraphRequest, LineageSubgraph>newBuilder()
Expand Down Expand Up @@ -1089,6 +1116,11 @@ protected GrpcMetadataServiceStub(
addContextChildrenTransportSettings,
settings.addContextChildrenSettings(),
clientContext);
this.removeContextChildrenCallable =
callableFactory.createUnaryCallable(
removeContextChildrenTransportSettings,
settings.removeContextChildrenSettings(),
clientContext);
this.queryContextLineageSubgraphCallable =
callableFactory.createUnaryCallable(
queryContextLineageSubgraphTransportSettings,
Expand Down Expand Up @@ -1339,6 +1371,12 @@ public UnaryCallable<PurgeContextsRequest, Operation> purgeContextsCallable() {
return addContextChildrenCallable;
}

@Override
public UnaryCallable<RemoveContextChildrenRequest, RemoveContextChildrenResponse>
removeContextChildrenCallable() {
return removeContextChildrenCallable;
}

@Override
public UnaryCallable<QueryContextLineageSubgraphRequest, LineageSubgraph>
queryContextLineageSubgraphCallable() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@
import com.google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest;
import com.google.cloud.aiplatform.v1.QueryContextLineageSubgraphRequest;
import com.google.cloud.aiplatform.v1.QueryExecutionInputsAndOutputsRequest;
import com.google.cloud.aiplatform.v1.RemoveContextChildrenRequest;
import com.google.cloud.aiplatform.v1.RemoveContextChildrenResponse;
import com.google.cloud.aiplatform.v1.UpdateArtifactRequest;
import com.google.cloud.aiplatform.v1.UpdateContextRequest;
import com.google.cloud.aiplatform.v1.UpdateExecutionRequest;
Expand Down Expand Up @@ -231,6 +233,11 @@ public UnaryCallable<PurgeContextsRequest, Operation> purgeContextsCallable() {
throw new UnsupportedOperationException("Not implemented: addContextChildrenCallable()");
}

public UnaryCallable<RemoveContextChildrenRequest, RemoveContextChildrenResponse>
removeContextChildrenCallable() {
throw new UnsupportedOperationException("Not implemented: removeContextChildrenCallable()");
}

public UnaryCallable<QueryContextLineageSubgraphRequest, LineageSubgraph>
queryContextLineageSubgraphCallable() {
throw new UnsupportedOperationException(
Expand Down
Loading