diff --git a/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecName.java b/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecName.java new file mode 100644 index 000000000000..0d77be05f942 --- /dev/null +++ b/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/AnnotationSpecName.java @@ -0,0 +1,249 @@ +/* + * Copyright 2018 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 + * + * http://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. + */ + +package com.google.cloud.automl.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +@javax.annotation.Generated("by GAPIC protoc plugin") +public class AnnotationSpecName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String dataset; + private final String annotationSpec; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public String getAnnotationSpec() { + return annotationSpec; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private AnnotationSpecName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + annotationSpec = Preconditions.checkNotNull(builder.getAnnotationSpec()); + } + + public static AnnotationSpecName of( + String project, String location, String dataset, String annotationSpec) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .setAnnotationSpec(annotationSpec) + .build(); + } + + public static String format( + String project, String location, String dataset, String annotationSpec) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .setAnnotationSpec(annotationSpec) + .build() + .toString(); + } + + public static AnnotationSpecName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "AnnotationSpecName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("dataset"), + matchMap.get("annotation_spec")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (AnnotationSpecName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("dataset", dataset); + fieldMapBuilder.put("annotationSpec", annotationSpec); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", + project, + "location", + location, + "dataset", + dataset, + "annotation_spec", + annotationSpec); + } + + /** Builder for AnnotationSpecName. */ + public static class Builder { + + private String project; + private String location; + private String dataset; + private String annotationSpec; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public String getAnnotationSpec() { + return annotationSpec; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + public Builder setAnnotationSpec(String annotationSpec) { + this.annotationSpec = annotationSpec; + return this; + } + + private Builder() {} + + private Builder(AnnotationSpecName annotationSpecName) { + project = annotationSpecName.project; + location = annotationSpecName.location; + dataset = annotationSpecName.dataset; + annotationSpec = annotationSpecName.annotationSpec; + } + + public AnnotationSpecName build() { + return new AnnotationSpecName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof AnnotationSpecName) { + AnnotationSpecName that = (AnnotationSpecName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.dataset.equals(that.dataset)) + && (this.annotationSpec.equals(that.annotationSpec)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= dataset.hashCode(); + h *= 1000003; + h ^= annotationSpec.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecName.java b/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecName.java new file mode 100644 index 000000000000..f0c11dcfb7ad --- /dev/null +++ b/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ColumnSpecName.java @@ -0,0 +1,275 @@ +/* + * Copyright 2018 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 + * + * http://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. + */ + +package com.google.cloud.automl.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +@javax.annotation.Generated("by GAPIC protoc plugin") +public class ColumnSpecName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}/columnSpecs/{column_spec}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String dataset; + private final String tableSpec; + private final String columnSpec; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public String getTableSpec() { + return tableSpec; + } + + public String getColumnSpec() { + return columnSpec; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private ColumnSpecName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + tableSpec = Preconditions.checkNotNull(builder.getTableSpec()); + columnSpec = Preconditions.checkNotNull(builder.getColumnSpec()); + } + + public static ColumnSpecName of( + String project, String location, String dataset, String tableSpec, String columnSpec) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .setTableSpec(tableSpec) + .setColumnSpec(columnSpec) + .build(); + } + + public static String format( + String project, String location, String dataset, String tableSpec, String columnSpec) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .setTableSpec(tableSpec) + .setColumnSpec(columnSpec) + .build() + .toString(); + } + + public static ColumnSpecName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "ColumnSpecName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("dataset"), + matchMap.get("table_spec"), + matchMap.get("column_spec")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (ColumnSpecName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("dataset", dataset); + fieldMapBuilder.put("tableSpec", tableSpec); + fieldMapBuilder.put("columnSpec", columnSpec); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", + project, + "location", + location, + "dataset", + dataset, + "table_spec", + tableSpec, + "column_spec", + columnSpec); + } + + /** Builder for ColumnSpecName. */ + public static class Builder { + + private String project; + private String location; + private String dataset; + private String tableSpec; + private String columnSpec; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public String getTableSpec() { + return tableSpec; + } + + public String getColumnSpec() { + return columnSpec; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + public Builder setTableSpec(String tableSpec) { + this.tableSpec = tableSpec; + return this; + } + + public Builder setColumnSpec(String columnSpec) { + this.columnSpec = columnSpec; + return this; + } + + private Builder() {} + + private Builder(ColumnSpecName columnSpecName) { + project = columnSpecName.project; + location = columnSpecName.location; + dataset = columnSpecName.dataset; + tableSpec = columnSpecName.tableSpec; + columnSpec = columnSpecName.columnSpec; + } + + public ColumnSpecName build() { + return new ColumnSpecName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof ColumnSpecName) { + ColumnSpecName that = (ColumnSpecName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.dataset.equals(that.dataset)) + && (this.tableSpec.equals(that.tableSpec)) + && (this.columnSpec.equals(that.columnSpec)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= dataset.hashCode(); + h *= 1000003; + h ^= tableSpec.hashCode(); + h *= 1000003; + h ^= columnSpec.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfig.java b/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfig.java index 16ea94e7352c..305262701f2a 100644 --- a/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfig.java +++ b/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfig.java @@ -202,10 +202,7 @@ public DestinationCase getDestinationCase() { * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -224,10 +221,7 @@ public boolean hasGcsDestination() { * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -249,10 +243,7 @@ public com.google.cloud.automl.v1beta1.GcsDestination getGcsDestination() { * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -976,10 +967,7 @@ public Builder clearDestination() { * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -998,10 +986,7 @@ public boolean hasGcsDestination() { * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -1030,10 +1015,7 @@ public com.google.cloud.automl.v1beta1.GcsDestination getGcsDestination() { * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -1062,10 +1044,7 @@ public Builder setGcsDestination(com.google.cloud.automl.v1beta1.GcsDestination * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -1092,10 +1071,7 @@ public Builder setGcsDestination( * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -1134,10 +1110,7 @@ public Builder mergeGcsDestination(com.google.cloud.automl.v1beta1.GcsDestinatio * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -1169,10 +1142,7 @@ public Builder clearGcsDestination() { * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -1191,10 +1161,7 @@ public com.google.cloud.automl.v1beta1.GcsDestination.Builder getGcsDestinationB * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -1220,10 +1187,7 @@ public com.google.cloud.automl.v1beta1.GcsDestinationOrBuilder getGcsDestination * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; diff --git a/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfigOrBuilder.java b/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfigOrBuilder.java index bc9811150532..bb52aee6f44f 100644 --- a/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfigOrBuilder.java +++ b/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/ModelExportOutputConfigOrBuilder.java @@ -19,10 +19,7 @@ public interface ModelExportOutputConfigOrBuilder * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -39,10 +36,7 @@ public interface ModelExportOutputConfigOrBuilder * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; @@ -59,10 +53,7 @@ public interface ModelExportOutputConfigOrBuilder * "model-export-<model-display-name>-<timestamp-of-export-call>", * where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, * will be created. Inside the model and any of its supporting files - * will be written, as described - * [here](https: - * //cloud.google.com/vision/automl/alpha/d - * // ocs/predict#deployment_to_devices). + * will be written. * * * .google.cloud.automl.v1beta1.GcsDestination gcs_destination = 1; diff --git a/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecName.java b/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecName.java new file mode 100644 index 000000000000..ef1bfe7d11fc --- /dev/null +++ b/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/java/com/google/cloud/automl/v1beta1/TableSpecName.java @@ -0,0 +1,241 @@ +/* + * Copyright 2018 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 + * + * http://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. + */ + +package com.google.cloud.automl.v1beta1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +// AUTO-GENERATED DOCUMENTATION AND CLASS +@javax.annotation.Generated("by GAPIC protoc plugin") +public class TableSpecName implements ResourceName { + + private static final PathTemplate PATH_TEMPLATE = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/datasets/{dataset}/tableSpecs/{table_spec}"); + + private volatile Map fieldValuesMap; + + private final String project; + private final String location; + private final String dataset; + private final String tableSpec; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public String getTableSpec() { + return tableSpec; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + private TableSpecName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + dataset = Preconditions.checkNotNull(builder.getDataset()); + tableSpec = Preconditions.checkNotNull(builder.getTableSpec()); + } + + public static TableSpecName of( + String project, String location, String dataset, String tableSpec) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .setTableSpec(tableSpec) + .build(); + } + + public static String format(String project, String location, String dataset, String tableSpec) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setDataset(dataset) + .setTableSpec(tableSpec) + .build() + .toString(); + } + + public static TableSpecName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PATH_TEMPLATE.validatedMatch( + formattedString, "TableSpecName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("dataset"), + matchMap.get("table_spec")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList(values.size()); + for (TableSpecName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PATH_TEMPLATE.matches(formattedString); + } + + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + fieldMapBuilder.put("project", project); + fieldMapBuilder.put("location", location); + fieldMapBuilder.put("dataset", dataset); + fieldMapBuilder.put("tableSpec", tableSpec); + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PATH_TEMPLATE.instantiate( + "project", project, "location", location, "dataset", dataset, "table_spec", tableSpec); + } + + /** Builder for TableSpecName. */ + public static class Builder { + + private String project; + private String location; + private String dataset; + private String tableSpec; + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getDataset() { + return dataset; + } + + public String getTableSpec() { + return tableSpec; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setDataset(String dataset) { + this.dataset = dataset; + return this; + } + + public Builder setTableSpec(String tableSpec) { + this.tableSpec = tableSpec; + return this; + } + + private Builder() {} + + private Builder(TableSpecName tableSpecName) { + project = tableSpecName.project; + location = tableSpecName.location; + dataset = tableSpecName.dataset; + tableSpec = tableSpecName.tableSpec; + } + + public TableSpecName build() { + return new TableSpecName(this); + } + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o instanceof TableSpecName) { + TableSpecName that = (TableSpecName) o; + return (this.project.equals(that.project)) + && (this.location.equals(that.location)) + && (this.dataset.equals(that.dataset)) + && (this.tableSpec.equals(that.tableSpec)); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= project.hashCode(); + h *= 1000003; + h ^= location.hashCode(); + h *= 1000003; + h ^= dataset.hashCode(); + h *= 1000003; + h ^= tableSpec.hashCode(); + return h; + } +} diff --git a/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/io.proto b/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/io.proto index f100a5707385..08c5f58854e1 100644 --- a/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/io.proto +++ b/google-api-grpc/proto-google-cloud-automl-v1beta1/src/main/proto/google/cloud/automl/v1beta1/io.proto @@ -676,11 +676,7 @@ message ModelExportOutputConfig { // "model-export--", // where timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format, // will be created. Inside the model and any of its supporting files - // will be written, as described - // - // [here](https: - // //cloud.google.com/vision/automl/alpha/d - // // ocs/predict#deployment_to_devices). + // will be written. GcsDestination gcs_destination = 1; // The GCR location where model image is to be pushed to. This location diff --git a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlClient.java b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlClient.java index 090edaff2b4a..9b1f81f9eee1 100644 --- a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlClient.java +++ b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlClient.java @@ -284,6 +284,73 @@ public final UnaryCallable createDatasetCallable( return stub.createDatasetCallable(); } + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   Dataset response = autoMlClient.updateDataset(dataset);
+   * }
+   * 
+ * + * @param dataset The dataset which replaces the resource on the server. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Dataset updateDataset(Dataset dataset) { + + UpdateDatasetRequest request = UpdateDatasetRequest.newBuilder().setDataset(dataset).build(); + return updateDataset(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   UpdateDatasetRequest request = UpdateDatasetRequest.newBuilder()
+   *     .setDataset(dataset)
+   *     .build();
+   *   Dataset response = autoMlClient.updateDataset(request);
+   * }
+   * 
+ * + * @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 Dataset updateDataset(UpdateDatasetRequest request) { + return updateDatasetCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   Dataset dataset = Dataset.newBuilder().build();
+   *   UpdateDatasetRequest request = UpdateDatasetRequest.newBuilder()
+   *     .setDataset(dataset)
+   *     .build();
+   *   ApiFuture<Dataset> future = autoMlClient.updateDatasetCallable().futureCall(request);
+   *   // Do something
+   *   Dataset response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable updateDatasetCallable() { + return stub.updateDatasetCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Gets a dataset. @@ -1457,18 +1524,20 @@ public final UnaryCallable deleteModelCallable() *

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
    *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   Operation response = autoMlClient.deployModel(name);
+   *   autoMlClient.deployModelAsync(name).get();
    * }
    * 
* * @param name Resource name of the model to deploy. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation deployModel(ModelName name) { + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture deployModelAsync(ModelName name) { DeployModelRequest request = DeployModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return deployModel(request); + return deployModelAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1490,17 +1559,19 @@ public final Operation deployModel(ModelName name) { *

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
    *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   Operation response = autoMlClient.deployModel(name.toString());
+   *   autoMlClient.deployModelAsync(name.toString()).get();
    * }
    * 
* * @param name Resource name of the model to deploy. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation deployModel(String name) { + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture deployModelAsync(String name) { DeployModelRequest request = DeployModelRequest.newBuilder().setName(name).build(); - return deployModel(request); + return deployModelAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1525,15 +1596,52 @@ public final Operation deployModel(String name) { * DeployModelRequest request = DeployModelRequest.newBuilder() * .setName(name.toString()) * .build(); - * Operation response = autoMlClient.deployModel(request); + * autoMlClient.deployModelAsync(request).get(); * } * * * @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 Operation deployModel(DeployModelRequest request) { - return deployModelCallable().call(request); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture deployModelAsync( + DeployModelRequest request) { + return deployModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Deploys a model. If a model is already deployed, deploying it with the same parameters has no + * effect. Deploying with different parametrs (as e.g. changing + * + *

[node_number][google.cloud.automl.v1beta1.ImageObjectDetectionModelDeploymentMetadata.node_number] + * ) will update the deployment without pausing the model's availability. + * + *

Only applicable for Text Classification, Image Object Detection and Tables; all other + * domains manage deployment automatically. + * + *

Returns an empty response in the [response][google.longrunning.Operation.response] field + * when it completes. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   DeployModelRequest request = DeployModelRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   OperationFuture<Empty, OperationMetadata> future = autoMlClient.deployModelOperationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + deployModelOperationCallable() { + return stub.deployModelOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1560,7 +1668,7 @@ public final Operation deployModel(DeployModelRequest request) { * .build(); * ApiFuture<Operation> future = autoMlClient.deployModelCallable().futureCall(request); * // Do something - * Operation response = future.get(); + * future.get(); * } * */ @@ -1583,18 +1691,20 @@ public final UnaryCallable deployModelCallable() *

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
    *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   Operation response = autoMlClient.undeployModel(name);
+   *   autoMlClient.undeployModelAsync(name).get();
    * }
    * 
* * @param name Resource name of the model to undeploy. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation undeployModel(ModelName name) { + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture undeployModelAsync(ModelName name) { UndeployModelRequest request = UndeployModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); - return undeployModel(request); + return undeployModelAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1612,17 +1722,19 @@ public final Operation undeployModel(ModelName name) { *

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
    *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   Operation response = autoMlClient.undeployModel(name.toString());
+   *   autoMlClient.undeployModelAsync(name.toString()).get();
    * }
    * 
* * @param name Resource name of the model to undeploy. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Operation undeployModel(String name) { + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture undeployModelAsync(String name) { UndeployModelRequest request = UndeployModelRequest.newBuilder().setName(name).build(); - return undeployModel(request); + return undeployModelAsync(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1643,15 +1755,48 @@ public final Operation undeployModel(String name) { * UndeployModelRequest request = UndeployModelRequest.newBuilder() * .setName(name.toString()) * .build(); - * Operation response = autoMlClient.undeployModel(request); + * autoMlClient.undeployModelAsync(request).get(); * } * * * @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 Operation undeployModel(UndeployModelRequest request) { - return undeployModelCallable().call(request); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture undeployModelAsync( + UndeployModelRequest request) { + return undeployModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Undeploys a model. If the model is not deployed this method has no effect. + * + *

Only applicable for Text Classification, Image Object Detection and Tables; all other + * domains manage deployment automatically. + * + *

Returns an empty response in the [response][google.longrunning.Operation.response] field + * when it completes. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   UndeployModelRequest request = UndeployModelRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   OperationFuture<Empty, OperationMetadata> future = autoMlClient.undeployModelOperationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + undeployModelOperationCallable() { + return stub.undeployModelOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1674,7 +1819,7 @@ public final Operation undeployModel(UndeployModelRequest request) { * .build(); * ApiFuture<Operation> future = autoMlClient.undeployModelCallable().futureCall(request); * // Do something - * Operation response = future.get(); + * future.get(); * } * */ @@ -1778,117 +1923,322 @@ public final ModelEvaluation getModelEvaluation(GetModelEvaluationRequest reques // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists model evaluations. + * Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A + * model is considered export-able if and only if it has an export format defined for it in + * + *

[ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. + * + *

Returns an empty response in the [response][google.longrunning.Operation.response] field + * when it completes. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   for (ModelEvaluation element : autoMlClient.listModelEvaluations(parent).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ModelExportOutputConfig outputConfig = ModelExportOutputConfig.newBuilder().build();
+   *   ExportModelRequest request = ExportModelRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   autoMlClient.exportModelAsync(request).get();
    * }
    * 
* - * @param parent Resource name of the model to list the model evaluations for. If modelId is set - * as "-", this will list model evaluations from across all models of the parent location. + * @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 ListModelEvaluationsPagedResponse listModelEvaluations(ModelName parent) { - ListModelEvaluationsRequest request = - ListModelEvaluationsRequest.newBuilder() - .setParent(parent == null ? null : parent.toString()) - .build(); - return listModelEvaluations(request); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture exportModelAsync( + ExportModelRequest request) { + return exportModelOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists model evaluations. + * Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A + * model is considered export-able if and only if it has an export format defined for it in + * + *

[ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. + * + *

Returns an empty response in the [response][google.longrunning.Operation.response] field + * when it completes. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   for (ModelEvaluation element : autoMlClient.listModelEvaluations(parent.toString()).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ModelExportOutputConfig outputConfig = ModelExportOutputConfig.newBuilder().build();
+   *   ExportModelRequest request = ExportModelRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   OperationFuture<Empty, OperationMetadata> future = autoMlClient.exportModelOperationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
    * }
    * 
- * - * @param parent Resource name of the model to list the model evaluations for. If modelId is set - * as "-", this will list model evaluations from across all models of the parent location. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ListModelEvaluationsPagedResponse listModelEvaluations(String parent) { - ListModelEvaluationsRequest request = - ListModelEvaluationsRequest.newBuilder().setParent(parent).build(); - return listModelEvaluations(request); + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + exportModelOperationCallable() { + return stub.exportModelOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists model evaluations. + * Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A + * model is considered export-able if and only if it has an export format defined for it in + * + *

[ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. + * + *

Returns an empty response in the [response][google.longrunning.Operation.response] field + * when it completes. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
-   *     .setParent(parent.toString())
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ModelExportOutputConfig outputConfig = ModelExportOutputConfig.newBuilder().build();
+   *   ExportModelRequest request = ExportModelRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setOutputConfig(outputConfig)
    *     .build();
-   *   for (ModelEvaluation element : autoMlClient.listModelEvaluations(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   ApiFuture<Operation> future = autoMlClient.exportModelCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
    * }
    * 
- * - * @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 ListModelEvaluationsPagedResponse listModelEvaluations( - ListModelEvaluationsRequest request) { - return listModelEvaluationsPagedCallable().call(request); + public final UnaryCallable exportModelCallable() { + return stub.exportModelCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists model evaluations. + * Exports examples on which the model was evaluated (i.e. which were in the TEST set of the + * dataset the model was created from), together with their ground truth annotations and the + * annotations created (predicted) by the model. The examples, ground truth and predictions are + * exported in the state they were at the moment the model was evaluated. + * + *

This export is available only for 30 days since the model evaluation is created. + * + *

Currently only available for Tables. + * + *

Returns an empty response in the [response][google.longrunning.Operation.response] field + * when it completes. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
-   *     .setParent(parent.toString())
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ExportEvaluatedExamplesOutputConfig outputConfig = ExportEvaluatedExamplesOutputConfig.newBuilder().build();
+   *   ExportEvaluatedExamplesRequest request = ExportEvaluatedExamplesRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setOutputConfig(outputConfig)
    *     .build();
-   *   ApiFuture<ListModelEvaluationsPagedResponse> future = autoMlClient.listModelEvaluationsPagedCallable().futureCall(request);
-   *   // Do something
-   *   for (ModelEvaluation element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   autoMlClient.exportEvaluatedExamplesAsync(request).get();
    * }
    * 
+ * + * @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 UnaryCallable - listModelEvaluationsPagedCallable() { - return stub.listModelEvaluationsPagedCallable(); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture exportEvaluatedExamplesAsync( + ExportEvaluatedExamplesRequest request) { + return exportEvaluatedExamplesOperationCallable().futureCall(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists model evaluations. + * Exports examples on which the model was evaluated (i.e. which were in the TEST set of the + * dataset the model was created from), together with their ground truth annotations and the + * annotations created (predicted) by the model. The examples, ground truth and predictions are + * exported in the state they were at the moment the model was evaluated. * - *

Sample code: + *

This export is available only for 30 days since the model evaluation is created. * - *


-   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
-   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
+   * 

Currently only available for Tables. + * + *

Returns an empty response in the [response][google.longrunning.Operation.response] field + * when it completes. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ExportEvaluatedExamplesOutputConfig outputConfig = ExportEvaluatedExamplesOutputConfig.newBuilder().build();
+   *   ExportEvaluatedExamplesRequest request = ExportEvaluatedExamplesRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   OperationFuture<Empty, OperationMetadata> future = autoMlClient.exportEvaluatedExamplesOperationCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + exportEvaluatedExamplesOperationCallable() { + return stub.exportEvaluatedExamplesOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Exports examples on which the model was evaluated (i.e. which were in the TEST set of the + * dataset the model was created from), together with their ground truth annotations and the + * annotations created (predicted) by the model. The examples, ground truth and predictions are + * exported in the state they were at the moment the model was evaluated. + * + *

This export is available only for 30 days since the model evaluation is created. + * + *

Currently only available for Tables. + * + *

Returns an empty response in the [response][google.longrunning.Operation.response] field + * when it completes. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ExportEvaluatedExamplesOutputConfig outputConfig = ExportEvaluatedExamplesOutputConfig.newBuilder().build();
+   *   ExportEvaluatedExamplesRequest request = ExportEvaluatedExamplesRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   ApiFuture<Operation> future = autoMlClient.exportEvaluatedExamplesCallable().futureCall(request);
+   *   // Do something
+   *   future.get();
+   * }
+   * 
+ */ + public final UnaryCallable + exportEvaluatedExamplesCallable() { + return stub.exportEvaluatedExamplesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists model evaluations. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   for (ModelEvaluation element : autoMlClient.listModelEvaluations(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Resource name of the model to list the model evaluations for. If modelId is set + * as "-", this will list model evaluations from across all models of the parent location. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelEvaluationsPagedResponse listModelEvaluations(ModelName parent) { + ListModelEvaluationsRequest request = + ListModelEvaluationsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listModelEvaluations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists model evaluations. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   for (ModelEvaluation element : autoMlClient.listModelEvaluations(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent Resource name of the model to list the model evaluations for. If modelId is set + * as "-", this will list model evaluations from across all models of the parent location. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelEvaluationsPagedResponse listModelEvaluations(String parent) { + ListModelEvaluationsRequest request = + ListModelEvaluationsRequest.newBuilder().setParent(parent).build(); + return listModelEvaluations(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists model evaluations. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (ModelEvaluation element : autoMlClient.listModelEvaluations(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @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 ListModelEvaluationsPagedResponse listModelEvaluations( + ListModelEvaluationsRequest request) { + return listModelEvaluationsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists model evaluations. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListModelEvaluationsPagedResponse> future = autoMlClient.listModelEvaluationsPagedCallable().futureCall(request);
+   *   // Do something
+   *   for (ModelEvaluation element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ */ + public final UnaryCallable + listModelEvaluationsPagedCallable() { + return stub.listModelEvaluationsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists model evaluations. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   ModelName parent = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   ListModelEvaluationsRequest request = ListModelEvaluationsRequest.newBuilder()
    *     .setParent(parent.toString())
    *     .build();
    *   while (true) {
@@ -1913,41 +2263,49 @@ public final ListModelEvaluationsPagedResponse listModelEvaluations(
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD
   /**
-   * Updates a dataset.
+   * Gets an annotation spec.
    *
    * 

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   UpdateDatasetRequest request = UpdateDatasetRequest.newBuilder().build();
-   *   Dataset response = autoMlClient.updateDataset(request);
+   *   AnnotationSpecName name = AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
+   *   AnnotationSpec response = autoMlClient.getAnnotationSpec(name);
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param name The resource name of the annotation spec to retrieve. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final Dataset updateDataset(UpdateDatasetRequest request) { - return updateDatasetCallable().call(request); + public final AnnotationSpec getAnnotationSpec(AnnotationSpecName name) { + + GetAnnotationSpecRequest request = + GetAnnotationSpecRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .build(); + return getAnnotationSpec(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates a dataset. + * Gets an annotation spec. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   UpdateDatasetRequest request = UpdateDatasetRequest.newBuilder().build();
-   *   ApiFuture<Dataset> future = autoMlClient.updateDatasetCallable().futureCall(request);
-   *   // Do something
-   *   Dataset response = future.get();
+   *   AnnotationSpecName name = AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
+   *   AnnotationSpec response = autoMlClient.getAnnotationSpec(name.toString());
    * }
    * 
+ * + * @param name The resource name of the annotation spec to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable updateDatasetCallable() { - return stub.updateDatasetCallable(); + public final AnnotationSpec getAnnotationSpec(String name) { + + GetAnnotationSpecRequest request = GetAnnotationSpecRequest.newBuilder().setName(name).build(); + return getAnnotationSpec(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -1958,7 +2316,10 @@ public final UnaryCallable updateDatasetCallable( * *

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   GetAnnotationSpecRequest request = GetAnnotationSpecRequest.newBuilder().build();
+   *   AnnotationSpecName name = AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
+   *   GetAnnotationSpecRequest request = GetAnnotationSpecRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
    *   AnnotationSpec response = autoMlClient.getAnnotationSpec(request);
    * }
    * 
@@ -1978,7 +2339,10 @@ public final AnnotationSpec getAnnotationSpec(GetAnnotationSpecRequest request) * *

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   GetAnnotationSpecRequest request = GetAnnotationSpecRequest.newBuilder().build();
+   *   AnnotationSpecName name = AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
+   *   GetAnnotationSpecRequest request = GetAnnotationSpecRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
    *   ApiFuture<AnnotationSpec> future = autoMlClient.getAnnotationSpecCallable().futureCall(request);
    *   // Do something
    *   AnnotationSpec response = future.get();
@@ -1997,7 +2361,55 @@ public final UnaryCallable getAnnotati
    *
    * 

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   GetTableSpecRequest request = GetTableSpecRequest.newBuilder().build();
+   *   TableSpecName name = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+   *   TableSpec response = autoMlClient.getTableSpec(name);
+   * }
+   * 
+ * + * @param name The resource name of the table spec to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TableSpec getTableSpec(TableSpecName name) { + + GetTableSpecRequest request = + GetTableSpecRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getTableSpec(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a table spec. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   TableSpecName name = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+   *   TableSpec response = autoMlClient.getTableSpec(name.toString());
+   * }
+   * 
+ * + * @param name The resource name of the table spec to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TableSpec getTableSpec(String name) { + + GetTableSpecRequest request = GetTableSpecRequest.newBuilder().setName(name).build(); + return getTableSpec(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Gets a table spec. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   TableSpecName name = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+   *   GetTableSpecRequest request = GetTableSpecRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
    *   TableSpec response = autoMlClient.getTableSpec(request);
    * }
    * 
@@ -2017,7 +2429,10 @@ public final TableSpec getTableSpec(GetTableSpecRequest request) { * *

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   GetTableSpecRequest request = GetTableSpecRequest.newBuilder().build();
+   *   TableSpecName name = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+   *   GetTableSpecRequest request = GetTableSpecRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
    *   ApiFuture<TableSpec> future = autoMlClient.getTableSpecCallable().futureCall(request);
    *   // Do something
    *   TableSpec response = future.get();
@@ -2036,7 +2451,59 @@ public final UnaryCallable getTableSpecCallable(
    *
    * 

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ListTableSpecsRequest request = ListTableSpecsRequest.newBuilder().build();
+   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   for (TableSpec element : autoMlClient.listTableSpecs(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent The resource name of the dataset to list table specs from. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTableSpecsPagedResponse listTableSpecs(DatasetName parent) { + ListTableSpecsRequest request = + ListTableSpecsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listTableSpecs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists table specs in a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   for (TableSpec element : autoMlClient.listTableSpecs(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * 
+ * + * @param parent The resource name of the dataset to list table specs from. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListTableSpecsPagedResponse listTableSpecs(String parent) { + ListTableSpecsRequest request = ListTableSpecsRequest.newBuilder().setParent(parent).build(); + return listTableSpecs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists table specs in a dataset. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   ListTableSpecsRequest request = ListTableSpecsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
    *   for (TableSpec element : autoMlClient.listTableSpecs(request).iterateAll()) {
    *     // doThingsWith(element);
    *   }
@@ -2058,7 +2525,10 @@ public final ListTableSpecsPagedResponse listTableSpecs(ListTableSpecsRequest re
    *
    * 

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ListTableSpecsRequest request = ListTableSpecsRequest.newBuilder().build();
+   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   ListTableSpecsRequest request = ListTableSpecsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
    *   ApiFuture<ListTableSpecsPagedResponse> future = autoMlClient.listTableSpecsPagedCallable().futureCall(request);
    *   // Do something
    *   for (TableSpec element : future.get().iterateAll()) {
@@ -2080,7 +2550,10 @@ public final ListTableSpecsPagedResponse listTableSpecs(ListTableSpecsRequest re
    *
    * 

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ListTableSpecsRequest request = ListTableSpecsRequest.newBuilder().build();
+   *   DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+   *   ListTableSpecsRequest request = ListTableSpecsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
    *   while (true) {
    *     ListTableSpecsResponse response = autoMlClient.listTableSpecsCallable().call(request);
    *     for (TableSpec element : response.getTableSpecsList()) {
@@ -2109,7 +2582,33 @@ public final ListTableSpecsPagedResponse listTableSpecs(ListTableSpecsRequest re
    *
    * 

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   UpdateTableSpecRequest request = UpdateTableSpecRequest.newBuilder().build();
+   *   TableSpec tableSpec = TableSpec.newBuilder().build();
+   *   TableSpec response = autoMlClient.updateTableSpec(tableSpec);
+   * }
+   * 
+ * + * @param tableSpec The table spec which replaces the resource on the server. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final TableSpec updateTableSpec(TableSpec tableSpec) { + + UpdateTableSpecRequest request = + UpdateTableSpecRequest.newBuilder().setTableSpec(tableSpec).build(); + return updateTableSpec(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Updates a table spec. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   TableSpec tableSpec = TableSpec.newBuilder().build();
+   *   UpdateTableSpecRequest request = UpdateTableSpecRequest.newBuilder()
+   *     .setTableSpec(tableSpec)
+   *     .build();
    *   TableSpec response = autoMlClient.updateTableSpec(request);
    * }
    * 
@@ -2129,7 +2628,10 @@ public final TableSpec updateTableSpec(UpdateTableSpecRequest request) { * *

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   UpdateTableSpecRequest request = UpdateTableSpecRequest.newBuilder().build();
+   *   TableSpec tableSpec = TableSpec.newBuilder().build();
+   *   UpdateTableSpecRequest request = UpdateTableSpecRequest.newBuilder()
+   *     .setTableSpec(tableSpec)
+   *     .build();
    *   ApiFuture<TableSpec> future = autoMlClient.updateTableSpecCallable().futureCall(request);
    *   // Do something
    *   TableSpec response = future.get();
@@ -2148,16 +2650,19 @@ public final UnaryCallable updateTableSpecCal
    *
    * 

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   GetColumnSpecRequest request = GetColumnSpecRequest.newBuilder().build();
-   *   ColumnSpec response = autoMlClient.getColumnSpec(request);
+   *   ColumnSpecName name = ColumnSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]");
+   *   ColumnSpec response = autoMlClient.getColumnSpec(name);
    * }
    * 
* - * @param request The request object containing all of the parameters for the API call. + * @param name The resource name of the column spec to retrieve. * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final ColumnSpec getColumnSpec(GetColumnSpecRequest request) { - return getColumnSpecCallable().call(request); + public final ColumnSpec getColumnSpec(ColumnSpecName name) { + + GetColumnSpecRequest request = + GetColumnSpecRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getColumnSpec(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -2168,59 +2673,89 @@ public final ColumnSpec getColumnSpec(GetColumnSpecRequest request) { * *

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   GetColumnSpecRequest request = GetColumnSpecRequest.newBuilder().build();
-   *   ApiFuture<ColumnSpec> future = autoMlClient.getColumnSpecCallable().futureCall(request);
-   *   // Do something
-   *   ColumnSpec response = future.get();
+   *   ColumnSpecName name = ColumnSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]");
+   *   ColumnSpec response = autoMlClient.getColumnSpec(name.toString());
    * }
    * 
+ * + * @param name The resource name of the column spec to retrieve. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable getColumnSpecCallable() { - return stub.getColumnSpecCallable(); + public final ColumnSpec getColumnSpec(String name) { + + GetColumnSpecRequest request = GetColumnSpecRequest.newBuilder().setName(name).build(); + return getColumnSpec(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists column specs in a table spec. + * Gets a column spec. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ListColumnSpecsRequest request = ListColumnSpecsRequest.newBuilder().build();
-   *   for (ColumnSpec element : autoMlClient.listColumnSpecs(request).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
+   *   ColumnSpecName name = ColumnSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]");
+   *   GetColumnSpecRequest request = GetColumnSpecRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ColumnSpec response = autoMlClient.getColumnSpec(request);
    * }
    * 
* * @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 ListColumnSpecsPagedResponse listColumnSpecs(ListColumnSpecsRequest request) { - return listColumnSpecsPagedCallable().call(request); + public final ColumnSpec getColumnSpec(GetColumnSpecRequest request) { + return getColumnSpecCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Lists column specs in a table spec. + * Gets a column spec. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ListColumnSpecsRequest request = ListColumnSpecsRequest.newBuilder().build();
-   *   ApiFuture<ListColumnSpecsPagedResponse> future = autoMlClient.listColumnSpecsPagedCallable().futureCall(request);
+   *   ColumnSpecName name = ColumnSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]");
+   *   GetColumnSpecRequest request = GetColumnSpecRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .build();
+   *   ApiFuture<ColumnSpec> future = autoMlClient.getColumnSpecCallable().futureCall(request);
    *   // Do something
-   *   for (ColumnSpec element : future.get().iterateAll()) {
+   *   ColumnSpec response = future.get();
+   * }
+   * 
+ */ + public final UnaryCallable getColumnSpecCallable() { + return stub.getColumnSpecCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Lists column specs in a table spec. + * + *

Sample code: + * + *


+   * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
+   *   TableSpecName parent = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+   *   for (ColumnSpec element : autoMlClient.listColumnSpecs(parent).iterateAll()) {
    *     // doThingsWith(element);
    *   }
    * }
    * 
+ * + * @param parent The resource name of the table spec to list column specs from. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listColumnSpecsPagedCallable() { - return stub.listColumnSpecsPagedCallable(); + public final ListColumnSpecsPagedResponse listColumnSpecs(TableSpecName parent) { + ListColumnSpecsRequest request = + ListColumnSpecsRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .build(); + return listColumnSpecs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -2231,175 +2766,169 @@ public final ListColumnSpecsPagedResponse listColumnSpecs(ListColumnSpecsRequest * *

    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ListColumnSpecsRequest request = ListColumnSpecsRequest.newBuilder().build();
-   *   while (true) {
-   *     ListColumnSpecsResponse response = autoMlClient.listColumnSpecsCallable().call(request);
-   *     for (ColumnSpec element : response.getColumnSpecsList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
+   *   TableSpecName parent = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+   *   for (ColumnSpec element : autoMlClient.listColumnSpecs(parent.toString()).iterateAll()) {
+   *     // doThingsWith(element);
    *   }
    * }
    * 
+ * + * @param parent The resource name of the table spec to list column specs from. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable - listColumnSpecsCallable() { - return stub.listColumnSpecsCallable(); + public final ListColumnSpecsPagedResponse listColumnSpecs(String parent) { + ListColumnSpecsRequest request = ListColumnSpecsRequest.newBuilder().setParent(parent).build(); + return listColumnSpecs(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates a column spec. + * Lists column specs in a table spec. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   UpdateColumnSpecRequest request = UpdateColumnSpecRequest.newBuilder().build();
-   *   ColumnSpec response = autoMlClient.updateColumnSpec(request);
+   *   TableSpecName parent = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+   *   ListColumnSpecsRequest request = ListColumnSpecsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   for (ColumnSpec element : autoMlClient.listColumnSpecs(request).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
* * @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 ColumnSpec updateColumnSpec(UpdateColumnSpecRequest request) { - return updateColumnSpecCallable().call(request); + public final ListColumnSpecsPagedResponse listColumnSpecs(ListColumnSpecsRequest request) { + return listColumnSpecsPagedCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Updates a column spec. + * Lists column specs in a table spec. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   UpdateColumnSpecRequest request = UpdateColumnSpecRequest.newBuilder().build();
-   *   ApiFuture<ColumnSpec> future = autoMlClient.updateColumnSpecCallable().futureCall(request);
+   *   TableSpecName parent = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+   *   ListColumnSpecsRequest request = ListColumnSpecsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   ApiFuture<ListColumnSpecsPagedResponse> future = autoMlClient.listColumnSpecsPagedCallable().futureCall(request);
    *   // Do something
-   *   ColumnSpec response = future.get();
+   *   for (ColumnSpec element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
    * }
    * 
*/ - public final UnaryCallable updateColumnSpecCallable() { - return stub.updateColumnSpecCallable(); + public final UnaryCallable + listColumnSpecsPagedCallable() { + return stub.listColumnSpecsPagedCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A - * model is considered export-able if and only if it has an export format defined for it in - * - *

[ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. + * Lists column specs in a table spec. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ExportModelRequest request = ExportModelRequest.newBuilder().build();
-   *   Operation response = autoMlClient.exportModel(request);
+   *   TableSpecName parent = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+   *   ListColumnSpecsRequest request = ListColumnSpecsRequest.newBuilder()
+   *     .setParent(parent.toString())
+   *     .build();
+   *   while (true) {
+   *     ListColumnSpecsResponse response = autoMlClient.listColumnSpecsCallable().call(request);
+   *     for (ColumnSpec element : response.getColumnSpecsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
    * }
    * 
- * - * @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 Operation exportModel(ExportModelRequest request) { - return exportModelCallable().call(request); + public final UnaryCallable + listColumnSpecsCallable() { + return stub.listColumnSpecsCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Exports a trained, "export-able", model to a user specified Google Cloud Storage location. A - * model is considered export-able if and only if it has an export format defined for it in - * - *

[ModelExportOutputConfig][google.cloud.automl.v1beta1.ModelExportOutputConfig]. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. + * Updates a column spec. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ExportModelRequest request = ExportModelRequest.newBuilder().build();
-   *   ApiFuture<Operation> future = autoMlClient.exportModelCallable().futureCall(request);
-   *   // Do something
-   *   Operation response = future.get();
+   *   ColumnSpec columnSpec = ColumnSpec.newBuilder().build();
+   *   ColumnSpec response = autoMlClient.updateColumnSpec(columnSpec);
    * }
    * 
+ * + * @param columnSpec The column spec which replaces the resource on the server. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ - public final UnaryCallable exportModelCallable() { - return stub.exportModelCallable(); + public final ColumnSpec updateColumnSpec(ColumnSpec columnSpec) { + + UpdateColumnSpecRequest request = + UpdateColumnSpecRequest.newBuilder().setColumnSpec(columnSpec).build(); + return updateColumnSpec(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Exports examples on which the model was evaluated (i.e. which were in the TEST set of the - * dataset the model was created from), together with their ground truth annotations and the - * annotations created (predicted) by the model. The examples, ground truth and predictions are - * exported in the state they were at the moment the model was evaluated. - * - *

This export is available only for 30 days since the model evaluation is created. - * - *

Currently only available for Tables. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. + * Updates a column spec. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ExportEvaluatedExamplesRequest request = ExportEvaluatedExamplesRequest.newBuilder().build();
-   *   Operation response = autoMlClient.exportEvaluatedExamples(request);
+   *   ColumnSpec columnSpec = ColumnSpec.newBuilder().build();
+   *   UpdateColumnSpecRequest request = UpdateColumnSpecRequest.newBuilder()
+   *     .setColumnSpec(columnSpec)
+   *     .build();
+   *   ColumnSpec response = autoMlClient.updateColumnSpec(request);
    * }
    * 
* * @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 Operation exportEvaluatedExamples(ExportEvaluatedExamplesRequest request) { - return exportEvaluatedExamplesCallable().call(request); + public final ColumnSpec updateColumnSpec(UpdateColumnSpecRequest request) { + return updateColumnSpecCallable().call(request); } // AUTO-GENERATED DOCUMENTATION AND METHOD /** - * Exports examples on which the model was evaluated (i.e. which were in the TEST set of the - * dataset the model was created from), together with their ground truth annotations and the - * annotations created (predicted) by the model. The examples, ground truth and predictions are - * exported in the state they were at the moment the model was evaluated. - * - *

This export is available only for 30 days since the model evaluation is created. - * - *

Currently only available for Tables. - * - *

Returns an empty response in the [response][google.longrunning.Operation.response] field - * when it completes. + * Updates a column spec. * *

Sample code: * *


    * try (AutoMlClient autoMlClient = AutoMlClient.create()) {
-   *   ExportEvaluatedExamplesRequest request = ExportEvaluatedExamplesRequest.newBuilder().build();
-   *   ApiFuture<Operation> future = autoMlClient.exportEvaluatedExamplesCallable().futureCall(request);
+   *   ColumnSpec columnSpec = ColumnSpec.newBuilder().build();
+   *   UpdateColumnSpecRequest request = UpdateColumnSpecRequest.newBuilder()
+   *     .setColumnSpec(columnSpec)
+   *     .build();
+   *   ApiFuture<ColumnSpec> future = autoMlClient.updateColumnSpecCallable().futureCall(request);
    *   // Do something
-   *   Operation response = future.get();
+   *   ColumnSpec response = future.get();
    * }
    * 
*/ - public final UnaryCallable - exportEvaluatedExamplesCallable() { - return stub.exportEvaluatedExamplesCallable(); + public final UnaryCallable updateColumnSpecCallable() { + return stub.updateColumnSpecCallable(); } @Override diff --git a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlSettings.java b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlSettings.java index a2f112e96885..bf1c36e0a36b 100644 --- a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlSettings.java +++ b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/AutoMlSettings.java @@ -74,6 +74,11 @@ public UnaryCallSettings createDatasetSettings() return ((AutoMlStubSettings) getStubSettings()).createDatasetSettings(); } + /** Returns the object with the settings used for calls to updateDataset. */ + public UnaryCallSettings updateDatasetSettings() { + return ((AutoMlStubSettings) getStubSettings()).updateDatasetSettings(); + } + /** Returns the object with the settings used for calls to getDataset. */ public UnaryCallSettings getDatasetSettings() { return ((AutoMlStubSettings) getStubSettings()).getDatasetSettings(); @@ -166,17 +171,60 @@ public UnaryCallSettings deployModelSettings() { return ((AutoMlStubSettings) getStubSettings()).deployModelSettings(); } + /** Returns the object with the settings used for calls to deployModel. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + deployModelOperationSettings() { + return ((AutoMlStubSettings) getStubSettings()).deployModelOperationSettings(); + } + /** Returns the object with the settings used for calls to undeployModel. */ public UnaryCallSettings undeployModelSettings() { return ((AutoMlStubSettings) getStubSettings()).undeployModelSettings(); } + /** Returns the object with the settings used for calls to undeployModel. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + undeployModelOperationSettings() { + return ((AutoMlStubSettings) getStubSettings()).undeployModelOperationSettings(); + } + /** Returns the object with the settings used for calls to getModelEvaluation. */ public UnaryCallSettings getModelEvaluationSettings() { return ((AutoMlStubSettings) getStubSettings()).getModelEvaluationSettings(); } + /** Returns the object with the settings used for calls to exportModel. */ + public UnaryCallSettings exportModelSettings() { + return ((AutoMlStubSettings) getStubSettings()).exportModelSettings(); + } + + /** Returns the object with the settings used for calls to exportModel. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + exportModelOperationSettings() { + return ((AutoMlStubSettings) getStubSettings()).exportModelOperationSettings(); + } + + /** Returns the object with the settings used for calls to exportEvaluatedExamples. */ + public UnaryCallSettings + exportEvaluatedExamplesSettings() { + return ((AutoMlStubSettings) getStubSettings()).exportEvaluatedExamplesSettings(); + } + + /** Returns the object with the settings used for calls to exportEvaluatedExamples. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings + exportEvaluatedExamplesOperationSettings() { + return ((AutoMlStubSettings) getStubSettings()).exportEvaluatedExamplesOperationSettings(); + } + /** Returns the object with the settings used for calls to listModelEvaluations. */ public PagedCallSettings< ListModelEvaluationsRequest, @@ -186,11 +234,6 @@ public UnaryCallSettings undeployModelSettings( return ((AutoMlStubSettings) getStubSettings()).listModelEvaluationsSettings(); } - /** Returns the object with the settings used for calls to updateDataset. */ - public UnaryCallSettings updateDatasetSettings() { - return ((AutoMlStubSettings) getStubSettings()).updateDatasetSettings(); - } - /** Returns the object with the settings used for calls to getAnnotationSpec. */ public UnaryCallSettings getAnnotationSpecSettings() { return ((AutoMlStubSettings) getStubSettings()).getAnnotationSpecSettings(); @@ -230,17 +273,6 @@ public UnaryCallSettings updateColumnSpecSe return ((AutoMlStubSettings) getStubSettings()).updateColumnSpecSettings(); } - /** Returns the object with the settings used for calls to exportModel. */ - public UnaryCallSettings exportModelSettings() { - return ((AutoMlStubSettings) getStubSettings()).exportModelSettings(); - } - - /** Returns the object with the settings used for calls to exportEvaluatedExamples. */ - public UnaryCallSettings - exportEvaluatedExamplesSettings() { - return ((AutoMlStubSettings) getStubSettings()).exportEvaluatedExamplesSettings(); - } - public static final AutoMlSettings create(AutoMlStubSettings stub) throws IOException { return new AutoMlSettings.Builder(stub.toBuilder()).build(); } @@ -342,6 +374,11 @@ public UnaryCallSettings.Builder createDatasetSet return getStubSettingsBuilder().createDatasetSettings(); } + /** Returns the builder for the settings used for calls to updateDataset. */ + public UnaryCallSettings.Builder updateDatasetSettings() { + return getStubSettingsBuilder().updateDatasetSettings(); + } + /** Returns the builder for the settings used for calls to getDataset. */ public UnaryCallSettings.Builder getDatasetSettings() { return getStubSettingsBuilder().getDatasetSettings(); @@ -435,17 +472,60 @@ public UnaryCallSettings.Builder deployModelSetti return getStubSettingsBuilder().deployModelSettings(); } + /** Returns the builder for the settings used for calls to deployModel. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deployModelOperationSettings() { + return getStubSettingsBuilder().deployModelOperationSettings(); + } + /** Returns the builder for the settings used for calls to undeployModel. */ public UnaryCallSettings.Builder undeployModelSettings() { return getStubSettingsBuilder().undeployModelSettings(); } + /** Returns the builder for the settings used for calls to undeployModel. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder + undeployModelOperationSettings() { + return getStubSettingsBuilder().undeployModelOperationSettings(); + } + /** Returns the builder for the settings used for calls to getModelEvaluation. */ public UnaryCallSettings.Builder getModelEvaluationSettings() { return getStubSettingsBuilder().getModelEvaluationSettings(); } + /** Returns the builder for the settings used for calls to exportModel. */ + public UnaryCallSettings.Builder exportModelSettings() { + return getStubSettingsBuilder().exportModelSettings(); + } + + /** Returns the builder for the settings used for calls to exportModel. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder + exportModelOperationSettings() { + return getStubSettingsBuilder().exportModelOperationSettings(); + } + + /** Returns the builder for the settings used for calls to exportEvaluatedExamples. */ + public UnaryCallSettings.Builder + exportEvaluatedExamplesSettings() { + return getStubSettingsBuilder().exportEvaluatedExamplesSettings(); + } + + /** Returns the builder for the settings used for calls to exportEvaluatedExamples. */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public OperationCallSettings.Builder + exportEvaluatedExamplesOperationSettings() { + return getStubSettingsBuilder().exportEvaluatedExamplesOperationSettings(); + } + /** Returns the builder for the settings used for calls to listModelEvaluations. */ public PagedCallSettings.Builder< ListModelEvaluationsRequest, @@ -455,11 +535,6 @@ public UnaryCallSettings.Builder undeployModelS return getStubSettingsBuilder().listModelEvaluationsSettings(); } - /** Returns the builder for the settings used for calls to updateDataset. */ - public UnaryCallSettings.Builder updateDatasetSettings() { - return getStubSettingsBuilder().updateDatasetSettings(); - } - /** Returns the builder for the settings used for calls to getAnnotationSpec. */ public UnaryCallSettings.Builder getAnnotationSpecSettings() { @@ -501,17 +576,6 @@ public UnaryCallSettings.Builder getColumnSpec return getStubSettingsBuilder().updateColumnSpecSettings(); } - /** Returns the builder for the settings used for calls to exportModel. */ - public UnaryCallSettings.Builder exportModelSettings() { - return getStubSettingsBuilder().exportModelSettings(); - } - - /** Returns the builder for the settings used for calls to exportEvaluatedExamples. */ - public UnaryCallSettings.Builder - exportEvaluatedExamplesSettings() { - return getStubSettingsBuilder().exportEvaluatedExamplesSettings(); - } - @Override public AutoMlSettings build() throws IOException { return new AutoMlSettings(this); diff --git a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceClient.java b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceClient.java index afe1126092dd..9aaaeb81fda4 100644 --- a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceClient.java +++ b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceClient.java @@ -17,10 +17,13 @@ import com.google.api.core.BetaApi; import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.rpc.OperationCallable; import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.automl.v1beta1.stub.PredictionServiceStub; import com.google.cloud.automl.v1beta1.stub.PredictionServiceStubSettings; import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; import java.io.IOException; import java.util.Map; import java.util.concurrent.TimeUnit; @@ -103,6 +106,7 @@ public class PredictionServiceClient implements BackgroundResource { private final PredictionServiceSettings settings; private final PredictionServiceStub stub; + private final OperationsClient operationsClient; /** Constructs an instance of PredictionServiceClient with default settings. */ public static final PredictionServiceClient create() throws IOException { @@ -135,12 +139,14 @@ public static final PredictionServiceClient create(PredictionServiceStub stub) { protected PredictionServiceClient(PredictionServiceSettings settings) throws IOException { this.settings = settings; this.stub = ((PredictionServiceStubSettings) settings.getStubSettings()).createStub(); + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); } @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected PredictionServiceClient(PredictionServiceStub stub) { this.settings = null; this.stub = stub; + this.operationsClient = OperationsClient.create(this.stub.getOperationsStub()); } public final PredictionServiceSettings getSettings() { @@ -152,6 +158,16 @@ public PredictionServiceStub getStub() { return stub; } + /** + * Returns the OperationsClient that can be used to query the status of a long-running operation + * returned by another API method call. + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationsClient getOperationsClient() { + return operationsClient; + } + // AUTO-GENERATED DOCUMENTATION AND METHOD /** * Perform an online prediction. The prediction result will be directly returned in the response. @@ -330,16 +346,195 @@ public final UnaryCallable predictCallable() { * *

    * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   BatchPredictRequest request = BatchPredictRequest.newBuilder().build();
-   *   Operation response = predictionServiceClient.batchPredict(request);
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build();
+   *   BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build();
+   *   Map<String, String> params = new HashMap<>();
+   *   BatchPredictResult response = predictionServiceClient.batchPredictAsync(name, inputConfig, outputConfig, params).get();
+   * }
+   * 
+ * + * @param name Name of the model requested to serve the batch prediction. + * @param inputConfig Required. The input configuration for batch prediction. + * @param outputConfig Required. The Configuration specifying where output predictions should be + * written. + * @param params Additional domain-specific parameters for the predictions, any string must be up + * to 25000 characters long. + *

* For Video Classification : `score_threshold` - (float) A value from 0.0 to 1.0. + * When the model makes predictions for a video, it will only produce results that have at + * least this confidence score. The default is 0.5. `segment_classification` - (boolean) Set + * to true to request segment-level classification. AutoML Video Intelligence returns labels + * and their confidence scores for the entire segment of the video that user specified in the + * request configuration. The default is "true". `shot_classification` - (boolean) Set to true + * to request shot-level classification. AutoML Video Intelligence determines the boundaries + * for each camera shot in the entire segment of the video that user specified in the request + * configuration. AutoML Video Intelligence then returns labels and their confidence scores + * for each detected shot, along with the start and end time of the shot. WARNING: Model + * evaluation is not done for this classification type, the quality of it depends on training + * data, but there are no metrics provided to describe that quality. The default is "false". + * `1s_interval_classification` - (boolean) Set to true to request classification for a video + * at one-second intervals. AutoML Video Intelligence returns labels and their confidence + * scores for each second of the entire segment of the video that user specified in the + * request configuration. WARNING: Model evaluation is not done for this classification type, + * the quality of it depends on training data, but there are no metrics provided to describe + * that quality. The default is "false". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchPredictAsync( + ModelName name, + BatchPredictInputConfig inputConfig, + BatchPredictOutputConfig outputConfig, + Map params) { + + BatchPredictRequest request = + BatchPredictRequest.newBuilder() + .setName(name == null ? null : name.toString()) + .setInputConfig(inputConfig) + .setOutputConfig(outputConfig) + .putAllParams(params) + .build(); + return batchPredictAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Perform a batch prediction. Unlike the online + * [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch prediction result won't + * be immediately available in the response. Instead, a long running operation object is returned. + * User can poll the operation result via + * [GetOperation][google.longrunning.Operations.GetOperation] method. Once the operation is done, + * [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in the + * [response][google.longrunning.Operation.response] field. Available for following ML problems: + * * Video Classification * Text Extraction * Tables + * + *

Sample code: + * + *


+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build();
+   *   BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build();
+   *   Map<String, String> params = new HashMap<>();
+   *   BatchPredictResult response = predictionServiceClient.batchPredictAsync(name.toString(), inputConfig, outputConfig, params).get();
+   * }
+   * 
+ * + * @param name Name of the model requested to serve the batch prediction. + * @param inputConfig Required. The input configuration for batch prediction. + * @param outputConfig Required. The Configuration specifying where output predictions should be + * written. + * @param params Additional domain-specific parameters for the predictions, any string must be up + * to 25000 characters long. + *

* For Video Classification : `score_threshold` - (float) A value from 0.0 to 1.0. + * When the model makes predictions for a video, it will only produce results that have at + * least this confidence score. The default is 0.5. `segment_classification` - (boolean) Set + * to true to request segment-level classification. AutoML Video Intelligence returns labels + * and their confidence scores for the entire segment of the video that user specified in the + * request configuration. The default is "true". `shot_classification` - (boolean) Set to true + * to request shot-level classification. AutoML Video Intelligence determines the boundaries + * for each camera shot in the entire segment of the video that user specified in the request + * configuration. AutoML Video Intelligence then returns labels and their confidence scores + * for each detected shot, along with the start and end time of the shot. WARNING: Model + * evaluation is not done for this classification type, the quality of it depends on training + * data, but there are no metrics provided to describe that quality. The default is "false". + * `1s_interval_classification` - (boolean) Set to true to request classification for a video + * at one-second intervals. AutoML Video Intelligence returns labels and their confidence + * scores for each second of the entire segment of the video that user specified in the + * request configuration. WARNING: Model evaluation is not done for this classification type, + * the quality of it depends on training data, but there are no metrics provided to describe + * that quality. The default is "false". + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchPredictAsync( + String name, + BatchPredictInputConfig inputConfig, + BatchPredictOutputConfig outputConfig, + Map params) { + + BatchPredictRequest request = + BatchPredictRequest.newBuilder() + .setName(name) + .setInputConfig(inputConfig) + .setOutputConfig(outputConfig) + .putAllParams(params) + .build(); + return batchPredictAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Perform a batch prediction. Unlike the online + * [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch prediction result won't + * be immediately available in the response. Instead, a long running operation object is returned. + * User can poll the operation result via + * [GetOperation][google.longrunning.Operations.GetOperation] method. Once the operation is done, + * [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in the + * [response][google.longrunning.Operation.response] field. Available for following ML problems: + * * Video Classification * Text Extraction * Tables + * + *

Sample code: + * + *


+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build();
+   *   BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build();
+   *   BatchPredictRequest request = BatchPredictRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setInputConfig(inputConfig)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   BatchPredictResult response = predictionServiceClient.batchPredictAsync(request).get();
    * }
    * 
* * @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 Operation batchPredict(BatchPredictRequest request) { - return batchPredictCallable().call(request); + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + public final OperationFuture batchPredictAsync( + BatchPredictRequest request) { + return batchPredictOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD + /** + * Perform a batch prediction. Unlike the online + * [Predict][google.cloud.automl.v1beta1.PredictionService.Predict], batch prediction result won't + * be immediately available in the response. Instead, a long running operation object is returned. + * User can poll the operation result via + * [GetOperation][google.longrunning.Operations.GetOperation] method. Once the operation is done, + * [BatchPredictResult][google.cloud.automl.v1beta1.BatchPredictResult] is returned in the + * [response][google.longrunning.Operation.response] field. Available for following ML problems: + * * Video Classification * Text Extraction * Tables + * + *

Sample code: + * + *


+   * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build();
+   *   BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build();
+   *   BatchPredictRequest request = BatchPredictRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setInputConfig(inputConfig)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
+   *   OperationFuture<BatchPredictResult, OperationMetadata> future = predictionServiceClient.batchPredictOperationCallable().futureCall(request);
+   *   // Do something
+   *   BatchPredictResult response = future.get();
+   * }
+   * 
+ */ + @BetaApi("The surface for use by generated code is not stable yet and may change in the future.") + public final OperationCallable + batchPredictOperationCallable() { + return stub.batchPredictOperationCallable(); } // AUTO-GENERATED DOCUMENTATION AND METHOD @@ -357,7 +552,14 @@ public final Operation batchPredict(BatchPredictRequest request) { * *

    * try (PredictionServiceClient predictionServiceClient = PredictionServiceClient.create()) {
-   *   BatchPredictRequest request = BatchPredictRequest.newBuilder().build();
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+   *   BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build();
+   *   BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build();
+   *   BatchPredictRequest request = BatchPredictRequest.newBuilder()
+   *     .setName(name.toString())
+   *     .setInputConfig(inputConfig)
+   *     .setOutputConfig(outputConfig)
+   *     .build();
    *   ApiFuture<Operation> future = predictionServiceClient.batchPredictCallable().futureCall(request);
    *   // Do something
    *   Operation response = future.get();
diff --git a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceSettings.java b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceSettings.java
index e3bde404a75d..65c914958dc1 100644
--- a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceSettings.java
+++ b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/PredictionServiceSettings.java
@@ -23,6 +23,7 @@
 import com.google.api.gax.rpc.ApiClientHeaderProvider;
 import com.google.api.gax.rpc.ClientContext;
 import com.google.api.gax.rpc.ClientSettings;
+import com.google.api.gax.rpc.OperationCallSettings;
 import com.google.api.gax.rpc.TransportChannelProvider;
 import com.google.api.gax.rpc.UnaryCallSettings;
 import com.google.cloud.automl.v1beta1.stub.PredictionServiceStubSettings;
@@ -70,6 +71,14 @@ public UnaryCallSettings batchPredictSettings()
     return ((PredictionServiceStubSettings) getStubSettings()).batchPredictSettings();
   }
 
+  /** Returns the object with the settings used for calls to batchPredict. */
+  @BetaApi(
+      "The surface for long-running operations is not stable yet and may change in the future.")
+  public OperationCallSettings
+      batchPredictOperationSettings() {
+    return ((PredictionServiceStubSettings) getStubSettings()).batchPredictOperationSettings();
+  }
+
   public static final PredictionServiceSettings create(PredictionServiceStubSettings stub)
       throws IOException {
     return new PredictionServiceSettings.Builder(stub.toBuilder()).build();
@@ -177,6 +186,14 @@ public UnaryCallSettings.Builder batchPredictSet
       return getStubSettingsBuilder().batchPredictSettings();
     }
 
+    /** Returns the builder for the settings used for calls to batchPredict. */
+    @BetaApi(
+        "The surface for long-running operations is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        batchPredictOperationSettings() {
+      return getStubSettingsBuilder().batchPredictOperationSettings();
+    }
+
     @Override
     public PredictionServiceSettings build() throws IOException {
       return new PredictionServiceSettings(this);
diff --git a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStub.java b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStub.java
index a6dd8643791b..d8afd7fc05a9 100644
--- a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStub.java
+++ b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStub.java
@@ -85,6 +85,10 @@ public UnaryCallable createDatasetCallable() {
     throw new UnsupportedOperationException("Not implemented: createDatasetCallable()");
   }
 
+  public UnaryCallable updateDatasetCallable() {
+    throw new UnsupportedOperationException("Not implemented: updateDatasetCallable()");
+  }
+
   public UnaryCallable getDatasetCallable() {
     throw new UnsupportedOperationException("Not implemented: getDatasetCallable()");
   }
@@ -159,10 +163,22 @@ public UnaryCallable deleteModelCallable() {
     throw new UnsupportedOperationException("Not implemented: deleteModelCallable()");
   }
 
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      deployModelOperationCallable() {
+    throw new UnsupportedOperationException("Not implemented: deployModelOperationCallable()");
+  }
+
   public UnaryCallable deployModelCallable() {
     throw new UnsupportedOperationException("Not implemented: deployModelCallable()");
   }
 
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      undeployModelOperationCallable() {
+    throw new UnsupportedOperationException("Not implemented: undeployModelOperationCallable()");
+  }
+
   public UnaryCallable undeployModelCallable() {
     throw new UnsupportedOperationException("Not implemented: undeployModelCallable()");
   }
@@ -171,6 +187,28 @@ public UnaryCallable getModelEvaluat
     throw new UnsupportedOperationException("Not implemented: getModelEvaluationCallable()");
   }
 
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      exportModelOperationCallable() {
+    throw new UnsupportedOperationException("Not implemented: exportModelOperationCallable()");
+  }
+
+  public UnaryCallable exportModelCallable() {
+    throw new UnsupportedOperationException("Not implemented: exportModelCallable()");
+  }
+
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      exportEvaluatedExamplesOperationCallable() {
+    throw new UnsupportedOperationException(
+        "Not implemented: exportEvaluatedExamplesOperationCallable()");
+  }
+
+  public UnaryCallable
+      exportEvaluatedExamplesCallable() {
+    throw new UnsupportedOperationException("Not implemented: exportEvaluatedExamplesCallable()");
+  }
+
   public UnaryCallable
       listModelEvaluationsPagedCallable() {
     throw new UnsupportedOperationException("Not implemented: listModelEvaluationsPagedCallable()");
@@ -181,10 +219,6 @@ public UnaryCallable getModelEvaluat
     throw new UnsupportedOperationException("Not implemented: listModelEvaluationsCallable()");
   }
 
-  public UnaryCallable updateDatasetCallable() {
-    throw new UnsupportedOperationException("Not implemented: updateDatasetCallable()");
-  }
-
   public UnaryCallable getAnnotationSpecCallable() {
     throw new UnsupportedOperationException("Not implemented: getAnnotationSpecCallable()");
   }
@@ -223,15 +257,6 @@ public UnaryCallable updateColumnSpecCallab
     throw new UnsupportedOperationException("Not implemented: updateColumnSpecCallable()");
   }
 
-  public UnaryCallable exportModelCallable() {
-    throw new UnsupportedOperationException("Not implemented: exportModelCallable()");
-  }
-
-  public UnaryCallable
-      exportEvaluatedExamplesCallable() {
-    throw new UnsupportedOperationException("Not implemented: exportEvaluatedExamplesCallable()");
-  }
-
   @Override
   public abstract void close();
 }
diff --git a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStubSettings.java b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStubSettings.java
index 7cfe36f4a07a..508846c17d9f 100644
--- a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStubSettings.java
+++ b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/AutoMlStubSettings.java
@@ -128,6 +128,7 @@ public class AutoMlStubSettings extends StubSettings {
       ImmutableList.builder().add("https://www.googleapis.com/auth/cloud-platform").build();
 
   private final UnaryCallSettings createDatasetSettings;
+  private final UnaryCallSettings updateDatasetSettings;
   private final UnaryCallSettings getDatasetSettings;
   private final PagedCallSettings<
           ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse>
@@ -151,15 +152,25 @@ public class AutoMlStubSettings extends StubSettings {
   private final OperationCallSettings
       deleteModelOperationSettings;
   private final UnaryCallSettings deployModelSettings;
+  private final OperationCallSettings
+      deployModelOperationSettings;
   private final UnaryCallSettings undeployModelSettings;
+  private final OperationCallSettings
+      undeployModelOperationSettings;
   private final UnaryCallSettings
       getModelEvaluationSettings;
+  private final UnaryCallSettings exportModelSettings;
+  private final OperationCallSettings
+      exportModelOperationSettings;
+  private final UnaryCallSettings
+      exportEvaluatedExamplesSettings;
+  private final OperationCallSettings
+      exportEvaluatedExamplesOperationSettings;
   private final PagedCallSettings<
           ListModelEvaluationsRequest,
           ListModelEvaluationsResponse,
           ListModelEvaluationsPagedResponse>
       listModelEvaluationsSettings;
-  private final UnaryCallSettings updateDatasetSettings;
   private final UnaryCallSettings
       getAnnotationSpecSettings;
   private final UnaryCallSettings getTableSpecSettings;
@@ -172,15 +183,17 @@ public class AutoMlStubSettings extends StubSettings {
           ListColumnSpecsRequest, ListColumnSpecsResponse, ListColumnSpecsPagedResponse>
       listColumnSpecsSettings;
   private final UnaryCallSettings updateColumnSpecSettings;
-  private final UnaryCallSettings exportModelSettings;
-  private final UnaryCallSettings
-      exportEvaluatedExamplesSettings;
 
   /** Returns the object with the settings used for calls to createDataset. */
   public UnaryCallSettings createDatasetSettings() {
     return createDatasetSettings;
   }
 
+  /** Returns the object with the settings used for calls to updateDataset. */
+  public UnaryCallSettings updateDatasetSettings() {
+    return updateDatasetSettings;
+  }
+
   /** Returns the object with the settings used for calls to getDataset. */
   public UnaryCallSettings getDatasetSettings() {
     return getDatasetSettings;
@@ -268,17 +281,56 @@ public UnaryCallSettings deployModelSettings() {
     return deployModelSettings;
   }
 
+  /** Returns the object with the settings used for calls to deployModel. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings
+      deployModelOperationSettings() {
+    return deployModelOperationSettings;
+  }
+
   /** Returns the object with the settings used for calls to undeployModel. */
   public UnaryCallSettings undeployModelSettings() {
     return undeployModelSettings;
   }
 
+  /** Returns the object with the settings used for calls to undeployModel. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings
+      undeployModelOperationSettings() {
+    return undeployModelOperationSettings;
+  }
+
   /** Returns the object with the settings used for calls to getModelEvaluation. */
   public UnaryCallSettings
       getModelEvaluationSettings() {
     return getModelEvaluationSettings;
   }
 
+  /** Returns the object with the settings used for calls to exportModel. */
+  public UnaryCallSettings exportModelSettings() {
+    return exportModelSettings;
+  }
+
+  /** Returns the object with the settings used for calls to exportModel. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings
+      exportModelOperationSettings() {
+    return exportModelOperationSettings;
+  }
+
+  /** Returns the object with the settings used for calls to exportEvaluatedExamples. */
+  public UnaryCallSettings
+      exportEvaluatedExamplesSettings() {
+    return exportEvaluatedExamplesSettings;
+  }
+
+  /** Returns the object with the settings used for calls to exportEvaluatedExamples. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings
+      exportEvaluatedExamplesOperationSettings() {
+    return exportEvaluatedExamplesOperationSettings;
+  }
+
   /** Returns the object with the settings used for calls to listModelEvaluations. */
   public PagedCallSettings<
           ListModelEvaluationsRequest,
@@ -288,11 +340,6 @@ public UnaryCallSettings undeployModelSettings(
     return listModelEvaluationsSettings;
   }
 
-  /** Returns the object with the settings used for calls to updateDataset. */
-  public UnaryCallSettings updateDatasetSettings() {
-    return updateDatasetSettings;
-  }
-
   /** Returns the object with the settings used for calls to getAnnotationSpec. */
   public UnaryCallSettings getAnnotationSpecSettings() {
     return getAnnotationSpecSettings;
@@ -332,17 +379,6 @@ public UnaryCallSettings updateColumnSpecSe
     return updateColumnSpecSettings;
   }
 
-  /** Returns the object with the settings used for calls to exportModel. */
-  public UnaryCallSettings exportModelSettings() {
-    return exportModelSettings;
-  }
-
-  /** Returns the object with the settings used for calls to exportEvaluatedExamples. */
-  public UnaryCallSettings
-      exportEvaluatedExamplesSettings() {
-    return exportEvaluatedExamplesSettings;
-  }
-
   @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
   public AutoMlStub createStub() throws IOException {
     if (getTransportChannelProvider()
@@ -411,6 +447,7 @@ protected AutoMlStubSettings(Builder settingsBuilder) throws IOException {
     super(settingsBuilder);
 
     createDatasetSettings = settingsBuilder.createDatasetSettings().build();
+    updateDatasetSettings = settingsBuilder.updateDatasetSettings().build();
     getDatasetSettings = settingsBuilder.getDatasetSettings().build();
     listDatasetsSettings = settingsBuilder.listDatasetsSettings().build();
     deleteDatasetSettings = settingsBuilder.deleteDatasetSettings().build();
@@ -426,10 +463,16 @@ protected AutoMlStubSettings(Builder settingsBuilder) throws IOException {
     deleteModelSettings = settingsBuilder.deleteModelSettings().build();
     deleteModelOperationSettings = settingsBuilder.deleteModelOperationSettings().build();
     deployModelSettings = settingsBuilder.deployModelSettings().build();
+    deployModelOperationSettings = settingsBuilder.deployModelOperationSettings().build();
     undeployModelSettings = settingsBuilder.undeployModelSettings().build();
+    undeployModelOperationSettings = settingsBuilder.undeployModelOperationSettings().build();
     getModelEvaluationSettings = settingsBuilder.getModelEvaluationSettings().build();
+    exportModelSettings = settingsBuilder.exportModelSettings().build();
+    exportModelOperationSettings = settingsBuilder.exportModelOperationSettings().build();
+    exportEvaluatedExamplesSettings = settingsBuilder.exportEvaluatedExamplesSettings().build();
+    exportEvaluatedExamplesOperationSettings =
+        settingsBuilder.exportEvaluatedExamplesOperationSettings().build();
     listModelEvaluationsSettings = settingsBuilder.listModelEvaluationsSettings().build();
-    updateDatasetSettings = settingsBuilder.updateDatasetSettings().build();
     getAnnotationSpecSettings = settingsBuilder.getAnnotationSpecSettings().build();
     getTableSpecSettings = settingsBuilder.getTableSpecSettings().build();
     listTableSpecsSettings = settingsBuilder.listTableSpecsSettings().build();
@@ -437,8 +480,6 @@ protected AutoMlStubSettings(Builder settingsBuilder) throws IOException {
     getColumnSpecSettings = settingsBuilder.getColumnSpecSettings().build();
     listColumnSpecsSettings = settingsBuilder.listColumnSpecsSettings().build();
     updateColumnSpecSettings = settingsBuilder.updateColumnSpecSettings().build();
-    exportModelSettings = settingsBuilder.exportModelSettings().build();
-    exportEvaluatedExamplesSettings = settingsBuilder.exportEvaluatedExamplesSettings().build();
   }
 
   private static final PagedListDescriptor
@@ -727,6 +768,7 @@ public static class Builder extends StubSettings.Builder> unaryMethodSettingsBuilders;
 
     private final UnaryCallSettings.Builder createDatasetSettings;
+    private final UnaryCallSettings.Builder updateDatasetSettings;
     private final UnaryCallSettings.Builder getDatasetSettings;
     private final PagedCallSettings.Builder<
             ListDatasetsRequest, ListDatasetsResponse, ListDatasetsPagedResponse>
@@ -751,15 +793,26 @@ public static class Builder extends StubSettings.Builder
         deleteModelOperationSettings;
     private final UnaryCallSettings.Builder deployModelSettings;
+    private final OperationCallSettings.Builder
+        deployModelOperationSettings;
     private final UnaryCallSettings.Builder undeployModelSettings;
+    private final OperationCallSettings.Builder
+        undeployModelOperationSettings;
     private final UnaryCallSettings.Builder
         getModelEvaluationSettings;
+    private final UnaryCallSettings.Builder exportModelSettings;
+    private final OperationCallSettings.Builder
+        exportModelOperationSettings;
+    private final UnaryCallSettings.Builder
+        exportEvaluatedExamplesSettings;
+    private final OperationCallSettings.Builder<
+            ExportEvaluatedExamplesRequest, Empty, OperationMetadata>
+        exportEvaluatedExamplesOperationSettings;
     private final PagedCallSettings.Builder<
             ListModelEvaluationsRequest,
             ListModelEvaluationsResponse,
             ListModelEvaluationsPagedResponse>
         listModelEvaluationsSettings;
-    private final UnaryCallSettings.Builder updateDatasetSettings;
     private final UnaryCallSettings.Builder
         getAnnotationSpecSettings;
     private final UnaryCallSettings.Builder getTableSpecSettings;
@@ -774,9 +827,6 @@ public static class Builder extends StubSettings.Builder
         updateColumnSpecSettings;
-    private final UnaryCallSettings.Builder exportModelSettings;
-    private final UnaryCallSettings.Builder
-        exportEvaluatedExamplesSettings;
 
     private static final ImmutableMap>
         RETRYABLE_CODE_DEFINITIONS;
@@ -821,6 +871,8 @@ protected Builder(ClientContext clientContext) {
 
       createDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
+      updateDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
       getDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       listDatasetsSettings = PagedCallSettings.newBuilder(LIST_DATASETS_PAGE_STR_FACT);
@@ -851,15 +903,25 @@ protected Builder(ClientContext clientContext) {
 
       deployModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
+      deployModelOperationSettings = OperationCallSettings.newBuilder();
+
       undeployModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
+      undeployModelOperationSettings = OperationCallSettings.newBuilder();
+
       getModelEvaluationSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
+      exportModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      exportModelOperationSettings = OperationCallSettings.newBuilder();
+
+      exportEvaluatedExamplesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+
+      exportEvaluatedExamplesOperationSettings = OperationCallSettings.newBuilder();
+
       listModelEvaluationsSettings =
           PagedCallSettings.newBuilder(LIST_MODEL_EVALUATIONS_PAGE_STR_FACT);
 
-      updateDatasetSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
       getAnnotationSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       getTableSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
@@ -874,13 +936,10 @@ protected Builder(ClientContext clientContext) {
 
       updateColumnSpecSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
-      exportModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
-      exportEvaluatedExamplesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
-
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
               createDatasetSettings,
+              updateDatasetSettings,
               getDatasetSettings,
               listDatasetsSettings,
               deleteDatasetSettings,
@@ -893,17 +952,16 @@ protected Builder(ClientContext clientContext) {
               deployModelSettings,
               undeployModelSettings,
               getModelEvaluationSettings,
+              exportModelSettings,
+              exportEvaluatedExamplesSettings,
               listModelEvaluationsSettings,
-              updateDatasetSettings,
               getAnnotationSpecSettings,
               getTableSpecSettings,
               listTableSpecsSettings,
               updateTableSpecSettings,
               getColumnSpecSettings,
               listColumnSpecsSettings,
-              updateColumnSpecSettings,
-              exportModelSettings,
-              exportEvaluatedExamplesSettings);
+              updateColumnSpecSettings);
 
       initDefaults(this);
     }
@@ -924,6 +982,11 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
+      builder
+          .updateDatasetSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
       builder
           .getDatasetSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
@@ -985,12 +1048,17 @@ private static Builder initDefaults(Builder builder) {
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .listModelEvaluationsSettings()
+          .exportModelSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
       builder
-          .updateDatasetSettings()
+          .exportEvaluatedExamplesSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+
+      builder
+          .listModelEvaluationsSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
 
@@ -1028,16 +1096,6 @@ private static Builder initDefaults(Builder builder) {
           .updateColumnSpecSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
-      builder
-          .exportModelSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
-
-      builder
-          .exportEvaluatedExamplesSettings()
-          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
-          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
       builder
           .deleteDatasetOperationSettings()
           .setInitialCallSettings(
@@ -1149,6 +1207,96 @@ private static Builder initDefaults(Builder builder) {
                       .setMaxRpcTimeout(Duration.ZERO) // ignored
                       .setTotalTimeout(Duration.ofMillis(300000L))
                       .build()));
+      builder
+          .deployModelOperationSettings()
+          .setInitialCallSettings(
+              UnaryCallSettings.newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
+                  .build())
+          .setResponseTransformer(
+              ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
+          .setMetadataTransformer(
+              ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+          .setPollingAlgorithm(
+              OperationTimedPollAlgorithm.create(
+                  RetrySettings.newBuilder()
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
+                      .setInitialRpcTimeout(Duration.ZERO) // ignored
+                      .setRpcTimeoutMultiplier(1.0) // ignored
+                      .setMaxRpcTimeout(Duration.ZERO) // ignored
+                      .setTotalTimeout(Duration.ofMillis(300000L))
+                      .build()));
+      builder
+          .undeployModelOperationSettings()
+          .setInitialCallSettings(
+              UnaryCallSettings
+                  .newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
+                  .build())
+          .setResponseTransformer(
+              ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
+          .setMetadataTransformer(
+              ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+          .setPollingAlgorithm(
+              OperationTimedPollAlgorithm.create(
+                  RetrySettings.newBuilder()
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
+                      .setInitialRpcTimeout(Duration.ZERO) // ignored
+                      .setRpcTimeoutMultiplier(1.0) // ignored
+                      .setMaxRpcTimeout(Duration.ZERO) // ignored
+                      .setTotalTimeout(Duration.ofMillis(300000L))
+                      .build()));
+      builder
+          .exportModelOperationSettings()
+          .setInitialCallSettings(
+              UnaryCallSettings.newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
+                  .build())
+          .setResponseTransformer(
+              ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
+          .setMetadataTransformer(
+              ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+          .setPollingAlgorithm(
+              OperationTimedPollAlgorithm.create(
+                  RetrySettings.newBuilder()
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
+                      .setInitialRpcTimeout(Duration.ZERO) // ignored
+                      .setRpcTimeoutMultiplier(1.0) // ignored
+                      .setMaxRpcTimeout(Duration.ZERO) // ignored
+                      .setTotalTimeout(Duration.ofMillis(300000L))
+                      .build()));
+      builder
+          .exportEvaluatedExamplesOperationSettings()
+          .setInitialCallSettings(
+              UnaryCallSettings
+                  .newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
+                  .build())
+          .setResponseTransformer(
+              ProtoOperationTransformers.ResponseTransformer.create(Empty.class))
+          .setMetadataTransformer(
+              ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+          .setPollingAlgorithm(
+              OperationTimedPollAlgorithm.create(
+                  RetrySettings.newBuilder()
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
+                      .setInitialRpcTimeout(Duration.ZERO) // ignored
+                      .setRpcTimeoutMultiplier(1.0) // ignored
+                      .setMaxRpcTimeout(Duration.ZERO) // ignored
+                      .setTotalTimeout(Duration.ofMillis(300000L))
+                      .build()));
 
       return builder;
     }
@@ -1157,6 +1305,7 @@ protected Builder(AutoMlStubSettings settings) {
       super(settings);
 
       createDatasetSettings = settings.createDatasetSettings.toBuilder();
+      updateDatasetSettings = settings.updateDatasetSettings.toBuilder();
       getDatasetSettings = settings.getDatasetSettings.toBuilder();
       listDatasetsSettings = settings.listDatasetsSettings.toBuilder();
       deleteDatasetSettings = settings.deleteDatasetSettings.toBuilder();
@@ -1172,10 +1321,16 @@ protected Builder(AutoMlStubSettings settings) {
       deleteModelSettings = settings.deleteModelSettings.toBuilder();
       deleteModelOperationSettings = settings.deleteModelOperationSettings.toBuilder();
       deployModelSettings = settings.deployModelSettings.toBuilder();
+      deployModelOperationSettings = settings.deployModelOperationSettings.toBuilder();
       undeployModelSettings = settings.undeployModelSettings.toBuilder();
+      undeployModelOperationSettings = settings.undeployModelOperationSettings.toBuilder();
       getModelEvaluationSettings = settings.getModelEvaluationSettings.toBuilder();
+      exportModelSettings = settings.exportModelSettings.toBuilder();
+      exportModelOperationSettings = settings.exportModelOperationSettings.toBuilder();
+      exportEvaluatedExamplesSettings = settings.exportEvaluatedExamplesSettings.toBuilder();
+      exportEvaluatedExamplesOperationSettings =
+          settings.exportEvaluatedExamplesOperationSettings.toBuilder();
       listModelEvaluationsSettings = settings.listModelEvaluationsSettings.toBuilder();
-      updateDatasetSettings = settings.updateDatasetSettings.toBuilder();
       getAnnotationSpecSettings = settings.getAnnotationSpecSettings.toBuilder();
       getTableSpecSettings = settings.getTableSpecSettings.toBuilder();
       listTableSpecsSettings = settings.listTableSpecsSettings.toBuilder();
@@ -1183,12 +1338,11 @@ protected Builder(AutoMlStubSettings settings) {
       getColumnSpecSettings = settings.getColumnSpecSettings.toBuilder();
       listColumnSpecsSettings = settings.listColumnSpecsSettings.toBuilder();
       updateColumnSpecSettings = settings.updateColumnSpecSettings.toBuilder();
-      exportModelSettings = settings.exportModelSettings.toBuilder();
-      exportEvaluatedExamplesSettings = settings.exportEvaluatedExamplesSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(
               createDatasetSettings,
+              updateDatasetSettings,
               getDatasetSettings,
               listDatasetsSettings,
               deleteDatasetSettings,
@@ -1201,17 +1355,16 @@ protected Builder(AutoMlStubSettings settings) {
               deployModelSettings,
               undeployModelSettings,
               getModelEvaluationSettings,
+              exportModelSettings,
+              exportEvaluatedExamplesSettings,
               listModelEvaluationsSettings,
-              updateDatasetSettings,
               getAnnotationSpecSettings,
               getTableSpecSettings,
               listTableSpecsSettings,
               updateTableSpecSettings,
               getColumnSpecSettings,
               listColumnSpecsSettings,
-              updateColumnSpecSettings,
-              exportModelSettings,
-              exportEvaluatedExamplesSettings);
+              updateColumnSpecSettings);
     }
 
     // NEXT_MAJOR_VER: remove 'throws Exception'
@@ -1235,6 +1388,11 @@ public UnaryCallSettings.Builder createDatasetSet
       return createDatasetSettings;
     }
 
+    /** Returns the builder for the settings used for calls to updateDataset. */
+    public UnaryCallSettings.Builder updateDatasetSettings() {
+      return updateDatasetSettings;
+    }
+
     /** Returns the builder for the settings used for calls to getDataset. */
     public UnaryCallSettings.Builder getDatasetSettings() {
       return getDatasetSettings;
@@ -1328,17 +1486,60 @@ public UnaryCallSettings.Builder deployModelSetti
       return deployModelSettings;
     }
 
+    /** Returns the builder for the settings used for calls to deployModel. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        deployModelOperationSettings() {
+      return deployModelOperationSettings;
+    }
+
     /** Returns the builder for the settings used for calls to undeployModel. */
     public UnaryCallSettings.Builder undeployModelSettings() {
       return undeployModelSettings;
     }
 
+    /** Returns the builder for the settings used for calls to undeployModel. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        undeployModelOperationSettings() {
+      return undeployModelOperationSettings;
+    }
+
     /** Returns the builder for the settings used for calls to getModelEvaluation. */
     public UnaryCallSettings.Builder
         getModelEvaluationSettings() {
       return getModelEvaluationSettings;
     }
 
+    /** Returns the builder for the settings used for calls to exportModel. */
+    public UnaryCallSettings.Builder exportModelSettings() {
+      return exportModelSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to exportModel. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        exportModelOperationSettings() {
+      return exportModelOperationSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to exportEvaluatedExamples. */
+    public UnaryCallSettings.Builder
+        exportEvaluatedExamplesSettings() {
+      return exportEvaluatedExamplesSettings;
+    }
+
+    /** Returns the builder for the settings used for calls to exportEvaluatedExamples. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        exportEvaluatedExamplesOperationSettings() {
+      return exportEvaluatedExamplesOperationSettings;
+    }
+
     /** Returns the builder for the settings used for calls to listModelEvaluations. */
     public PagedCallSettings.Builder<
             ListModelEvaluationsRequest,
@@ -1348,11 +1549,6 @@ public UnaryCallSettings.Builder undeployModelS
       return listModelEvaluationsSettings;
     }
 
-    /** Returns the builder for the settings used for calls to updateDataset. */
-    public UnaryCallSettings.Builder updateDatasetSettings() {
-      return updateDatasetSettings;
-    }
-
     /** Returns the builder for the settings used for calls to getAnnotationSpec. */
     public UnaryCallSettings.Builder
         getAnnotationSpecSettings() {
@@ -1394,17 +1590,6 @@ public UnaryCallSettings.Builder getColumnSpec
       return updateColumnSpecSettings;
     }
 
-    /** Returns the builder for the settings used for calls to exportModel. */
-    public UnaryCallSettings.Builder exportModelSettings() {
-      return exportModelSettings;
-    }
-
-    /** Returns the builder for the settings used for calls to exportEvaluatedExamples. */
-    public UnaryCallSettings.Builder
-        exportEvaluatedExamplesSettings() {
-      return exportEvaluatedExamplesSettings;
-    }
-
     @Override
     public AutoMlStubSettings build() throws IOException {
       return new AutoMlStubSettings(this);
diff --git a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcAutoMlStub.java b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcAutoMlStub.java
index c44ca43261c9..46b3d23a63cf 100644
--- a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcAutoMlStub.java
+++ b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcAutoMlStub.java
@@ -96,6 +96,15 @@ public class GrpcAutoMlStub extends AutoMlStub {
                   ProtoUtils.marshaller(CreateDatasetRequest.getDefaultInstance()))
               .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance()))
               .build();
+  private static final MethodDescriptor
+      updateDatasetMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/UpdateDataset")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(UpdateDatasetRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance()))
+              .build();
   private static final MethodDescriptor getDatasetMethodDescriptor =
       MethodDescriptor.newBuilder()
           .setType(MethodDescriptor.MethodType.UNARY)
@@ -189,6 +198,22 @@ public class GrpcAutoMlStub extends AutoMlStub {
                   ProtoUtils.marshaller(GetModelEvaluationRequest.getDefaultInstance()))
               .setResponseMarshaller(ProtoUtils.marshaller(ModelEvaluation.getDefaultInstance()))
               .build();
+  private static final MethodDescriptor exportModelMethodDescriptor =
+      MethodDescriptor.newBuilder()
+          .setType(MethodDescriptor.MethodType.UNARY)
+          .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/ExportModel")
+          .setRequestMarshaller(ProtoUtils.marshaller(ExportModelRequest.getDefaultInstance()))
+          .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+          .build();
+  private static final MethodDescriptor
+      exportEvaluatedExamplesMethodDescriptor =
+          MethodDescriptor.newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/ExportEvaluatedExamples")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(ExportEvaluatedExamplesRequest.getDefaultInstance()))
+              .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
+              .build();
   private static final MethodDescriptor
       listModelEvaluationsMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -199,15 +224,6 @@ public class GrpcAutoMlStub extends AutoMlStub {
               .setResponseMarshaller(
                   ProtoUtils.marshaller(ListModelEvaluationsResponse.getDefaultInstance()))
               .build();
-  private static final MethodDescriptor
-      updateDatasetMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/UpdateDataset")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(UpdateDatasetRequest.getDefaultInstance()))
-              .setResponseMarshaller(ProtoUtils.marshaller(Dataset.getDefaultInstance()))
-              .build();
   private static final MethodDescriptor
       getAnnotationSpecMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -272,27 +288,12 @@ public class GrpcAutoMlStub extends AutoMlStub {
                   ProtoUtils.marshaller(UpdateColumnSpecRequest.getDefaultInstance()))
               .setResponseMarshaller(ProtoUtils.marshaller(ColumnSpec.getDefaultInstance()))
               .build();
-  private static final MethodDescriptor exportModelMethodDescriptor =
-      MethodDescriptor.newBuilder()
-          .setType(MethodDescriptor.MethodType.UNARY)
-          .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/ExportModel")
-          .setRequestMarshaller(ProtoUtils.marshaller(ExportModelRequest.getDefaultInstance()))
-          .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
-          .build();
-  private static final MethodDescriptor
-      exportEvaluatedExamplesMethodDescriptor =
-          MethodDescriptor.newBuilder()
-              .setType(MethodDescriptor.MethodType.UNARY)
-              .setFullMethodName("google.cloud.automl.v1beta1.AutoMl/ExportEvaluatedExamples")
-              .setRequestMarshaller(
-                  ProtoUtils.marshaller(ExportEvaluatedExamplesRequest.getDefaultInstance()))
-              .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance()))
-              .build();
 
   private final BackgroundResource backgroundResources;
   private final GrpcOperationsStub operationsStub;
 
   private final UnaryCallable createDatasetCallable;
+  private final UnaryCallable updateDatasetCallable;
   private final UnaryCallable getDatasetCallable;
   private final UnaryCallable listDatasetsCallable;
   private final UnaryCallable
@@ -316,14 +317,24 @@ public class GrpcAutoMlStub extends AutoMlStub {
   private final OperationCallable
       deleteModelOperationCallable;
   private final UnaryCallable deployModelCallable;
+  private final OperationCallable
+      deployModelOperationCallable;
   private final UnaryCallable undeployModelCallable;
+  private final OperationCallable
+      undeployModelOperationCallable;
   private final UnaryCallable
       getModelEvaluationCallable;
+  private final UnaryCallable exportModelCallable;
+  private final OperationCallable
+      exportModelOperationCallable;
+  private final UnaryCallable
+      exportEvaluatedExamplesCallable;
+  private final OperationCallable
+      exportEvaluatedExamplesOperationCallable;
   private final UnaryCallable
       listModelEvaluationsCallable;
   private final UnaryCallable
       listModelEvaluationsPagedCallable;
-  private final UnaryCallable updateDatasetCallable;
   private final UnaryCallable getAnnotationSpecCallable;
   private final UnaryCallable getTableSpecCallable;
   private final UnaryCallable listTableSpecsCallable;
@@ -336,9 +347,6 @@ public class GrpcAutoMlStub extends AutoMlStub {
   private final UnaryCallable
       listColumnSpecsPagedCallable;
   private final UnaryCallable updateColumnSpecCallable;
-  private final UnaryCallable exportModelCallable;
-  private final UnaryCallable
-      exportEvaluatedExamplesCallable;
 
   private final GrpcStubCallableFactory callableFactory;
 
@@ -390,6 +398,19 @@ public Map extract(CreateDatasetRequest request) {
                   }
                 })
             .build();
+    GrpcCallSettings updateDatasetTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(updateDatasetMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(UpdateDatasetRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("dataset.name", String.valueOf(request.getDataset().getName()));
+                    return params.build();
+                  }
+                })
+            .build();
     GrpcCallSettings getDatasetTransportSettings =
         GrpcCallSettings.newBuilder()
             .setMethodDescriptor(getDatasetMethodDescriptor)
@@ -547,6 +568,33 @@ public Map extract(GetModelEvaluationRequest request) {
                       }
                     })
                 .build();
+    GrpcCallSettings exportModelTransportSettings =
+        GrpcCallSettings.newBuilder()
+            .setMethodDescriptor(exportModelMethodDescriptor)
+            .setParamsExtractor(
+                new RequestParamsExtractor() {
+                  @Override
+                  public Map extract(ExportModelRequest request) {
+                    ImmutableMap.Builder params = ImmutableMap.builder();
+                    params.put("name", String.valueOf(request.getName()));
+                    return params.build();
+                  }
+                })
+            .build();
+    GrpcCallSettings
+        exportEvaluatedExamplesTransportSettings =
+            GrpcCallSettings.newBuilder()
+                .setMethodDescriptor(exportEvaluatedExamplesMethodDescriptor)
+                .setParamsExtractor(
+                    new RequestParamsExtractor() {
+                      @Override
+                      public Map extract(ExportEvaluatedExamplesRequest request) {
+                        ImmutableMap.Builder params = ImmutableMap.builder();
+                        params.put("name", String.valueOf(request.getName()));
+                        return params.build();
+                      }
+                    })
+                .build();
     GrpcCallSettings
         listModelEvaluationsTransportSettings =
             GrpcCallSettings.newBuilder()
@@ -561,19 +609,6 @@ public Map extract(ListModelEvaluationsRequest request) {
                       }
                     })
                 .build();
-    GrpcCallSettings updateDatasetTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(updateDatasetMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(UpdateDatasetRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("dataset.name", String.valueOf(request.getDataset().getName()));
-                    return params.build();
-                  }
-                })
-            .build();
     GrpcCallSettings getAnnotationSpecTransportSettings =
         GrpcCallSettings.newBuilder()
             .setMethodDescriptor(getAnnotationSpecMethodDescriptor)
@@ -668,37 +703,13 @@ public Map extract(UpdateColumnSpecRequest request) {
                   }
                 })
             .build();
-    GrpcCallSettings exportModelTransportSettings =
-        GrpcCallSettings.newBuilder()
-            .setMethodDescriptor(exportModelMethodDescriptor)
-            .setParamsExtractor(
-                new RequestParamsExtractor() {
-                  @Override
-                  public Map extract(ExportModelRequest request) {
-                    ImmutableMap.Builder params = ImmutableMap.builder();
-                    params.put("name", String.valueOf(request.getName()));
-                    return params.build();
-                  }
-                })
-            .build();
-    GrpcCallSettings
-        exportEvaluatedExamplesTransportSettings =
-            GrpcCallSettings.newBuilder()
-                .setMethodDescriptor(exportEvaluatedExamplesMethodDescriptor)
-                .setParamsExtractor(
-                    new RequestParamsExtractor() {
-                      @Override
-                      public Map extract(ExportEvaluatedExamplesRequest request) {
-                        ImmutableMap.Builder params = ImmutableMap.builder();
-                        params.put("name", String.valueOf(request.getName()));
-                        return params.build();
-                      }
-                    })
-                .build();
 
     this.createDatasetCallable =
         callableFactory.createUnaryCallable(
             createDatasetTransportSettings, settings.createDatasetSettings(), clientContext);
+    this.updateDatasetCallable =
+        callableFactory.createUnaryCallable(
+            updateDatasetTransportSettings, settings.updateDatasetSettings(), clientContext);
     this.getDatasetCallable =
         callableFactory.createUnaryCallable(
             getDatasetTransportSettings, settings.getDatasetSettings(), clientContext);
@@ -765,14 +776,46 @@ public Map extract(ExportEvaluatedExamplesRequest request) {
     this.deployModelCallable =
         callableFactory.createUnaryCallable(
             deployModelTransportSettings, settings.deployModelSettings(), clientContext);
+    this.deployModelOperationCallable =
+        callableFactory.createOperationCallable(
+            deployModelTransportSettings,
+            settings.deployModelOperationSettings(),
+            clientContext,
+            this.operationsStub);
     this.undeployModelCallable =
         callableFactory.createUnaryCallable(
             undeployModelTransportSettings, settings.undeployModelSettings(), clientContext);
+    this.undeployModelOperationCallable =
+        callableFactory.createOperationCallable(
+            undeployModelTransportSettings,
+            settings.undeployModelOperationSettings(),
+            clientContext,
+            this.operationsStub);
     this.getModelEvaluationCallable =
         callableFactory.createUnaryCallable(
             getModelEvaluationTransportSettings,
             settings.getModelEvaluationSettings(),
             clientContext);
+    this.exportModelCallable =
+        callableFactory.createUnaryCallable(
+            exportModelTransportSettings, settings.exportModelSettings(), clientContext);
+    this.exportModelOperationCallable =
+        callableFactory.createOperationCallable(
+            exportModelTransportSettings,
+            settings.exportModelOperationSettings(),
+            clientContext,
+            this.operationsStub);
+    this.exportEvaluatedExamplesCallable =
+        callableFactory.createUnaryCallable(
+            exportEvaluatedExamplesTransportSettings,
+            settings.exportEvaluatedExamplesSettings(),
+            clientContext);
+    this.exportEvaluatedExamplesOperationCallable =
+        callableFactory.createOperationCallable(
+            exportEvaluatedExamplesTransportSettings,
+            settings.exportEvaluatedExamplesOperationSettings(),
+            clientContext,
+            this.operationsStub);
     this.listModelEvaluationsCallable =
         callableFactory.createUnaryCallable(
             listModelEvaluationsTransportSettings,
@@ -783,9 +826,6 @@ public Map extract(ExportEvaluatedExamplesRequest request) {
             listModelEvaluationsTransportSettings,
             settings.listModelEvaluationsSettings(),
             clientContext);
-    this.updateDatasetCallable =
-        callableFactory.createUnaryCallable(
-            updateDatasetTransportSettings, settings.updateDatasetSettings(), clientContext);
     this.getAnnotationSpecCallable =
         callableFactory.createUnaryCallable(
             getAnnotationSpecTransportSettings,
@@ -815,14 +855,6 @@ public Map extract(ExportEvaluatedExamplesRequest request) {
     this.updateColumnSpecCallable =
         callableFactory.createUnaryCallable(
             updateColumnSpecTransportSettings, settings.updateColumnSpecSettings(), clientContext);
-    this.exportModelCallable =
-        callableFactory.createUnaryCallable(
-            exportModelTransportSettings, settings.exportModelSettings(), clientContext);
-    this.exportEvaluatedExamplesCallable =
-        callableFactory.createUnaryCallable(
-            exportEvaluatedExamplesTransportSettings,
-            settings.exportEvaluatedExamplesSettings(),
-            clientContext);
 
     backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
   }
@@ -836,6 +868,10 @@ public UnaryCallable createDatasetCallable() {
     return createDatasetCallable;
   }
 
+  public UnaryCallable updateDatasetCallable() {
+    return updateDatasetCallable;
+  }
+
   public UnaryCallable getDatasetCallable() {
     return getDatasetCallable;
   }
@@ -910,10 +946,22 @@ public UnaryCallable deleteModelCallable() {
     return deleteModelCallable;
   }
 
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      deployModelOperationCallable() {
+    return deployModelOperationCallable;
+  }
+
   public UnaryCallable deployModelCallable() {
     return deployModelCallable;
   }
 
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      undeployModelOperationCallable() {
+    return undeployModelOperationCallable;
+  }
+
   public UnaryCallable undeployModelCallable() {
     return undeployModelCallable;
   }
@@ -922,6 +970,27 @@ public UnaryCallable getModelEvaluat
     return getModelEvaluationCallable;
   }
 
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      exportModelOperationCallable() {
+    return exportModelOperationCallable;
+  }
+
+  public UnaryCallable exportModelCallable() {
+    return exportModelCallable;
+  }
+
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      exportEvaluatedExamplesOperationCallable() {
+    return exportEvaluatedExamplesOperationCallable;
+  }
+
+  public UnaryCallable
+      exportEvaluatedExamplesCallable() {
+    return exportEvaluatedExamplesCallable;
+  }
+
   public UnaryCallable
       listModelEvaluationsPagedCallable() {
     return listModelEvaluationsPagedCallable;
@@ -932,10 +1001,6 @@ public UnaryCallable getModelEvaluat
     return listModelEvaluationsCallable;
   }
 
-  public UnaryCallable updateDatasetCallable() {
-    return updateDatasetCallable;
-  }
-
   public UnaryCallable getAnnotationSpecCallable() {
     return getAnnotationSpecCallable;
   }
@@ -974,15 +1039,6 @@ public UnaryCallable updateColumnSpecCallab
     return updateColumnSpecCallable;
   }
 
-  public UnaryCallable exportModelCallable() {
-    return exportModelCallable;
-  }
-
-  public UnaryCallable
-      exportEvaluatedExamplesCallable() {
-    return exportEvaluatedExamplesCallable;
-  }
-
   @Override
   public final void close() {
     shutdown();
diff --git a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcPredictionServiceStub.java b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcPredictionServiceStub.java
index 37c8695a99e1..434dd3b86fb1 100644
--- a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcPredictionServiceStub.java
+++ b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/GrpcPredictionServiceStub.java
@@ -21,13 +21,17 @@
 import com.google.api.gax.grpc.GrpcCallSettings;
 import com.google.api.gax.grpc.GrpcStubCallableFactory;
 import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallable;
 import com.google.api.gax.rpc.RequestParamsExtractor;
 import com.google.api.gax.rpc.UnaryCallable;
 import com.google.cloud.automl.v1beta1.BatchPredictRequest;
+import com.google.cloud.automl.v1beta1.BatchPredictResult;
+import com.google.cloud.automl.v1beta1.OperationMetadata;
 import com.google.cloud.automl.v1beta1.PredictRequest;
 import com.google.cloud.automl.v1beta1.PredictResponse;
 import com.google.common.collect.ImmutableMap;
 import com.google.longrunning.Operation;
+import com.google.longrunning.stub.GrpcOperationsStub;
 import io.grpc.MethodDescriptor;
 import io.grpc.protobuf.ProtoUtils;
 import java.io.IOException;
@@ -62,9 +66,12 @@ public class GrpcPredictionServiceStub extends PredictionServiceStub {
               .build();
 
   private final BackgroundResource backgroundResources;
+  private final GrpcOperationsStub operationsStub;
 
   private final UnaryCallable predictCallable;
   private final UnaryCallable batchPredictCallable;
+  private final OperationCallable
+      batchPredictOperationCallable;
 
   private final GrpcStubCallableFactory callableFactory;
 
@@ -106,6 +113,7 @@ protected GrpcPredictionServiceStub(
       GrpcStubCallableFactory callableFactory)
       throws IOException {
     this.callableFactory = callableFactory;
+    this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory);
 
     GrpcCallSettings predictTransportSettings =
         GrpcCallSettings.newBuilder()
@@ -140,14 +148,31 @@ public Map extract(BatchPredictRequest request) {
     this.batchPredictCallable =
         callableFactory.createUnaryCallable(
             batchPredictTransportSettings, settings.batchPredictSettings(), clientContext);
+    this.batchPredictOperationCallable =
+        callableFactory.createOperationCallable(
+            batchPredictTransportSettings,
+            settings.batchPredictOperationSettings(),
+            clientContext,
+            this.operationsStub);
 
     backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources());
   }
 
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public GrpcOperationsStub getOperationsStub() {
+    return operationsStub;
+  }
+
   public UnaryCallable predictCallable() {
     return predictCallable;
   }
 
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      batchPredictOperationCallable() {
+    return batchPredictOperationCallable;
+  }
+
   public UnaryCallable batchPredictCallable() {
     return batchPredictCallable;
   }
diff --git a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStub.java b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStub.java
index e92f7ce35b0f..926adc576506 100644
--- a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStub.java
+++ b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStub.java
@@ -17,11 +17,15 @@
 
 import com.google.api.core.BetaApi;
 import com.google.api.gax.core.BackgroundResource;
+import com.google.api.gax.rpc.OperationCallable;
 import com.google.api.gax.rpc.UnaryCallable;
 import com.google.cloud.automl.v1beta1.BatchPredictRequest;
+import com.google.cloud.automl.v1beta1.BatchPredictResult;
+import com.google.cloud.automl.v1beta1.OperationMetadata;
 import com.google.cloud.automl.v1beta1.PredictRequest;
 import com.google.cloud.automl.v1beta1.PredictResponse;
 import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
 import javax.annotation.Generated;
 
 // AUTO-GENERATED DOCUMENTATION AND CLASS
@@ -34,10 +38,21 @@
 @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
 public abstract class PredictionServiceStub implements BackgroundResource {
 
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationsStub getOperationsStub() {
+    throw new UnsupportedOperationException("Not implemented: getOperationsStub()");
+  }
+
   public UnaryCallable predictCallable() {
     throw new UnsupportedOperationException("Not implemented: predictCallable()");
   }
 
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallable
+      batchPredictOperationCallable() {
+    throw new UnsupportedOperationException("Not implemented: batchPredictOperationCallable()");
+  }
+
   public UnaryCallable batchPredictCallable() {
     throw new UnsupportedOperationException("Not implemented: batchPredictCallable()");
   }
diff --git a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStubSettings.java b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStubSettings.java
index fc72498fd16b..6e433fd4ec6f 100644
--- a/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStubSettings.java
+++ b/google-cloud-clients/google-cloud-automl/src/main/java/com/google/cloud/automl/v1beta1/stub/PredictionServiceStubSettings.java
@@ -23,14 +23,20 @@
 import com.google.api.gax.grpc.GaxGrpcProperties;
 import com.google.api.gax.grpc.GrpcTransportChannel;
 import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider;
+import com.google.api.gax.grpc.ProtoOperationTransformers;
+import com.google.api.gax.longrunning.OperationSnapshot;
+import com.google.api.gax.longrunning.OperationTimedPollAlgorithm;
 import com.google.api.gax.retrying.RetrySettings;
 import com.google.api.gax.rpc.ApiClientHeaderProvider;
 import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.OperationCallSettings;
 import com.google.api.gax.rpc.StatusCode;
 import com.google.api.gax.rpc.StubSettings;
 import com.google.api.gax.rpc.TransportChannelProvider;
 import com.google.api.gax.rpc.UnaryCallSettings;
 import com.google.cloud.automl.v1beta1.BatchPredictRequest;
+import com.google.cloud.automl.v1beta1.BatchPredictResult;
+import com.google.cloud.automl.v1beta1.OperationMetadata;
 import com.google.cloud.automl.v1beta1.PredictRequest;
 import com.google.cloud.automl.v1beta1.PredictResponse;
 import com.google.common.collect.ImmutableList;
@@ -78,6 +84,8 @@ public class PredictionServiceStubSettings extends StubSettings predictSettings;
   private final UnaryCallSettings batchPredictSettings;
+  private final OperationCallSettings
+      batchPredictOperationSettings;
 
   /** Returns the object with the settings used for calls to predict. */
   public UnaryCallSettings predictSettings() {
@@ -89,6 +97,13 @@ public UnaryCallSettings batchPredictSettings()
     return batchPredictSettings;
   }
 
+  /** Returns the object with the settings used for calls to batchPredict. */
+  @BetaApi("The surface for use by generated code is not stable yet and may change in the future.")
+  public OperationCallSettings
+      batchPredictOperationSettings() {
+    return batchPredictOperationSettings;
+  }
+
   @BetaApi("A restructuring of stub classes is planned, so this may break in the future")
   public PredictionServiceStub createStub() throws IOException {
     if (getTransportChannelProvider()
@@ -159,6 +174,7 @@ protected PredictionServiceStubSettings(Builder settingsBuilder) throws IOExcept
 
     predictSettings = settingsBuilder.predictSettings().build();
     batchPredictSettings = settingsBuilder.batchPredictSettings().build();
+    batchPredictOperationSettings = settingsBuilder.batchPredictOperationSettings().build();
   }
 
   /** Builder for PredictionServiceStubSettings. */
@@ -167,6 +183,9 @@ public static class Builder extends StubSettings.Builder predictSettings;
     private final UnaryCallSettings.Builder batchPredictSettings;
+    private final OperationCallSettings.Builder<
+            BatchPredictRequest, BatchPredictResult, OperationMetadata>
+        batchPredictOperationSettings;
 
     private static final ImmutableMap>
         RETRYABLE_CODE_DEFINITIONS;
@@ -213,6 +232,8 @@ protected Builder(ClientContext clientContext) {
 
       batchPredictSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
+      batchPredictOperationSettings = OperationCallSettings.newBuilder();
+
       unaryMethodSettingsBuilders =
           ImmutableList.>of(predictSettings, batchPredictSettings);
 
@@ -239,6 +260,29 @@ private static Builder initDefaults(Builder builder) {
           .batchPredictSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("non_idempotent"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"));
+      builder
+          .batchPredictOperationSettings()
+          .setInitialCallSettings(
+              UnaryCallSettings
+                  .newUnaryCallSettingsBuilder()
+                  .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("idempotent"))
+                  .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("default"))
+                  .build())
+          .setResponseTransformer(
+              ProtoOperationTransformers.ResponseTransformer.create(BatchPredictResult.class))
+          .setMetadataTransformer(
+              ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class))
+          .setPollingAlgorithm(
+              OperationTimedPollAlgorithm.create(
+                  RetrySettings.newBuilder()
+                      .setInitialRetryDelay(Duration.ofMillis(500L))
+                      .setRetryDelayMultiplier(1.5)
+                      .setMaxRetryDelay(Duration.ofMillis(5000L))
+                      .setInitialRpcTimeout(Duration.ZERO) // ignored
+                      .setRpcTimeoutMultiplier(1.0) // ignored
+                      .setMaxRpcTimeout(Duration.ZERO) // ignored
+                      .setTotalTimeout(Duration.ofMillis(300000L))
+                      .build()));
 
       return builder;
     }
@@ -248,6 +292,7 @@ protected Builder(PredictionServiceStubSettings settings) {
 
       predictSettings = settings.predictSettings.toBuilder();
       batchPredictSettings = settings.batchPredictSettings.toBuilder();
+      batchPredictOperationSettings = settings.batchPredictOperationSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
           ImmutableList.>of(predictSettings, batchPredictSettings);
@@ -279,6 +324,14 @@ public UnaryCallSettings.Builder batchPredictSet
       return batchPredictSettings;
     }
 
+    /** Returns the builder for the settings used for calls to batchPredict. */
+    @BetaApi(
+        "The surface for use by generated code is not stable yet and may change in the future.")
+    public OperationCallSettings.Builder
+        batchPredictOperationSettings() {
+      return batchPredictOperationSettings;
+    }
+
     @Override
     public PredictionServiceStubSettings build() throws IOException {
       return new PredictionServiceStubSettings(this);
diff --git a/google-cloud-clients/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/AutoMlClientTest.java b/google-cloud-clients/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/AutoMlClientTest.java
index 193ebb6dc051..38e0305e1f31 100644
--- a/google-cloud-clients/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/AutoMlClientTest.java
+++ b/google-cloud-clients/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/AutoMlClientTest.java
@@ -15,9 +15,11 @@
  */
 package com.google.cloud.automl.v1beta1;
 
+import static com.google.cloud.automl.v1beta1.AutoMlClient.ListColumnSpecsPagedResponse;
 import static com.google.cloud.automl.v1beta1.AutoMlClient.ListDatasetsPagedResponse;
 import static com.google.cloud.automl.v1beta1.AutoMlClient.ListModelEvaluationsPagedResponse;
 import static com.google.cloud.automl.v1beta1.AutoMlClient.ListModelsPagedResponse;
+import static com.google.cloud.automl.v1beta1.AutoMlClient.ListTableSpecsPagedResponse;
 
 import com.google.api.gax.core.NoCredentialsProvider;
 import com.google.api.gax.grpc.GaxGrpcProperties;
@@ -138,6 +140,56 @@ public void createDatasetExceptionTest() throws Exception {
     }
   }
 
+  @Test
+  @SuppressWarnings("all")
+  public void updateDatasetTest() {
+    String name = "name3373707";
+    String displayName = "displayName1615086568";
+    String description = "description-1724546052";
+    int exampleCount = 1517063674;
+    String etag = "etag3123477";
+    Dataset expectedResponse =
+        Dataset.newBuilder()
+            .setName(name)
+            .setDisplayName(displayName)
+            .setDescription(description)
+            .setExampleCount(exampleCount)
+            .setEtag(etag)
+            .build();
+    mockAutoMl.addResponse(expectedResponse);
+
+    Dataset dataset = Dataset.newBuilder().build();
+
+    Dataset actualResponse = client.updateDataset(dataset);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockAutoMl.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    UpdateDatasetRequest actualRequest = (UpdateDatasetRequest) actualRequests.get(0);
+
+    Assert.assertEquals(dataset, actualRequest.getDataset());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void updateDatasetExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockAutoMl.addException(exception);
+
+    try {
+      Dataset dataset = Dataset.newBuilder().build();
+
+      client.updateDataset(dataset);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
   @Test
   @SuppressWarnings("all")
   public void getDatasetTest() {
@@ -576,15 +628,19 @@ public void deleteModelExceptionTest() throws Exception {
 
   @Test
   @SuppressWarnings("all")
-  public void deployModelTest() {
-    String name2 = "name2-1052831874";
-    boolean done = true;
-    Operation expectedResponse = Operation.newBuilder().setName(name2).setDone(done).build();
-    mockAutoMl.addResponse(expectedResponse);
+  public void deployModelTest() throws Exception {
+    Empty expectedResponse = Empty.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("deployModelTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockAutoMl.addResponse(resultOperation);
 
     ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
 
-    Operation actualResponse = client.deployModel(name);
+    Empty actualResponse = client.deployModelAsync(name).get();
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockAutoMl.getRequests();
@@ -607,24 +663,30 @@ public void deployModelExceptionTest() throws Exception {
     try {
       ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
 
-      client.deployModel(name);
+      client.deployModelAsync(name).get();
       Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = (InvalidArgumentException) e.getCause();
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
     }
   }
 
   @Test
   @SuppressWarnings("all")
-  public void undeployModelTest() {
-    String name2 = "name2-1052831874";
-    boolean done = true;
-    Operation expectedResponse = Operation.newBuilder().setName(name2).setDone(done).build();
-    mockAutoMl.addResponse(expectedResponse);
+  public void undeployModelTest() throws Exception {
+    Empty expectedResponse = Empty.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("undeployModelTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockAutoMl.addResponse(resultOperation);
 
     ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
 
-    Operation actualResponse = client.undeployModel(name);
+    Empty actualResponse = client.undeployModelAsync(name).get();
     Assert.assertEquals(expectedResponse, actualResponse);
 
     List actualRequests = mockAutoMl.getRequests();
@@ -647,10 +709,12 @@ public void undeployModelExceptionTest() throws Exception {
     try {
       ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
 
-      client.undeployModel(name);
+      client.undeployModelAsync(name).get();
       Assert.fail("No exception raised");
-    } catch (InvalidArgumentException e) {
-      // Expected exception
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = (InvalidArgumentException) e.getCause();
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
     }
   }
 
@@ -751,4 +815,336 @@ public void listModelEvaluationsExceptionTest() throws Exception {
       // Expected exception
     }
   }
+
+  @Test
+  @SuppressWarnings("all")
+  public void getAnnotationSpecTest() {
+    String name2 = "name2-1052831874";
+    String displayName = "displayName1615086568";
+    int exampleCount = 1517063674;
+    AnnotationSpec expectedResponse =
+        AnnotationSpec.newBuilder()
+            .setName(name2)
+            .setDisplayName(displayName)
+            .setExampleCount(exampleCount)
+            .build();
+    mockAutoMl.addResponse(expectedResponse);
+
+    AnnotationSpecName name =
+        AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
+
+    AnnotationSpec actualResponse = client.getAnnotationSpec(name);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockAutoMl.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    GetAnnotationSpecRequest actualRequest = (GetAnnotationSpecRequest) actualRequests.get(0);
+
+    Assert.assertEquals(name, AnnotationSpecName.parse(actualRequest.getName()));
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void getAnnotationSpecExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockAutoMl.addException(exception);
+
+    try {
+      AnnotationSpecName name =
+          AnnotationSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[ANNOTATION_SPEC]");
+
+      client.getAnnotationSpec(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void getTableSpecTest() {
+    String name2 = "name2-1052831874";
+    String timeColumnSpecId = "timeColumnSpecId1558734824";
+    long rowCount = 1340416618L;
+    long columnCount = 122671386L;
+    String etag = "etag3123477";
+    TableSpec expectedResponse =
+        TableSpec.newBuilder()
+            .setName(name2)
+            .setTimeColumnSpecId(timeColumnSpecId)
+            .setRowCount(rowCount)
+            .setColumnCount(columnCount)
+            .setEtag(etag)
+            .build();
+    mockAutoMl.addResponse(expectedResponse);
+
+    TableSpecName name = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+
+    TableSpec actualResponse = client.getTableSpec(name);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockAutoMl.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    GetTableSpecRequest actualRequest = (GetTableSpecRequest) actualRequests.get(0);
+
+    Assert.assertEquals(name, TableSpecName.parse(actualRequest.getName()));
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void getTableSpecExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockAutoMl.addException(exception);
+
+    try {
+      TableSpecName name = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+
+      client.getTableSpec(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void listTableSpecsTest() {
+    String nextPageToken = "";
+    TableSpec tableSpecsElement = TableSpec.newBuilder().build();
+    List tableSpecs = Arrays.asList(tableSpecsElement);
+    ListTableSpecsResponse expectedResponse =
+        ListTableSpecsResponse.newBuilder()
+            .setNextPageToken(nextPageToken)
+            .addAllTableSpecs(tableSpecs)
+            .build();
+    mockAutoMl.addResponse(expectedResponse);
+
+    DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+
+    ListTableSpecsPagedResponse pagedListResponse = client.listTableSpecs(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getTableSpecsList().get(0), resources.get(0));
+
+    List actualRequests = mockAutoMl.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ListTableSpecsRequest actualRequest = (ListTableSpecsRequest) actualRequests.get(0);
+
+    Assert.assertEquals(parent, DatasetName.parse(actualRequest.getParent()));
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void listTableSpecsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockAutoMl.addException(exception);
+
+    try {
+      DatasetName parent = DatasetName.of("[PROJECT]", "[LOCATION]", "[DATASET]");
+
+      client.listTableSpecs(parent);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void updateTableSpecTest() {
+    String name = "name3373707";
+    String timeColumnSpecId = "timeColumnSpecId1558734824";
+    long rowCount = 1340416618L;
+    long columnCount = 122671386L;
+    String etag = "etag3123477";
+    TableSpec expectedResponse =
+        TableSpec.newBuilder()
+            .setName(name)
+            .setTimeColumnSpecId(timeColumnSpecId)
+            .setRowCount(rowCount)
+            .setColumnCount(columnCount)
+            .setEtag(etag)
+            .build();
+    mockAutoMl.addResponse(expectedResponse);
+
+    TableSpec tableSpec = TableSpec.newBuilder().build();
+
+    TableSpec actualResponse = client.updateTableSpec(tableSpec);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockAutoMl.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    UpdateTableSpecRequest actualRequest = (UpdateTableSpecRequest) actualRequests.get(0);
+
+    Assert.assertEquals(tableSpec, actualRequest.getTableSpec());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void updateTableSpecExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockAutoMl.addException(exception);
+
+    try {
+      TableSpec tableSpec = TableSpec.newBuilder().build();
+
+      client.updateTableSpec(tableSpec);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void getColumnSpecTest() {
+    String name2 = "name2-1052831874";
+    String displayName = "displayName1615086568";
+    String etag = "etag3123477";
+    ColumnSpec expectedResponse =
+        ColumnSpec.newBuilder().setName(name2).setDisplayName(displayName).setEtag(etag).build();
+    mockAutoMl.addResponse(expectedResponse);
+
+    ColumnSpecName name =
+        ColumnSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]");
+
+    ColumnSpec actualResponse = client.getColumnSpec(name);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockAutoMl.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    GetColumnSpecRequest actualRequest = (GetColumnSpecRequest) actualRequests.get(0);
+
+    Assert.assertEquals(name, ColumnSpecName.parse(actualRequest.getName()));
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void getColumnSpecExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockAutoMl.addException(exception);
+
+    try {
+      ColumnSpecName name =
+          ColumnSpecName.of(
+              "[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]", "[COLUMN_SPEC]");
+
+      client.getColumnSpec(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void listColumnSpecsTest() {
+    String nextPageToken = "";
+    ColumnSpec columnSpecsElement = ColumnSpec.newBuilder().build();
+    List columnSpecs = Arrays.asList(columnSpecsElement);
+    ListColumnSpecsResponse expectedResponse =
+        ListColumnSpecsResponse.newBuilder()
+            .setNextPageToken(nextPageToken)
+            .addAllColumnSpecs(columnSpecs)
+            .build();
+    mockAutoMl.addResponse(expectedResponse);
+
+    TableSpecName parent = TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+
+    ListColumnSpecsPagedResponse pagedListResponse = client.listColumnSpecs(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getColumnSpecsList().get(0), resources.get(0));
+
+    List actualRequests = mockAutoMl.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ListColumnSpecsRequest actualRequest = (ListColumnSpecsRequest) actualRequests.get(0);
+
+    Assert.assertEquals(parent, TableSpecName.parse(actualRequest.getParent()));
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void listColumnSpecsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockAutoMl.addException(exception);
+
+    try {
+      TableSpecName parent =
+          TableSpecName.of("[PROJECT]", "[LOCATION]", "[DATASET]", "[TABLE_SPEC]");
+
+      client.listColumnSpecs(parent);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void updateColumnSpecTest() {
+    String name = "name3373707";
+    String displayName = "displayName1615086568";
+    String etag = "etag3123477";
+    ColumnSpec expectedResponse =
+        ColumnSpec.newBuilder().setName(name).setDisplayName(displayName).setEtag(etag).build();
+    mockAutoMl.addResponse(expectedResponse);
+
+    ColumnSpec columnSpec = ColumnSpec.newBuilder().build();
+
+    ColumnSpec actualResponse = client.updateColumnSpec(columnSpec);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockAutoMl.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    UpdateColumnSpecRequest actualRequest = (UpdateColumnSpecRequest) actualRequests.get(0);
+
+    Assert.assertEquals(columnSpec, actualRequest.getColumnSpec());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void updateColumnSpecExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockAutoMl.addException(exception);
+
+    try {
+      ColumnSpec columnSpec = ColumnSpec.newBuilder().build();
+
+      client.updateColumnSpec(columnSpec);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception
+    }
+  }
 }
diff --git a/google-cloud-clients/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/PredictionServiceClientTest.java b/google-cloud-clients/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/PredictionServiceClientTest.java
index dcbdf844f180..5d0f826bf1da 100644
--- a/google-cloud-clients/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/PredictionServiceClientTest.java
+++ b/google-cloud-clients/google-cloud-automl/src/test/java/com/google/cloud/automl/v1beta1/PredictionServiceClientTest.java
@@ -22,7 +22,10 @@
 import com.google.api.gax.grpc.testing.MockServiceHelper;
 import com.google.api.gax.rpc.ApiClientHeaderProvider;
 import com.google.api.gax.rpc.InvalidArgumentException;
+import com.google.api.gax.rpc.StatusCode;
+import com.google.longrunning.Operation;
 import com.google.protobuf.AbstractMessage;
+import com.google.protobuf.Any;
 import io.grpc.Status;
 import io.grpc.StatusRuntimeException;
 import java.io.IOException;
@@ -30,6 +33,7 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.ExecutionException;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Assert;
@@ -120,4 +124,60 @@ public void predictExceptionTest() throws Exception {
       // Expected exception
     }
   }
+
+  @Test
+  @SuppressWarnings("all")
+  public void batchPredictTest() throws Exception {
+    BatchPredictResult expectedResponse = BatchPredictResult.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("batchPredictTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockPredictionService.addResponse(resultOperation);
+
+    ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+    BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build();
+    BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build();
+    Map params = new HashMap<>();
+
+    BatchPredictResult actualResponse =
+        client.batchPredictAsync(name, inputConfig, outputConfig, params).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockPredictionService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    BatchPredictRequest actualRequest = (BatchPredictRequest) actualRequests.get(0);
+
+    Assert.assertEquals(name, ModelName.parse(actualRequest.getName()));
+    Assert.assertEquals(inputConfig, actualRequest.getInputConfig());
+    Assert.assertEquals(outputConfig, actualRequest.getOutputConfig());
+    Assert.assertEquals(params, actualRequest.getParamsMap());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  @SuppressWarnings("all")
+  public void batchPredictExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
+    mockPredictionService.addException(exception);
+
+    try {
+      ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[MODEL]");
+      BatchPredictInputConfig inputConfig = BatchPredictInputConfig.newBuilder().build();
+      BatchPredictOutputConfig outputConfig = BatchPredictOutputConfig.newBuilder().build();
+      Map params = new HashMap<>();
+
+      client.batchPredictAsync(name, inputConfig, outputConfig, params).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = (InvalidArgumentException) e.getCause();
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
+    }
+  }
 }
diff --git a/google-cloud-clients/google-cloud-automl/synth.metadata b/google-cloud-clients/google-cloud-automl/synth.metadata
index 39ada5e38ef1..d9cc3d60083a 100644
--- a/google-cloud-clients/google-cloud-automl/synth.metadata
+++ b/google-cloud-clients/google-cloud-automl/synth.metadata
@@ -1,5 +1,5 @@
 {
-  "updateTime": "2019-04-02T07:33:58.311220Z",
+  "updateTime": "2019-04-03T07:35:01.501791Z",
   "sources": [
     {
       "generator": {
@@ -12,8 +12,8 @@
       "git": {
         "name": "googleapis",
         "remote": "https://github.com/googleapis/googleapis.git",
-        "sha": "6c48ab5aef47dc14e02e2dc718d232a28067129d",
-        "internalRef": "241437588"
+        "sha": "8dab717b2851750c829530669fe5cebafef22fb8",
+        "internalRef": "241646671"
       }
     }
   ],